Author Topic: Kodi OSD Notifications made a little easier  (Read 2841 times)

0 Members and 1 Guest are viewing this topic.

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 499
  • Karma: 43
    • View Profile
Kodi OSD Notifications made a little easier
« on: June 25, 2015, 09:09:14 PM »
UPDATE: even simpler thanks to jitterjames

I know this is a simple one, but I got tired of having to enter all the information needed for Kodi OSD notifications so I made it so I only have to enter the basics

if you want to use an image with your Kodi OSD Notification you will need to create a new folder in your VC Folder called "XbmcImages" with out the quotes and then you can just place all your images in that folder (so far I only use .jpg and .png files)

then all you have to do is use VC.Triggerevent to use the new OSD, in the group below I have a sample of how to use VC.Triggerevent for your KODI OSD notification

Code: [Select]
VC.TriggerEvent:   Kodi Notification   {1}ImageName.jpg   {2}Title of OSD   {3}Message for OSD

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.8-->
<commandGroup open="True" name="Kodi Notification" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="526" name="Kodi OSD Notification" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Raw/</cmdType>
      <params>
        <param>GUI.ShowNotification</param>
        <param>"image":"{Path.VC}\XbmcImages\{1}","title":" {2} ","message":" {3} "</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Kodi Notification</event>
  </command>
  <command id="527" name="Trigger Notification" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>Kodi Notification</param>
        <param>ImageName.jpg</param>
        <param>Title of OSD</param>
        <param>Your message here</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
</commandGroup>
« Last Edit: June 26, 2015, 12:31:02 AM by PegLegTV »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Kodi OSD Notifications made a little easier
« Reply #1 on: June 25, 2015, 09:36:49 PM »
Thanks PegLeg.

Just wondering.  Wouldn't it be easier to put the images in one of your Kodi folders?  Then you would not need to worry about doubling up the backslashes.  Also, did you try to use forward slashes?  I can never really seem to remember what the rules are for that on Kodi.
« Last Edit: June 25, 2015, 09:52:42 PM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Kodi OSD Notifications made a little easier
« Reply #2 on: June 25, 2015, 09:51:31 PM »
for example, this works for me if I have a subfolder of VC named "icons" that contains an image named "fan.png":

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.5.0-->
<command id="-1" name="Actions copied from LCB">
  <action>
    <cmdType>XJson.Raw/</cmdType>
    <params>
      <param>GUI.ShowNotification</param>
      <param>"image":"{Path.VC}\icons\fan.png","title":" Alert ","message":" The fan is now on "</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>

That is why I created the Raw/ action.

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 499
  • Karma: 43
    • View Profile
Re: Kodi OSD Notifications made a little easier
« Reply #3 on: June 25, 2015, 10:34:05 PM »
I could have sworn I tried that  :bonk , I'll update the command above, :bonk (1 bonk for my brain fart wasn't enough)

Quote
Just wondering.  Wouldn't it be easier to put the images in one of your Kodi folders?

I figured updating the folder in VC directory would be easier then having to navigate all the way down to Kodi when I added a new Caller ID image 
« Last Edit: June 25, 2015, 10:42:10 PM by PegLegTV »

vulcanjedi

  • $upporter
  • Sr. Member
  • *****
  • Posts: 213
  • Karma: 8
    • View Profile
Re: Kodi OSD Notifications made a little easier
« Reply #4 on: June 26, 2015, 01:17:45 AM »
thanks PeglegTV, I'll have to give this a try, wouldnt mind if I could change the default behavior of KODI notifications to include the image vs calling this trigger on particular commands
I will mention that I believe some skins may not support this, as the other day I was playing with some of the other skins and my image didnt show up. I typically use "Transparency!"