service.autosubs icon indicating copy to clipboard operation
service.autosubs copied to clipboard

Downloading subtitle popus is raised even if subtitles are exists

Open georgo opened this issue 10 years ago • 18 comments

Hi, I have TV Show and subtitles next to it, but this plugin always show popup to download subtitles - not only in case I don't have subtitles, but always.

See attached log, hope it helps. http://xbmclogs.com/show.php?id=228611

Happend to me to Gotham 13.1 on Windows 7 and on Android 4.2.2

Regards, Tomas K.

georgo avatar Jun 17 '14 04:06 georgo

Confirmed, will fix later today.

schumi2004 avatar Jun 17 '14 05:06 schumi2004

Just tested with some local files and didn't raised the popup to download subtitles. Is this still a bug or was fixed and the issue wasn't updated?

Mafarricos avatar Jun 20 '14 17:06 Mafarricos

Not sure, can't reproduce it.

schumi2004 avatar Jun 22 '14 06:06 schumi2004

It's still there. Will check tomorrow.

schumi2004 avatar Jun 22 '14 20:06 schumi2004

How you reproduced it?

Mafarricos avatar Jun 22 '14 20:06 Mafarricos

Reinstalled addon and played a series episode, happend every time. I know we're to look for and testing it as we speak to be sure it's solved.

schumi2004 avatar Jun 22 '14 20:06 schumi2004

OK, if you are looking at it, I will leave it to you. Thanks.

Mafarricos avatar Jun 22 '14 20:06 Mafarricos

It's pretty simple, change line 49 til 91 if I'm correct. Change true with false and vice versa. That should fix it. It did in other addon I modded

schumi2004 avatar Jun 22 '14 21:06 schumi2004

In default.py

schumi2004 avatar Jun 22 '14 21:06 schumi2004

Will check it. This only happens to TV shows, correct? Em 22/06/2014 22:04, "schumi2004" [email protected] escreveu:

In default.py

— Reply to this email directly or view it on GitHub https://github.com/amet/service.autosubs/issues/22#issuecomment-46792912 .

Mafarricos avatar Jun 22 '14 21:06 Mafarricos

I don't thing changing the true/false is the right thing.

For eg: if (movieFullPath.find("pvr://") > -1) and getSettingAsBool('ExcludeLiveTV'): Debug("isExcluded(): Video is playing via Live TV, which is currently set as excluded location.") return False

Here you are telling that if path has pvr:// and is set to exclude LiveTV you will return TRUE (changing from FALSE to TRUE).

If you return TRUE it will execute the code to get subtitles, no? Isn't the problem related to the OR in this line: if (xbmc.Player().isPlayingVideo() and totalTime > ExcludeTime and ((not xbmc.getCondVisibility("VideoPlayer.HasSubtitles")) or (check_for_specific and not specific_language in availableLangs)) and all(movieFullPath.find (v) <= -1 for v in ignore_words) and (isExcluded(movieFullPath)) ):

You want all to be to execute the automatic push no?

I will test it.

Mafarricos avatar Jun 23 '14 00:06 Mafarricos

@Georgo in AutoSubs do you have specific language activated, if so to what language?

I tested with a movie and a serie localy and if I have subtitles To my doesn't pop ups nothing.

Mafarricos avatar Jun 23 '14 00:06 Mafarricos

With or without language configured?

schumi2004 avatar Jun 23 '14 06:06 schumi2004

This is strange.

I tested it on a laptop with a clean XBMC install and reproduced it. I renamed files like this, and that worked while playing with autosubs settings, pref language etc. some.movie.name.2014.mkv some.movie.anem.2014.srt

Same test but now with subtitle file like this, and then it failes. some.movie.name.2014.en.srt

schumi2004 avatar Jun 23 '14 06:06 schumi2004

I played with preferred language setting https://github.com/amet/service.autosubs/pull/14 and noticed that it doesn't seem to function as intended. I added a debug line to see what language it selected but it never returned any value.

Debug("[AutoSubsPlayer] Language selected: '%s'" % specific_language)

schumi2004 avatar Jun 23 '14 07:06 schumi2004

Will try to test based in that, to see what's happening with specific_language

Mafarricos avatar Jun 23 '14 08:06 Mafarricos

Think it is corrected with this pull: https://github.com/amet/service.autosubs/pull/25

Mafarricos avatar Jun 23 '14 09:06 Mafarricos

Sometimes It seems I still get this problem, but only on a raspberry pi. With streams that load the subtitles at same time as video.

I will try to get the pattern, I don't know if a xbmc.sleep(2000) before vailableLangs = xbmc.Player().getAvailableSubtitleStreams() can prevent this problem, to delay and really load the subtitles before it gets if video has or not the subtitles?

Mafarricos avatar Jun 25 '14 17:06 Mafarricos