Esempio n. 1
0
 def initialise(self):
     global startup
     log('## Checking for downloading mode...')
     args = ['silent', 'mode', 'mediatype', 'dbid']
     for item in sys.argv:
         arg = item.split('=')
         i = arg[0]
         if arg[0] in args:
             j = arg[1]
             startup.update({arg[0]: arg[1]})
     if startup['mediatype'] and (startup['mediatype']
                                  not in ['tvshow', 'movie', 'musicvideo']):
         log(
             'Error: invalid mediatype, must be one of movie, tvshow or musicvideo',
             xbmc.LOGERROR)
         return False
     elif startup['dbid'] == '':
         dialog_msg('okdialog', line1=__localize__(32084))
         log(
             'Error: no valid dbid recieved, item must be scanned into library.',
             xbmc.LOGERROR)
         return False
     try:
         # Creates temp folder
         self.fileops = fileops()
     except CreateDirectoryError, e:
         log('Could not create directory: %s' % str(e))
         return False
 def initialise(self):
     global startup
     log('## Checking for downloading mode...')
     args = ['silent', 'mode', 'mediatype', 'dbid']
     for item in sys.argv:
         arg = item.split('=')
         i = arg[0]
         if arg[0] in args:
             j = arg[1]
             startup.update({arg[0]:arg[1]})
     if startup['mediatype'] and startup['mediatype'] not in ['tvshow', 'movie', 'musicvideo']:
         log('Error: invalid mediatype, must be one of movie, tvshow or musicvideo', xbmc.LOGERROR)
         return False
     try:
         # Creates temp folder
         self.fileops = fileops()
     except CreateDirectoryError, e:
         log('Could not create directory: %s' % str(e))
         return False
 def initialise(self):
     global startup
     log('## Checking for downloading mode...')
     for item in sys.argv:
         arg = item.split('=')
         if arg[0] in ['silent', 'mode', 'mediatype', 'dbid']:
             startup.update({arg[0]:arg[1]})
     if startup['mediatype'] and (startup['mediatype'] not in ['tvshow', 'movie', 'musicvideo']):
         log('Error: invalid mediatype, must be one of movie, tvshow or musicvideo', xbmc.LOGERROR)
         return False
     elif startup['dbid'] == '':
         dialog_msg('okdialog',
                    line1 = __localize__(32084))
         log('Error: no valid dbid recieved, item must be scanned into library.', xbmc.LOGERROR)
         return False
     try:
         # Creates temp folder
         self.fileops = fileops()
     except CreateDirectoryError, e:
         log('Could not create directory: %s' % str(e))
         return False