Jump to content

Subtitles with 4.0.20a


rhodges
 Share

Go to solution Solved by rhodges,

Recommended Posts

I'm not sure if it is my add-on that lists and changes subtitles, or something with 4.0.20a or add-on playback, but when I chose a subtitle, nothing changes. If I stop and start again, it will show the subtitles.

 

Everything worked in native mode and release version.

Link to comment
Share on other sites

Angelblue05

Your kodi version, please.

Are you direct playing? Please provide your kodi log. Which subtitles are you trying?

Link to comment
Share on other sites

Kodi 18.2 on am Nvidia shield.

 

I am using addon mode now. I was using native mode with 4.0.5 and it was working. This is the first time I tried addon.

 

It won't be until tomorrow before I can get the logs.

 

The files are mkv files. I chose a subtitle embedded or an external with the same behavior. They would be SSA, ass, or SRT subs.

 

Tomorrow I'll grab the logs, and reset and try native to see if it is that.

 

I'll also include more info on how I'm changing subtitles. I wrote an add-on a long time ago to display subs and let me change them. Maybe the way I'm doing that doesn't work with add-on playback.

Link to comment
Share on other sites

Angelblue05

There should be no difference between native and add-on playback at this point in 4.0.20

 

I have not had issues with subtitles. They always show up in my test. Anyway, I’ll wait for your reply.

Link to comment
Share on other sites

Is there anything sensitive in the log files, like api_key or anything that I should scrub before posting?

 

Here is the code in my add-on that sets the subtitles. Nothing special. I will PM you the log if you don't mind.

 

Edit: PM Sent

def loadSubtitles(list):

	player		= xbmc.Player()		
	streams		= player.getAvailableSubtitleStreams()
	
	items		= range(len(streams) + 1)
	
	li = xbmcgui.ListItem(label="Off")
	li.setProperty('stream', '-1')
	li.setProperty('action', 'setSubtitles')
	items[0] = li
	
	for i, item in enumerate(streams):
	
		li = xbmcgui.ListItem(label=item)
		li.setProperty('stream', str(i))
		li.setProperty('action', 'setSubtitles')
		
		items[i + 1] = li

	list.reset()
	list.addItems(items)
	
	return 0
	
def setSubtitles(name, stream):

	if stream >= 0:	
		player.setSubtitleStream(stream)		
	else:
		player.showSubtitles(False)
		
	xbmcgui.Dialog().notification('Subtitles', name, icon=xbmcgui.NOTIFICATION_INFO, time=3000)
Edited by rhodges
Link to comment
Share on other sites

  • Solution

You can close this out for now. This post is full of fail. I think it was just a time/perception issue, and the code that I used to change subtitle streams is old anyway. For now, lets just pretend I never created this post.

 

If I have issues, I'll research better and provide more information up front.

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...