OpenSubtitlesDownload icon indicating copy to clipboard operation
OpenSubtitlesDownload copied to clipboard

b2ae4c1 Improve checkSubtitlesExists() functionnality introduces regression

Open pmorch opened this issue 1 month ago • 0 comments

Commit b2ae4c1f34ba6344a94768f566fdbc8940b0c936 has introduced a regression in that it doesn't detect a downloaded subtitle - at least not in the way I use it.

Test case:

$ mkdir /tmp/movies

$ dd if=/dev/zero of=/tmp/movies/The\ Terror\ \(1963\).mkv bs=1024 count=2000
2000+0 records in
2000+0 records out
2048000 bytes (2.0 MB, 2.0 MiB) copied, 0.00466506 s, 439 MB/s

# Version 6.2 downloads once
$ python3 ./OpenSubtitlesDownload-6.2/OpenSubtitlesDownload.py --skip --auto --cli -u pmorch -p bogus /tmp/movies
>> Downloading 'en' subtitles for 'The Terror (1963).mkv'

# And notices it already exists when run the second time
$ python3 ./OpenSubtitlesDownload-6.2/OpenSubtitlesDownload.py --skip --auto --cli -u pmorch -p bogus /tmp/movies
>> A subtitles file already exists for this file:
/tmp/movies/The Terror (1963).srt

# But version b2ae4c1 keeps downloading it over and over again
$ python3 ./b2ae4c1/OpenSubtitlesDownload.py --skip --auto --cli -u pmorch -p bogus /tmp/movies
>> Downloading 'en' subtitles for 'The Terror (1963).mkv'

$ python3 ./b2ae4c1/OpenSubtitlesDownload.py --skip --auto --cli -u pmorch -p bogus /tmp/movies
>> Downloading 'en' subtitles for 'The Terror (1963).mkv'

pmorch avatar May 12 '24 20:05 pmorch