opensubtitlesdev / service.subtitles.opensubtitles-com

Opensubtitles.com Kodi extension
GNU General Public License v2.0
10 stars 13 forks source link

Allow addons to set path and size of the currently playing file #15

Closed pannal closed 8 months ago

pannal commented 8 months ago

When playing a file using an addon, such as Plex4Kodi or PM4K, the file path that the opensubtitles addon sees can be a stream URL, resulting in not-as-good query hinting when searching for subtitles.

Allow proper filename and size hinting by utilizing a global infoLabel in the "videoinfo" realm.

Addons can set it like this:

xbmcgui.Window(10000).setProperty('videoinfo.current_path', path)
xbmcgui.Window(10000).setProperty('videoinfo.current_size', str(size))

And the OpenSubtitles.com addon will read it if it's a stream URL.

pannal commented 8 months ago

Ref: https://forums.plex.tv/t/plexmod-for-kodi-18-19-20-21/481208/751

opensubtitlesdev commented 8 months ago

Wow that's great thank you