how to get full title of language/subtitle stream *does nobody have an idea? :( *
#1
Question 
My google fu failed me miserably, so I need your help in developing a small addon.

I have some files with multiple audio and subtitle streams.

Stream #0:0: Video
Stream #0:1: (eng) Audio, Title: English 2.0 channel AAC
Stream #0:2: (eng) Audio, Title: English Commenary 2.0 channel AAC
Stream #0:3: (ger) Audio, Title: German 2.0 channel AAC
Stream #0:4: (eng) Subtitle, Title: English Signs and Songs
Stream #0:5: (eng) Subtitle, Title: English Full Subs
Stream #0:6: (ger) Subtitle, Title: German Signs and Songs
Stream #0:7: (ger) Subtitle, Title: German Full Subs
...

Using the player class'
getSubtitles()
getAvailableSubtitleStreams()
or
xbmc.getInfoLabel('VideoPlayer.SubtitlesLanguage')
I get e.g. "eng" as the current in use subtitle and the list "eng, eng, ger, ger" as the available subtitles.

How can I get the full title of the currently selected and the available streams, so I can reliably tell them apart?
Kodi has this information, as it is shown in the log when playing the file and switching the subtitles will display a popup window which contains the full title.

For audio I have two problems.
There seems to be no function to get the currently selected audio stream? Something like getAudio() would be required? How do I get what audio stream is playing?

getAvailableAudioStreams()
xbmc.getInfoLabel('VideoPlayer.AudioLanguage')
Have the same problem as above. They only use the short "eng, eng, ger" format, which is not distinctive. How can I get the full title, so I can tell the streams apart?

I hope somebody knowledgeable is able to help me. Thank you very much in advance!
Reply
#2
Sorry to bump this. If my above question is not possible at the moment and would require changes in the kodi source code itself to make it possible, please let me know, too. As it stands I don't know if i'm asking the impossible or something so trivial nobody will bother to tell me.
Reply
#3
Hello,

I'm interested too....

Thanks !
Reply
#4
Hello !

Nobody could help us on this question ?
Just to tell us if we are doing wrong... or if it could be possible ?

Thanks you !
Reply
#5
Smile 
To answer my own question and if somebody is searching for the same answers like @badsheep and I did:

I found this thread:
https://forum.kodi.tv/showthread.php?tid...pid3037137

where the user @mvdwetering answered a question that one "can get more information about the subtitles through the JSONRPC interface. More specifically the Player.GetProperties call." He also linked to an addon he wrote, which is coincidentally the solution I had wanted to write myself.

So kindly look at his code to see how it is done:
https://github.com/mvdwetering/service.saasbops

I forked his addon and did change it a bit, to work not only for series stored in the library, but for series which are accessed using the video node, too. You can find my changes here:
https://github.com/SlrG/service.saasbops
Reply

Logout Mark Read Team Forum Stats Members Help
how to get full title of language/subtitle stream *does nobody have an idea? :( *0