Fixes for desktop imports
This commit is contained in:
@@ -58,6 +58,7 @@ class Loader(object):
|
||||
pass
|
||||
# todo:: this needs to be more descriptive.
|
||||
log.error('Import error, remove the empty folder: %s' % plugin.get('module'))
|
||||
log.debug('Can\'t import %s: %s' % (module_name, traceback.format_exc()))
|
||||
except:
|
||||
log.error('Can\'t import %s: %s' % (module_name, traceback.format_exc()))
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class MetaDataBase(Plugin):
|
||||
log.error('Failed to update movie, before creating metadata: %s' % traceback.format_exc())
|
||||
|
||||
root_name = self.getRootName(release)
|
||||
name = os.path.basename(root_name)
|
||||
meta_name = os.path.basename(root_name)
|
||||
root = os.path.dirname(root_name)
|
||||
|
||||
movie_info = release['library'].get('info')
|
||||
@@ -37,7 +37,7 @@ class MetaDataBase(Plugin):
|
||||
for file_type in ['nfo', 'thumbnail', 'fanart']:
|
||||
try:
|
||||
# Get file path
|
||||
name = getattr(self, 'get' + file_type.capitalize() + 'Name')(name, root)
|
||||
name = getattr(self, 'get' + file_type.capitalize() + 'Name')(meta_name, root)
|
||||
|
||||
if name and self.conf('meta_' + file_type):
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import ntpath
|
||||
import os.path
|
||||
import zipfile
|
||||
|
||||
@@ -46,7 +45,7 @@ def split_path(path):
|
||||
"""
|
||||
result = []
|
||||
while True:
|
||||
head, tail = ntpath.split(path)
|
||||
head, tail = os.path.split(path)
|
||||
|
||||
# on Unix systems, the root folder is '/'
|
||||
if head == '/' and tail == '':
|
||||
|
||||
Reference in New Issue
Block a user