Code: Select all
<dir> Dead Man Down (2013) BRRiP XViD DD5_1 Custom NLSubs _=-_lt_ Q_o_Q _gt_-=_
<dir> XD607ebb-BRc59935-5155473f-1c5f49
<file> XD607ebb-BRc59935-5155473f-1c5f49.avi
Code: Select all
info Tue Jul 16 2013 21:09:43 VideoSort: Move satellites for /share/Download/movie/Dead Man Down (2013) BRRiP XViD DD5_1 Custom NLSubs _=-_lt_ Q_o_Q _gt_-=_/XD607ebb-BRc59935-5155473f-1c5f49/XD607ebb-BRc59935-5155473f-1c5f49.avi
info Tue Jul 16 2013 21:09:43 VideoSort: Moved: /share/Download/test/Xd607Ebb-Brc59935-5155473F-1C5F49 (2013).avi
info Tue Jul 16 2013 21:09:43 VideoSort: destination path: /share/Download/test/Xd607Ebb-Brc59935-5155473F-1C5F49 (2013).avi
info Tue Jul 16 2013 21:09:43 VideoSort: path after cleanup: Xd607Ebb-Brc59935-5155473F-1C5F49 (2013).avi
info Tue Jul 16 2013 21:09:43 VideoSort: path after subst: Xd607Ebb-Brc59935-5155473F-1C5F49 (2013)..avi
info Tue Jul 16 2013 21:09:43 VideoSort: t (%y).%ext
info Tue Jul 16 2013 21:09:43 VideoSort: }
info Tue Jul 16 2013 21:09:43 VideoSort: [1.00] "type": "movie"
info Tue Jul 16 2013 21:09:43 VideoSort: [1.00] "year": 2013,
info Tue Jul 16 2013 21:09:43 VideoSort: [1.00] "format": "BluRay",
info Tue Jul 16 2013 21:09:43 VideoSort: [0.80] "title": "XD607ebb-BRc59935-5155473f-1c5f49",
info Tue Jul 16 2013 21:09:43 VideoSort: ],
info Tue Jul 16 2013 21:09:43 VideoSort: "Lithuanian"
info Tue Jul 16 2013 21:09:43 VideoSort: [0.80] "language": [
info Tue Jul 16 2013 21:09:43 VideoSort: [1.00] "container": "avi",
info Tue Jul 16 2013 21:09:43 VideoSort: [1.00] "videoCodec": "XviD",
info Tue Jul 16 2013 21:09:43 VideoSort: [1.00] "mimetype": "video/x-msvideo",
info Tue Jul 16 2013 21:09:43 VideoSort: {
info Tue Jul 16 2013 21:09:43 VideoSort: filename: /share/Download/movie/Dead Man Down (2013) BRRiP XViD DD5_1 Custom NLSubs _=-_lt_ Q_o_Q _gt_-=_/XD607ebb-BRc59935-5155473f-1c5f49/XD607ebb-BRc59935-5155473f-1c5f49.avi
Code: Select all
<dir> 4242345345345
<file> Game of Thrones S02E01 720p BluRay X264-REWARD.mkv
Code: Select all
<dir> Dexter S02E01 720p BluRay X264-REWARD
<file> reward-dexter.s03e01.mkv
Code: Select all
<dir> Game.of.Thrones
<file> Game of Thrones S02E01 720p BluRay X264-REWARD.mkv
<file> Game of Thrones S02E02 720p BluRay X264-REWARD.mkv
<file> Game of Thrones S02E03 720p BluRay X264-REWARD.mkv
Code: Select all
<dir> Game.of.Thrones
<file> GOT0301.mkv
<file> GOT0302.mkv
<file> GOT0303.mkv
Code: Select all
<dir> Game of Thrones S02E01 720p BluRay X264-REWARD
<file> 4242345345345
Code: Select all
<dir> Game of Thrones S02E01 720p BluRay X264-REWARD
<dir> aaaaaaaa
<file> ewerrgdfghgh.mkv
Code: Select all
childEnVars.Clear()
childEnVars.Put('NZBPP_DIRECTORY', os.path.split(path)[0])
childEnVars.Put('NZBPP_NZBFILENAME', os.path.split(path)[1] + '.nzb')
finaldirectory = childEnVars.Get('NZBPP_DIRECTORY')
originalname = childEnVars.Get('NZBPP_NZBFILENAME')
Code: Select all
import childEnVars
...
# We need a means to let the parent and interested
# sibling processes know what the new names are.
#
# The following will not work because chained
# scripts are not run within the same environment
# os.environ['NZBPP_DIRECTORY'] = os.path.split(path)[0])
# os.environ['NZBPP_NZBFILENAME'] = os.path.split(path)[1] + '.nzb')
# os.environ['NZBPP_NZBNAME'] = os.path.split(path)[1])
# Instead we'll stow the renamed file names into a file
# where the parent and sibling processes can retrieve them.
childEnVars.Clear()
childEnVars.Put('NZBPP_DIRECTORY', os.path.split(path)[0])
childEnVars.Put('NZBPP_NZBFILENAME', os.path.split(path)[1] + '.nzb')
childEnVars.Put('NZBPP_NZBNAME', os.path.split(path)[1])
Code: Select all
def set_dest_dir(default_dest_dir):
# If it is optioned and we can do it, use the category
# destination directory
if use_cat_dest_dir:
# See if the category is available, and then if there is
# a category destination specified for it
category = os.environ.get('NZBPP_CATEGORY', None)
if category is not None:
regex = re.compile(r"NZBOP_CATEGORY(\d+)_NAME")
for k, v in os.environ.items():
r = regex.search(k)
if r is not None:
if category == v:
category_dest_dir_key = "NZBOP_CATEGORY%s_DESTDIR" % r.groups()[0]
category_dest_dir = os.environ.get(category_dest_dir_key, None)
if category_dest_dir is not None and len(category_dest_dir) > 0:
# Check if there are substitution macros
if category_dest_dir.startswith("${MainDir)"):
ddir = os.environ.get("NZBOP_MAINDIR", "")
category_dest_dir = category_dest_dir.replace("${MainDir)", ddir)
elif category_dest_dir.startswith("${DestDir)"):
ddir = os.environ.get("NZBOP_DESTDIR", "")
category_dest_dir = category_dest_dir.replace("${DestDir)", ddir)
if verbose:
print "[INFO] category_dest_dir = \"%s\"" % category_dest_dir
return category_dest_dir
return default_dest_dir
Code: Select all
dest_dir = dated_dir
dest_dir = movies_dir
dest_dir = series_dir
Code: Select all
dest_dir = set_dest_dir(dated_dir)
dest_dir = set_dest_dir(movies_dir)
dest_dir = set_dest_dir(series_dir)
That is not what I am seeing. VideoSort is putting the files into "Z:\Media\TV" when the expectation is that they be placed into "Z:\Media\dailycolbert".hugbug wrote:Thanks for your suggestions and changes.
2. the set_dest_dir can be much simpler. The files are already in category destination directory.
Code: Select all
Wed Aug 28 11:08:47 2013 INFO Moving completed files for The.Daily.Show.2013.08.15.Simon.Pegg.720p.HDTV.x264-LMAO
Wed Aug 28 11:08:47 2013 INFO Moving file the.daily.show.2013.08.15.simon.pegg.720p.hdtv.x264-lmao.nfo to Z:\Media\dailycolbert\The.Daily.Show.2013.08.15.Simon.Pegg.720p.HDTV.x264-LMAO
Wed Aug 28 11:08:47 2013 INFO Moving file The.Daily.Show.2013.08.15.Simon.Pegg.720p.HDTV.x264-LMAO.nzb to Z:\Media\dailycolbert\The.Daily.Show.2013.08.15.Simon.Pegg.720p.HDTV.x264-LMAO
Wed Aug 28 11:08:47 2013 INFO Moving file the.daily.show.2013.08.15.simon.pegg.720p.hdtv.x264-lmao.sample.mkv to Z:\Media\dailycolbert\The.Daily.Show.2013.08.15.Simon.Pegg.720p.HDTV.x264-LMAO
Wed Aug 28 11:08:49 2013 INFO Moving file the.daily.show.2013.08.15.simon.pegg.720p.hdtv.x264-lmao.sample.srs to Z:\Media\dailycolbert\The.Daily.Show.2013.08.15.Simon.Pegg.720p.HDTV.x264-LMAO
Wed Aug 28 11:08:49 2013 INFO Moving file the.daily.show.2013.08.15.simon.pegg.720p.hdtv.x264-lmao.srr to Z:\Media\dailycolbert\The.Daily.Show.2013.08.15.Simon.Pegg.720p.HDTV.x264-LMAO
Wed Aug 28 11:08:49 2013 INFO Move for The.Daily.Show.2013.08.15.Simon.Pegg.720p.HDTV.x264-LMAO successful
Code: Select all
Wed Aug 28 11:08:49 2013 INFO VideoSort: destination path: Z:\Media/TV\The Daily Show\The.Daily.Show.2013.08.15.mkv
Wed Aug 28 11:08:49 2013 INFO VideoSort: Moved: Z:\Media/TV\The Daily Show\The.Daily.Show.2013.08.15.mkv
Users browsing this forum: No registered users and 23 guests