You can use %fn for the original filename.cheepa wrote:Is there a way for VideoSort not to rename a file? For example South.Park.S17E07.HDTV.x264-DHD, i don't want that file name to be renamed.
thanks
thanks bgoldie that worked.bgoldie wrote:You can use %fn for the original filename.cheepa wrote:Is there a way for VideoSort not to rename a file? For example South.Park.S17E07.HDTV.x264-DHD, i don't want that file name to be renamed.
thanks
I encountered a similar need to get the final filenames. My solution was to patch VideoSort.py. In the latest version of VideoSort.py, I replace (starting at line 1052):minamhere wrote:I am trying to create a post processing script that will run after VideoSort. I want to copy the resulting file to a secondary location.
Is there a way to determine the final filename (or final path) after VideoSort renames and moves it? I know I can get FINALDIR, but I can't figure out how to get the final filename.
Code: Select all
# Inform NZBGet about new destination path
finaldir = ''
uniquedirs = []
for filename in moved_dst_files:
dir = os.path.dirname(filename)
if dir not in uniquedirs:
uniquedirs.append(dir)
finaldir += '|' if finaldir != '' else ''
finaldir += dir
if finaldir != '':
print('[NZB] FINALDIR=%s' % finaldir)
Code: Select all
# Inform NZBGet about new destination path
finaldir = ''
uniquedirs = []
unique_names = set()
for filename in moved_dst_files:
dir = os.path.dirname(filename)
if dir not in uniquedirs:
uniquedirs.append(dir)
finaldir += '|' if finaldir != '' else ''
finaldir += dir
# Strip off the extension
path = os.path.splitext(filename)[0]
# Add the base name to the set. This is a no-op if the base name already exists
unique_names.add(os.path.split(path)[1])
finalnames = ''
for filename in unique_names:
if len(finalnames) == 0:
finalnames = filename
else:
finalnames += "|%s" % filename
if finaldir != '':
print('[NZB] FINALDIR=%s' % finaldir)
if len(finalnames) > 0:
print('[NZB] NZBPR_FINALENAMES=%s' % finalnames)
Code: Select all
finaldirectory = os.environ.get('NZBPP_FINALDIR', '')
if len(finaldirectory) == 0:
print('[INFO] No final directories passed to this post process script.')
sys.exit(POSTPROCESS_NONE)
finaldirectories = finaldirectory.split('|')
finalname = os.environ.get('NZBPR_FINALENAMES', '')
if len(finalname) == 0:
print('[INFO] No final file names passed to this post process script.')
sys.exit(POSTPROCESS_NONE)
finalnames = finalname.split('|')
for finaldirectory in finaldirectories:
if DEBUG:
print "finaldirectory = \"%s\"" % finaldirectory
if os.path.exists(finaldirectory):
for finalname in finalnames:
if DEBUG:
print "finalname = \"%s\"" % finalname
Use a separate category for Sickbeard and don't use VideoSort for that category (setup option CategoryX.DefScript, you need to choose at least one script to override global option DefScript if you selected VideoSort in global DefScript).oofti wrote:1) Can I turn off naming for TV shows/series - I already perform this function in Sickbeard.
That's in the options of VideoSort, please read option descriptions.2) How would I configure for movies? I want the file name to equal the folder name and keep the movie file extension and any included .sub/.idx files (any nfo,nzb,html files should be removed)
Users browsing this forum: No registered users and 34 guests