elif opts.guess and len(args) < 1: sys.exit(u'--guess requires <guess pattern>') elif opts.bulk and len(args) < 2: sys.exit(u'requires <imdb id> <directory>') tv_marker = (opts.tv or opts.season or opts.episode) and '"' or '' if opts.rom_drive is not None: driveset = True fxd = FxdImdb() if opts.add: fxd.setFxdFile(args[0]) fxd.setFxdFile(arg[0]) if fxd.isDiscset() is None: sys.exit(u'Fxd file is not valid, updating failed') elif fxd.isDiscset(): fxd.setDiscset(opts.rom_drive, None) else: type = 'file' if arg[1].find('[dvd]') != -1: type = 'dvd' if arg[1].find('[vcd]') != -1: type = 'vcd' id = abs( Random() * 100 ) if driveset: video = makeVideo(type, 'f'+str(id), arg[1], device=opts.rom_drive) else: video = makeVideo(type, 'f'+str(id), arg[1]) fxd.setVideo(video) fxd.writeFxd()
if task: usage() task = 'guess' search_arg = a if o == '--rom-drive': drive = a driveset = TRUE fxd = FxdImdb() if task == 'add': if len(args) == 2: usage() fxd.setFxdFile(arg[0]) if fxd.isDiscset() == TRUE: fxd.setDiscset(drive, None) elif fxd.isDiscset() == FALSE: type = 'file' if arg[1].find('[dvd]') != -1: type = 'dvd' if arg[1].find('[vcd]') != -1: type = 'vcd' id = abs(Random() * 100) if driveset == TRUE: video = makeVideo(type, 'f' + str(id), arg[1], device=drive) else: video = makeVideo(type, 'f' + str(id), arg[1]) fxd.setVideo(video) else: print 'Fxd file is not valid, updating failed' sys.exit(1)
elif opts.guess and len(args) < 1: sys.exit(u'--guess requires <guess pattern>') elif opts.bulk and len(args) < 2: sys.exit(u'requires <imdb id> <directory>') tv_marker = (opts.tv or opts.season or opts.episode) and '"' or '' if opts.rom_drive is not None: driveset = True fxd = FxdImdb() if opts.add: fxd.setFxdFile(args[0]) fxd.setFxdFile(arg[0]) if fxd.isDiscset() is None: sys.exit(u'Fxd file is not valid, updating failed') elif fxd.isDiscset(): fxd.setDiscset(opts.rom_drive, None) else: type = 'file' if arg[1].find('[dvd]') != -1: type = 'dvd' if arg[1].find('[vcd]') != -1: type = 'vcd' id = abs(Random() * 100) if driveset: video = makeVideo(type, 'f' + str(id), arg[1], device=opts.rom_drive) else: