Move root creation to metadata base
This commit is contained in:
@@ -40,7 +40,7 @@ class MetaDataBase(Plugin):
|
|||||||
# Get file path
|
# Get file path
|
||||||
name = getattr(self, 'get' + file_type.capitalize() + 'Name')(meta_name, root)
|
name = getattr(self, 'get' + file_type.capitalize() + 'Name')(meta_name, root)
|
||||||
|
|
||||||
if name and self.conf('meta_' + file_type):
|
if name and (self.conf('meta_' + file_type) or self.conf('meta_' + file_type) is None):
|
||||||
|
|
||||||
# Get file content
|
# Get file content
|
||||||
content = getattr(self, 'get' + file_type.capitalize())(movie_info = movie_info, data = group)
|
content = getattr(self, 'get' + file_type.capitalize())(movie_info = movie_info, data = group)
|
||||||
@@ -60,8 +60,8 @@ class MetaDataBase(Plugin):
|
|||||||
except:
|
except:
|
||||||
log.error('Unable to create %s file: %s', (file_type, traceback.format_exc()))
|
log.error('Unable to create %s file: %s', (file_type, traceback.format_exc()))
|
||||||
|
|
||||||
def getRootName(self, data):
|
def getRootName(self, data = {}):
|
||||||
return
|
return os.path.join(data['destination_dir'], data['filename'])
|
||||||
|
|
||||||
def getFanartName(self, name, root):
|
def getFanartName(self, name, root):
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -12,9 +12,6 @@ log = CPLog(__name__)
|
|||||||
|
|
||||||
class XBMC(MetaDataBase):
|
class XBMC(MetaDataBase):
|
||||||
|
|
||||||
def getRootName(self, data = {}):
|
|
||||||
return os.path.join(data['destination_dir'], data['filename'])
|
|
||||||
|
|
||||||
def getFanartName(self, name, root):
|
def getFanartName(self, name, root):
|
||||||
return self.createMetaName(self.conf('meta_fanart_name'), name, root)
|
return self.createMetaName(self.conf('meta_fanart_name'), name, root)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user