Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Do not download multiple subtitles of same language #661

Closed
Y4kuzi opened this issue Aug 12, 2019 · 10 comments
Closed

Do not download multiple subtitles of same language #661

Y4kuzi opened this issue Aug 12, 2019 · 10 comments

Comments

@Y4kuzi
Copy link

Y4kuzi commented Aug 12, 2019

I don't want Sub-Zero to download subtitles if there already is an .srt file present. For some reason, this is only possible if the subtitle file matches the exact filename.
The weird part is that the module subtitlehelpers successfully finds the subtitles, even if it doesn't match the exact filename, with the correct language.
The same thing happens when I change "eng" to "en".

Logs: https://pastebin.com/s4zUENek

And now suddenly it says the English language is missing, so it proceeds to download another one. Why does it do this, if it already found one?

In the Sub-Zero settings, I have the following relevant settings:

  • Don't search for subtitles if a subtitle in any configured language exists as: External subtitle
  • Don't search fo subtitles of a language if they already exist on the filesystem (metadata/filesystem)? --> How strict: any

But these settings don't seem to do anything at all. Same thing happens with all movies.
I hope this gets fixed soon.

@viking1304
Copy link

As far as I know, "any" means any of two other options:

  • exact: media filename match
  • loose: filename contains media filename

What you have is none of those:

Dead.Poets.Society.1989.720p.BluRay.x264.YIFY.mp4
Dead Poets Society (1989).eng.srt

You should have something like this for exact:

Dead Poets Society (1989) [720p BluRay x264 YIFY].mp4
Dead Poets Society (1989) [720p BluRay x264 YIFY].en.srt

Or this for loose:

Dead Poets Society (1989) [720p BluRay x264 YIFY].mp4
Dead Poets Society (1989).en.srt

"Any" should work with both of those.

@Y4kuzi
Copy link
Author

Y4kuzi commented Aug 12, 2019

I have hundreds of local subtitle files, I don't feel like renaming them all.
Sub-Zero already detects the file and the language, so it's not needed to download it again.

@pannal
Copy link
Owner

pannal commented Aug 13, 2019

"any" should pick up any subtitle inside a given folder, regardless of its name.

I'll check why subtitlehelpers finds the file, but is being ignored. Can I get a full log dump please?

@pannal
Copy link
Owner

pannal commented Aug 13, 2019

@Y4kuzi I've pushed a possible fix to develop-2.6. Can you try it? (https://github.com/pannal/Sub-Zero.bundle/wiki/Developers-Corner#manualdevelopmenttesting-installation)

pannal added a commit that referenced this issue Aug 13, 2019
pannal added a commit that referenced this issue Aug 13, 2019
@pannal
Copy link
Owner

pannal commented Aug 13, 2019

@Y4kuzi pushed a working fix to develop-2.6. Leaving the strictness at "any" might result in bad behaviour with TV shows, depending on your folder structure, though.

For movies this should work properly.

@pannal
Copy link
Owner

pannal commented Aug 13, 2019

I might be able to improve existing subtitle detection for TV shows later on.

@pannal
Copy link
Owner

pannal commented Aug 13, 2019

As far as I know, "any" means any of two other options:

@viking1304 no, "any" means any subtitle file found in the current folder (or subfolder, as per config) will be considered correct for the current media.

@pannal pannal added bug and removed uncertain labels Aug 13, 2019
@viking1304
Copy link

@viking1304 no, "any" means any subtitle file found in the current folder (or subfolder, as per config) will be considered correct for the current media.

Now I know. Sorry if I made any confusion.

@Y4kuzi
Copy link
Author

Y4kuzi commented Aug 14, 2019

Seems to be fixed in develop-2.6, did some testing and it works as intended. I don't know about TV shows, but for movies it works great now.
In case no language code could be found in the subtitle filename, perhaps it could assume Subtitle Language (1)

@pannal
Copy link
Owner

pannal commented Aug 16, 2019

In case no language code could be found in the subtitle filename, perhaps it could assume Subtitle Language (1)

That should be the case. If it isn't, please post the logs for the corresponding item!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants