Browse Source

Fix scanning of DVD (VIDEO_TS) files

This fixes issue
https://github.com/RuudBurger/CouchPotatoServer/issues/3609
Thanks to @rhodespa
pull/5150/head
h3llrais3r 10 years ago
parent
commit
27b8c98b09
  1. 7
      couchpotato/core/plugins/scanner.py

7
couchpotato/core/plugins/scanner.py

@ -797,6 +797,10 @@ class Scanner(Plugin):
identifier = file_path.replace(folder, '').lstrip(os.path.sep) # root folder
identifier = os.path.splitext(identifier)[0] # ext
# Exclude file name path if needed (f.e. for DVD files)
if exclude_filename:
identifier = identifier[:len(identifier) - len(os.path.split(identifier)[-1])]
# Make sure the identifier is lower case as all regex is with lower case tags
identifier = identifier.lower()
@ -805,9 +809,6 @@ class Scanner(Plugin):
identifier = path_split[-2] if len(path_split) > 1 and len(path_split[-2]) > len(path_split[-1]) else path_split[-1] # Only get filename
except: pass
if exclude_filename:
identifier = identifier[:len(identifier) - len(os.path.split(identifier)[-1])]
# multipart
identifier = self.removeMultipart(identifier)

Loading…
Cancel
Save