Closed nicoulaj closed 12 years ago
Well nothing changed here so that's weird.
➜ bin ./subliminal -l en -l fr -m /mnt/syno/video/Series/The\ Big\ C/Season\ 03 -s opensubtitles --force
**************************************************
Downloaded 2 subtitle(s) for 2 video(s)
/mnt/xxxx/video/The Big C/Season 03/S03E07 - How Bazaar - HD TV.en.srt from opensubtitles
/mnt/xxxx/video/The Big C/Season 03/S03E08 - Killjoy - HD TV.en.srt from opensubtitles
**************************************************
➜ bin ./subliminal -l en -l fr -m /mnt/syno/video/Series/The\ Big\ C/Season\ 03 -s opensubtitles
No subtitles downloaded
That works for me, using latest from develop branch.
If you can reproduce this, show me full log by adding -v -v
to the command line
Oh yeah now I remember :) That's a feature not a bug : https://github.com/Diaoul/subliminal/blob/develop/subliminal/videos.py#L220 When you give a single file to subliminal, we trust your input and search for subtitles anyway. If you already have good subtitles, why would you search again this specific file? If not to override existing subtitles.
Makes sense :)
Actually the issue seems to be trickier than that: only some of the subtitles always get replaced. Here is a log with several invokations, you can see 6 of the subtitles always get replaced.
After taking a closer look, the 6 subtitles in question are iso-8859-1 encoded, the other ones are all UTF-8. Is this behaviour expected ?
Indeed. Try to reproduce this with the -m
flag. I think this issue is specific to multi=False
.
Should subliminal convert subtitles to utf-8 after download?
About search the file again for the subtitles.
In my case I've a cron on my download folder every 15 minutes (a find with an exec :) ) that search for subtitles. It would be nice to add the option that if there is one .srt, subliminal doesn't search for a new one :).
Well that's a waste because subliminal is optimized to be run on multiple files at the same time.
I'm reproducing it with the -m
flag too.
I don't think it is subliminal's job to convert subtitles, but its behaviour should not be dependant on the file encoding to me. Besides, converting subtitles does not solve the issue if there are subtiles downloaded by other means.
Try with 2 languages
I know, but i'm thinking for example when a TVShow's downloaded at 4AM (europe), and the subtitle is released two, three, four... five hours later. When I wake up I have my TVShow organized with his subtitle on my NAS.
BTW if you think that it's not useful to develop, I can do an "if" on my cron and without problems :).
That's the --force option. And it exists. What's your python version?
I bet you use 2.6
Yep, 2.6.6
I think what @cristiangauma is asking for is a --no-force
option to inhibit the "always force when single file" behaviour...
I tested with -m
and multiple languages, and the bug does not occur.
Also, I use Python 2.7.3.
Ok great, so you can reproduce my behavior. I'll be able to fix this :)
I think the comes from the changes I pulled from wackou's branch. I need to try to optimize the scan of external subtitles a bit.
Could you try with latest of develop? 4a177b60088d60fe03a5786ef3d18862167101eb should fix this.
Yep, it works fine now. Thanks !
Maybe I'm misunderstanding the meaning of the
--force
option, but whether I use it or not,srt
files are always replaced as if it was always on. Also, it seems to be a regression introduced by the most recent fixes indevelop
as I cannot reproduce it on 0.6.0.