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

UPPERCASE media extensions causing full media files to be read in like nfo files, causing critical failures #124

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

almightiest
Copy link

@almightiest almightiest commented Jun 14, 2022

This simple fix will avoid major issues trying to read in full video files like they're NFO files. Note: I tested this with fake names that happened to be a movie, but the same applies to any TV show episode video files, too

Working code:

>>> path1="/mnt/storage3/temp/movies_tests/Goonies 1986 Test Movie/test movie.mkv"
>>> fileExtension = path1.split(".")[-1]
>>> fileExtension
'mkv'
>>> nfoFile = path1.replace('.'+fileExtension, '.nfo')
>>> nfoFile
'/mnt/storage3/temp/movies_tests/Goonies 1986 Test Movie/test movie.nfo'
>>> path1="/mnt/storage3/temp/movies_tests/Goonies 1986 Test Movie/test movie.MKV"
>>> fileExtension = path1.split(".")[-1]
>>> fileExtension
'MKV'
>>> nfoFile = path1.replace('.'+fileExtension, '.nfo')
>>> nfoFile
'/mnt/storage3/temp/movies_tests/Goonies 1986 Test Movie/test movie.nfo'

Old code, not working, as it attempts to read in the MKV file instead of an nfo file:

>>> path1="/mnt/storage3/temp/movies_tests/Goonies 1986 Test Movie/test movie.MKV"
>>> fileExtension = path1.split(".")[-1].lower()
>>> fileExtension
'mkv'
>>> nfoFile = path1.replace('.'+fileExtension, '.nfo')
>>> nfoFile
'/mnt/storage3/temp/movies_tests/Goonies 1986 Test Movie/test movie.MKV'

…e nfo files, causing critical import failures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant