caronc / nzb-subliminal

Fetches subtitles for the videos it's provided. It can be easily integrated into NZBGet and SABnzbd too.
GNU General Public License v3.0
102 stars 14 forks source link

Can't find video files if search path has a trailing slash in Windows #64

Closed caronc closed 6 years ago

caronc commented 6 years ago

Assuming the directory 'C:\MyVideos' has video files in it; the following command will successfully search for subtitles:

python Subliminal.py -D -s -f -S "C:\MyVideos"

However, the following command will find no videos at all:

python Subliminal.py -D -s -f -S "C:\MyVideos\"

This isn't an issue for Mac/Linux users; but affects the Microsoft users.

caronc commented 6 years ago

As it turns out "C:\MyVideos\" consists of a backslash before the final quote. This is effectively escaping' the quote which tells Microsoft that you want the quote to remain present. The reason no files are found because the directory C:\MyVideos" won't exist (because the trailing quote).