Fixes for desktop imports

This commit is contained in:
Ruud
2012-05-02 21:35:37 +02:00
parent f7e4c8c987
commit 1345e984c4
3 changed files with 4 additions and 4 deletions

View File

@@ -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()))

View File

@@ -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):

View File

@@ -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 == '':