Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

b2ae4c1 Improve checkSubtitlesExists() functionnality introduces regression #113

Closed
pmorch opened this issue May 12, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@pmorch
Copy link

pmorch commented May 12, 2024

Commit b2ae4c1 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'
@emericg
Copy link
Owner

emericg commented May 13, 2024

Indeed, every combination of separator symbols and language codes were tested, but not the base name + .srt :)
Thanks for noticing, this should be fixed in the latest commit!

@emericg emericg added the bug Something isn't working label May 13, 2024
@emericg emericg closed this as completed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants