[Announcement] - Changes in Subtitle Addons structure
#61
https://github.com/amet/service.subtitle...ce.py#L178
Reply
#62
(2014-10-08, 12:13)tnuc Wrote: https://github.com/amet/service.subtitle...ce.py#L178

Not sure if understand it correctly. Would you be so kind to explain this in plain words? What xbmcplugin.addDirectoryItem() method, which is used for creating content lists in plugins, has to do with passing a subtitle path to the player? As far as understand, this string creates some list of several items (the number of items in subs collection), but how this list is then processed?
In content plugins such list of items with isFolder=False usually contains links to playable content and this list is displayed in XBMC UI, but what is its function here, in the subtitles plugin?
Reply
#63
we pass listitem back to core, OnDownloadComplete(https://github.com/xbmc/xbmc/blob/master...s.cpp#L435) picks it up and uses url param to move it from temp location to where user specified in subtitle settings.
Reply
#64
(2014-10-08, 13:44)tnuc Wrote: we pass listitem back to core, OnDownloadComplete(https://github.com/xbmc/xbmc/blob/master...s.cpp#L435) picks it up and uses url param to move it from temp location to where user specified in subtitle settings.

Thank you for explanation. As far as understand, some script call parameters ("search", "manualsearch" and "download) are reserved and handled by XBMC core too. But for my addon I need 2-level structure: episode list (if several episodes match the search criteria, which is rare but still happens) and subtitles list for the selected episode. Can I use my own script call parameters (e.g. "showsubs") to display a multi-level list?
Reply
#65
sure, anything is allowed in your script, what you do in scrip before sending listitem to core is up to you.

but when you call 'xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=listitem,isFolder=False)' and finish it off with 'xbmcplugin.endOfDirectory(int(sys.argv[1])' thats when core displays the list and your script has ended

so if you want to show a list of subs for user to pick the correct one(if I understood correctly) you do that before calling xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=listitem,isFolder=False) and send the picked one to back to core.

I hope that it helps, otherwise I didnt understand
Reply
#66
(2014-10-08, 16:10)tnuc Wrote: sure, anything is allowed in your script, what you do in scrip before sending listitem to core is up to you.

but when you call 'xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=listitem,isFolder=False)' and finish it off with 'xbmcplugin.endOfDirectory(int(sys.argv[1])' thats when core displays the list and your script has ended

so if you want to show a list of subs for user to pick the correct one(if I understood correctly) you do that before calling xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=listitem,isFolder=False) and send the picked one to back to core.

I hope that it helps, otherwise I didnt understand

As far as I can see, Search() function also creates a list of listItems, and this list of items is actually displayed in "Subtitles" interface (so I understand). So how XBMC Core knows, when it needs to display a list of items, and when it needs to handle subtitles URLs from listItems without displaying anything?
Reply
#67
hm, read the XBMC core a bit, but in short...

this is called when we download the sub and we just handle moving and renaming the subs....

this however is called when search is finished, that in turn fills the list and displays it.

list item is just that, an item, it doesnt just get displayed in some window just because its a listitem. its just a simple way to move list of subtitles from python into core using something that both (C++ and Python) understand
Reply
#68
(2014-10-08, 18:04)tnuc Wrote: hm, read the XBMC core a bit, but in short...

this is called when we download the sub and we just handle moving and renaming the subs....

this however is called when search is finished, that in turn fills the list and displays it.

list item is just that, an item, it doesnt just get displayed in some window just because its a listitem. its just a simple way to move list of subtitles from python into core using something that both (C++ and Python) understand

OK, but how can I control which of the above is called from Python addon perspective? I'm not very familial with C++, and all I need to know is to how display a list of found items and how to pass downloaded subs to the XBMC player.
Reply
#69
core calls your service with a param, see here, after 'search' or 'manualsearch' is called everything you return is being displayed as a list of subtitles, when param is 'download' core will just move sub to a destination.

https://github.com/amet/service.subtitle...service.py is best documentation there is
Reply
#70
(2014-10-08, 19:01)tnuc Wrote: core calls your service with a param, see here, after 'search' or 'manualsearch' is called everything you return is being displayed as a list of subtitles, when param is 'download' core will just move sub to a destination.

https://github.com/amet/service.subtitle...service.py is best documentation there is

Thanks for your answers. I've finally managed to get my own subtitles service working Smile
Reply
#71
i have got the subtitle plugin but when i try to open the drop box under video OSD nothing happens any help please
Reply
#72
Hello
Re Subtitles
Is it possible to add a subtitle source of one's own choice?
The reason i ask is i live in the UK so my prefered sub is English and i find the selection at the moment is a little scares for my needs on the TV sections
https://dailysubs.net/ is the one i would like to add
Ive tried downing the files i needed to a sd card in srt, format but cant seem to find a way to get them to play on the series im trying to watch
Or would it be possible to link to an Auto translator?
Kodi on Windows7 iMac Android
Reply
#73
Try
System...Settings...Add-ons...Search...type in subtitles
Good luck

ps.
Make sure youve followed this
http://kodi.wiki/view/Subtitles
To activate them
Smile
Kodi on Windows7 iMac Android
Reply
#74
Subtitle service works but fails to download..what should i do? i've reset the subtitle settings and set it up again but that didnt fix it

http://prntscr.com/aijn1u
Reply
#75
I experience the same problem as mariosxrist today. Using Kodi 16.0. Yesterday everything was working fine, so I'm suspecting a change in the subtitle addon.
Reply

Logout Mark Read Team Forum Stats Members Help
[Announcement] - Changes in Subtitle Addons structure0