Dual subtitle support (multiple select list items)
#1
Hi,
I'm trying to make kodi subtitle addon show multiple subtitles, So I need the user to select multiple subtitles in the subtitle list, unfortunately I couldn't find a way to make the list "multiselect"

currently you can only select one item like so 

Image
So basicly when creating the list this way :

python:

        listitem = xbmcgui.ListItem(label          = item_data["LanguageName"],label2= item_data["SubFileName"],)
        xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=listitem,isFolder=False)
I want to be able to select multiple items in the resulting list

Thanks
Reply
#2
Try the multiselect dialog?
Add-on : Bluray iso utils Rewrite of BR_iso_enhancements
Add-on : BR_iso_Enhancements Give theatrical & directors cut from the same bluray iso each their own library entry, use bluray iso's of tv shows as if they are already ripped.
Reply
#3
(2018-04-12, 15:48)Wimpie Wrote: Try the multiselect dialog?
 Yeah I already tried this, unfortunately It doesn't look like an elegant solution beacuse it shows a dialog seperately than the main subtitles dialog like so :

Image
Reply
#4
Currently subtitle addons use xbmcplugin API, meaning that all you have no control over the subtitle selection dialog. You can still write an old-school script-based subtitle addon with its own fully custom UI and bind it to a keyboard/remote hotkey, but you will loose integration with Kodi UI.
Reply
#5
(2018-04-12, 17:46)Roman_V_M Wrote:  but you will loose integration with Kodi UI.
Well, That's exactly what I'm trying to avoid, I don't want to reinvent the wheel, I just want to edit existing solutions like subscene and opensubtitle addons to add dual subtitles.
 I can already make kodi show two languages
Image
All we need is a way for the user to select multiple files, Which according to your comment is not possible right now.
Can we somehow mark this thread as a feature request?

Thanks
Reply
#6
(2018-04-12, 20:02)moham_96 Wrote: All we need is a way for the user to select multiple files, Which according to your comment is not possible right now.
Can we somehow mark this thread as a feature request?

I'm not sure if it makes sense. A subtitle addon only downloads subtitles from a specific website. While it may not be convenient to open subtitle download dialog multiple times, some websites may not tolerate multiple download requests fired within a short time interval.
Reply
#7
(2018-04-13, 12:36)Roman_V_M Wrote:
(2018-04-12, 20:02)moham_96 Wrote: All we need is a way for the user to select multiple files, Which according to your comment is not possible right now.
Can we somehow mark this thread as a feature request?

I'm not sure if it makes sense. A subtitle addon only downloads subtitles from a specific website. While it may not be convenient to open subtitle download dialog multiple times, some websites may not tolerate multiple download requests fired within a short time interval.  
 I don't think subtitles websites would block multiple requests in a short time since a user can download a subtitle only to find out that the subtitles are out of sync with the movie so he needs to go and fetch a new subtitle, and even if sites block requests in second it's very easy to fix with a sleep function for a few seconds.
Anyway, to make sure I went and modified the add-ons of the two most used subtitles service (opensubtitles.org and subscene.com) using the multi-select dialog above and voila I can download two languages, combine them, apply some styling and spacing and then dispatch them to the player.
But as you can see in the above picture it is very annoying to have multiple dialog boxes.

This is what it looks like https://gfycat.com/FortunateValidAmericancreamdraft
Thanks
Reply
#8
This could be very nice for multilingual families. You work on this is much appreciated, thank you.
If I have helped you or increased your knowledge please click the 'Thumb Up - Like' button to show me your appreciation :)
For YouTube questions see the official thread here.
Reply
#9
(2018-04-14, 10:01)jmh2002 Wrote: This could be very nice for multilingual families. You work on this is much appreciated, thank you.
 You're welcomeSmile
For me I use dualsubtitle when I'm trying to learn a new langauge using movies and tv shows as a material, but yes I've seen many posts about partners with dual lanuages having trouble watching movies in dualsubtitles
Reply
#10
I hope that you are able to successfully release this as a working addon Smile
If I have helped you or increased your knowledge please click the 'Thumb Up - Like' button to show me your appreciation :)
For YouTube questions see the official thread here.
Reply
#11
(2018-04-16, 08:10)jmh2002 Wrote: I hope that you are able to successfully release this as a working addon Smile
 If you want to try it I modified opensubtitles addon quickly and uploaded it here

https://github.com/moham96/service.subti...nsubtitles

you need to install script.module.pysubs2(see the Readme file)
Reply
#12
Thanks, I tried it (only a few times so far, so not really an extensive test) and it seems pretty cool.

Just one note, after following the install instructions I still couldn't get it to work. I found that I needed to open and save the (new) opensubtitles addon settings/configuration first, so that the DualSubs would then be enabled.

It works nicely on my Windows 10 device, but on my old Vista laptop it causes Kodi to crash with a Data Execution Prevention error when downloading and combining. Although this is a very old and slow device (1ghz core duo) so that may be the problem.

You are right that duplicate dialog boxes are not the most elegant solution, but for me I think what I miss more, visually, is just the wider layout of the orginal download subtitles dialog, with the language flags, and the extra info such as CC and ratings. Can the 'Choose a Subtitle' multi selection dialog be modified to look similar to the original dialog and to include this extra information?

Also I saw a small bug: in the new Subtitle Styles in settings, both parts say 'Top Subtitle' but I guess one should be Top and the other Bottom.

Finally, if you want some more feedback, it might be useful to start a thread in the Subtitles forum, or maybe better even just directly in the OpenSubtitles thread here: https://forum.kodi.tv/showthread.php?tid=183114&page=21 so that all the regular users of the addon can see it.

They probably won't notice it here in the Development forum.
If I have helped you or increased your knowledge please click the 'Thumb Up - Like' button to show me your appreciation :)
For YouTube questions see the official thread here.
Reply
#13
(2018-04-17, 14:48)jmh2002 Wrote: Thanks, I tried it (only a few times so far, so not really an extensive test) and it seems pretty cool.

Just one note, after following the install instructions I still couldn't get it to work. I found that I needed to open and save the (new) opensubtitles addon settings/configuration first, so that the DualSubs would then be enabled.

It works nicely on my Windows 10 device, but on my old Vista laptop it causes Kodi to crash with a Data Execution Prevention error when downloading and combining. Although this is a very old and slow device (1ghz core duo) so that may be the problem.

You are right that duplicate dialog boxes are not the most elegant solution, but for me I think what I miss more, visually, is just the wider layout of the orginal download subtitles dialog, with the language flags, and the extra info such as CC and ratings. Can the 'Choose a Subtitle' multi selection dialog be modified to look similar to the original dialog and to include this extra information?

Also I saw a small bug: in the new Subtitle Styles in settings, both parts say 'Top Subtitle' but I guess one should be Top and the other Bottom.

Finally, if you want some more feedback, it might be useful to start a thread in the Subtitles forum, or maybe better even just directly in the OpenSubtitles thread here: https://forum.kodi.tv/showthread.php?tid=183114&page=21 so that all the regular users of the addon can see it.

They probably won't notice it here in the Development forum.

Try it now, I fixed some errors that you pointed (uninstall the old one first)

regarding the crash in vista problem, I'm not sure why i'ts happening. Data Execution Prevention is supposedly used to prevent programs from executing in prohibited memory places, so this might be a problem in kodi maybe? try to enable debug logging and see what kodi spits out in the log when it crashes.

From what I've seen, the multiselect dialog is very limited compared to the usual plugin directory components, I could only get it to show the two labels (language name, and filename).

For now I'm not ready to move this addon to the subtitles forum since it was just a very quick mod.
And maybe I will never release it if I didn't find a way to prevent multiple dialogs.

Thank you
Reply
#14
THANKS! Moham. I'm still using this mod from time to time and really appreciate it.

Another user was asking about the possiblity to do this (https://forum.kodi.tv/showthread.php?tid...pid2731793) and I referred them here.

I hope you are able to continue development.
If I have helped you or increased your knowledge please click the 'Thumb Up - Like' button to show me your appreciation :)
For YouTube questions see the official thread here.
Reply
#15
(2018-05-04, 11:30)jmh2002 Wrote: THANKS! Moham. I'm still using this mod from time to time and really appreciate it.

Another user was asking about the possiblity to do this (https://forum.kodi.tv/showthread.php?tid...pid2731793) and I referred them here.

I hope you are able to continue development.
Hi jmh2002,

Unless kodi team add a multiselect api to the xbmcplugin object I don't think there is anything to continue developing.
You can refer anyone to this thread to download the addon and I'll try to help with any problem that they encounter as much as I could.
Hopefully if this gains support from users kodi team will consider multiselect api

Thanks
Reply

Logout Mark Read Team Forum Stats Members Help
Dual subtitle support (multiple select list items)0