Any way of knowing if a video was launched from Kodi's web server?
#1
Any way of knowing if a video was launched from Kodi's web server?

*updated by moderator*
Reply
#2
@SEIKT Unless you can fill us in with sufficient details, there is no such thing as a "Kodi server".

Kodi can partially do UPnP/DLNA functionality or have SMB file sharing in LibreELEC, but other than that, I have no clue how you have Kodi serving you stuff.
Reply
#3
(2021-11-09, 15:45)Klojum Wrote: @SEIKT Unless you can fill us in with sufficient details, there is no such thing as a "Kodi server".

Kodi can partially do UPnP/DLNA functionality or have SMB file sharing in LibreELEC, but other than that, I have no clue how you have Kodi serving you stuff.

Sorry if I wasn't clear, I was referring to the web server that allows you to control Kodi via HTTP.
Reply
#4
It's still not clear to me... If you are using a web interface to handle Kodi, who else or what else is supposed to know that a file is launched via http?
Reply
#5
(2021-11-10, 03:35)Klojum Wrote: It's still not clear to me... If you are using a web interface to handle Kodi, who else or what else is supposed to know that a file is launched via http?

My addon specifically. My movies point to STRM files and my addon is responsible for attaining the resume point as this isn't natively supported in Kodi.

If a video is launched from the web interface and say for instance you are in the movie library hovered over an unrelated movie with a resume point. My addon will prompt a resume selection for the movie that is hovered over as the DB ID that is returned is the ID from the movie that is hovered over and not of the movie that was launched from Kodi server. This is unavoidable as I use xbmc.getInfoLabel('ListItem.DBID') to get the DB ID. If my addon knows that the movie was launched from the Kodi server I can add a condition to skip the display of a resume prompt.
Reply
#6
All that info would have been nice in the opening post... And since add-ons are not really my department, I'll let others have their say on your question.
Reply
#7
No worries, cheers for your assistance. I'll rephrase the question too in case it is still confusing to others... Is it possible for an addon to know if media wasn't launched/played from the Kodi GUI?
Reply
#8
Still your use case is not clear. Do I understand correctly: you have some list item selected in Kodi GUI then start playback using the web-UI (essentially JSON-RPC API) and want to know if the item being played is different from the one that is currently selected in the GUI? If you can intercept playback event then you can compare the item being played with the item currently selected, for example item's path.
Reply
#9
(2021-11-13, 09:37)Roman_V_M Wrote: Still your use case is not clear. Do I understand correctly: you have some list item selected in Kodi GUI then start playback using the web-UI (essentially JSON-RPC API) and want to know if the item being played is different from the one that is currently selected in the GUI? If you can intercept playback event then you can compare the item being played with the item currently selected, for example item's path.
Exactly, but the comparison needs to take place prior to playback.
Reply

Logout Mark Read Team Forum Stats Members Help
Any way of knowing if a video was launched from Kodi's web server?0