Remove file_type references
This commit is contained in:
@@ -89,19 +89,12 @@ class MetaDataBase(Plugin):
|
|||||||
def getThumbnail(self, movie_info = None, data = None, wanted_file_type = 'poster_original'):
|
def getThumbnail(self, movie_info = None, data = None, wanted_file_type = 'poster_original'):
|
||||||
if not data: data = {}
|
if not data: data = {}
|
||||||
if not movie_info: movie_info = {}
|
if not movie_info: movie_info = {}
|
||||||
file_types = fireEvent('file.types', single = True)
|
|
||||||
file_type = {}
|
|
||||||
|
|
||||||
for ft in file_types:
|
|
||||||
# TODO: change type to "image_"+wanted_file_type
|
|
||||||
if ft.get('identifier') == wanted_file_type:
|
|
||||||
file_type = ft
|
|
||||||
break
|
|
||||||
|
|
||||||
# See if it is in current files
|
# See if it is in current files
|
||||||
for cur_file in data.get('files', []):
|
files = data.get('files', {})
|
||||||
if cur_file.get('type_id') is file_type.get('id') and os.path.isfile(cur_file.get('path')):
|
if files.get('image_'+wanted_file_type):
|
||||||
return cur_file.get('path')
|
if os.path.isfile(files['image_'+wanted_file_type][0]):
|
||||||
|
return files['image_'+wanted_file_type][0]
|
||||||
|
|
||||||
# Download using existing info
|
# Download using existing info
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user