Changed so that if no subs are found empty string is returned, and changed the directory for shows
This commit is contained in:
@@ -10,7 +10,7 @@ from fuzzywuzzy import process
|
|||||||
from langdetect import detect
|
from langdetect import detect
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
showDir = '/Volumes/media/tv/'
|
showDir = '/media/hdd1/tv/'
|
||||||
dbPath = 'shows.db'
|
dbPath = 'shows.db'
|
||||||
mediaExtensions = ['mkv', 'mp4', 'avi']
|
mediaExtensions = ['mkv', 'mp4', 'avi']
|
||||||
subExtensions = ['srt']
|
subExtensions = ['srt']
|
||||||
@@ -24,7 +24,7 @@ def removeUploader(mediaItem):
|
|||||||
uploader, ext = match.group(0).split('.')
|
uploader, ext = match.group(0).split('.')
|
||||||
return uploader
|
return uploader
|
||||||
|
|
||||||
return subtitles
|
return ''
|
||||||
|
|
||||||
def getLanguage(path, subtitles):
|
def getLanguage(path, subtitles):
|
||||||
f = open(path + subtitles, 'r', encoding= 'ISO-8859-15')
|
f = open(path + subtitles, 'r', encoding= 'ISO-8859-15')
|
||||||
|
|||||||
Reference in New Issue
Block a user