jmunsch

for sweetb

Apr 10th, 2015
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.18 KB | None | 0 0
  1. #Cut the line:
  2.  
  3.     dst = os.path.join(dst, os.path.split(src)[1])
  4.  
  5. #And paste it like this:
  6.  
  7.         elif args.kind == 'multi':
  8.             src = args.dir
  9.             dst = copy_to_here
  10.             dst = os.path.join(dst, os.path.split(src)[1])
  11.  
  12. #The dst was being changed without any logging being done on it.
  13.  
  14.  
  15.  
  16.  
  17.     # parser = argparse.ArgumentParser(description='MediaMover v1.0')
  18.     # parser.add_argument('-f', '--file', help='Name of downloaded file (for single file torrents)')
  19.     # parser.add_argument('-d', '--dir', help='Directory where files are saved')
  20.     # parser.add_argument('-n', '--title', help='Title of torrent')
  21.     # parser.add_argument('-p', '--prevState', help='Previous state of torrent')
  22.     # parser.add_argument('-l', '--label', help='Label')
  23.     # parser.add_argument('-t', '--tracker', help='Tracker')
  24.     # parser.add_argument('-m', '--status', help='Status message string (same as status column)')
  25.     # parser.add_argument('-i', '--infoHash', help='hex encoded info-hash')
  26.     # parser.add_argument('-s', '--state', help='State of torrent')
  27.     # parser.add_argument('-k', '--kind', help='kind of torrent (single|multi)')
  28.  
  29. #src F:\Torrents\Complete\TvTorrents\Vikings.S03E07.HDTV.x264-KILLERS[ettv]
  30. #dst E:\TV Shows\unnamed
  31. #label TvTorrents
  32. #title Vikings.S03E07.HDTV.x264-KILLERS[ettv]
  33. #kind multi
  34.  
  35.  
  36. 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"
  37.  
  38.  
  39. #Also to make it easier for future trouble shooting:
  40.  
  41.  
  42. #withing the function `logTorrentInfo` add the following lines so it looks like:
  43.  
  44.     .
  45.     .
  46.     .
  47.     logger.info('Info Hash:      {}'.format(args.infoHash))
  48.     retry_string = ' '.join(sum([[str('--'+k), str(args.__dict__[k])] for k in args.__dict__.keys()],[]))
  49.     logger.info('retry:\n    Copy and paste:\n      python MediaMover.py --Test {}'.format(str(retry_string)))
  50.  
  51.     return
  52.     .
  53.     .
  54.  
  55. #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