Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Cut the line:
- dst = os.path.join(dst, os.path.split(src)[1])
- #And paste it like this:
- elif args.kind == 'multi':
- src = args.dir
- dst = copy_to_here
- dst = os.path.join(dst, os.path.split(src)[1])
- #The dst was being changed without any logging being done on it.
- # parser = argparse.ArgumentParser(description='MediaMover v1.0')
- # parser.add_argument('-f', '--file', help='Name of downloaded file (for single file torrents)')
- # parser.add_argument('-d', '--dir', help='Directory where files are saved')
- # parser.add_argument('-n', '--title', help='Title of torrent')
- # parser.add_argument('-p', '--prevState', help='Previous state of torrent')
- # parser.add_argument('-l', '--label', help='Label')
- # parser.add_argument('-t', '--tracker', help='Tracker')
- # parser.add_argument('-m', '--status', help='Status message string (same as status column)')
- # parser.add_argument('-i', '--infoHash', help='hex encoded info-hash')
- # parser.add_argument('-s', '--state', help='State of torrent')
- # parser.add_argument('-k', '--kind', help='kind of torrent (single|multi)')
- #src F:\Torrents\Complete\TvTorrents\Vikings.S03E07.HDTV.x264-KILLERS[ettv]
- #dst E:\TV Shows\unnamed
- #label TvTorrents
- #title Vikings.S03E07.HDTV.x264-KILLERS[ettv]
- #kind multi
- python MediaMover.py --Test --dir "F:\Torrents\Complete\TvTorrents\Vikings.S03E07.HDTV.x264-KILLERS[ettv]" --title "Vikings.S03E07.HDTV.x264-KILLERS[ettv]" --label "TvTorrents" --kind "multi"
- #Also to make it easier for future trouble shooting:
- #withing the function `logTorrentInfo` add the following lines so it looks like:
- .
- .
- .
- logger.info('Info Hash: {}'.format(args.infoHash))
- retry_string = ' '.join(sum([[str('--'+k), str(args.__dict__[k])] for k in args.__dict__.keys()],[]))
- logger.info('retry:\n Copy and paste:\n python MediaMover.py --Test {}'.format(str(retry_string)))
- return
- .
- .
- #What this does is it will grab the items passed to it from command line or utorrent and put it inside the log file. And #then you would be able to copy and paste the command into terminal
Advertisement
Add Comment
Please, Sign In to add comment