[PP-Script] VideoSort - better video sorting

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [PP-Script] VideoSort - better video sorting

Post by hugbug » 17 Feb 2015, 08:56

VideoSort reports Skipped-status if it didn't move any files. The script was executed but it thinks it had nothing to do. Check options VideoExtensions and MinSize and check the content of directory if it has matching files (extension and size). Also activate option Verbose, it provides more logging.

passie
Posts: 10
Joined: 14 Feb 2015, 10:03

Re: [PP-Script] VideoSort - better video sorting

Post by passie » 17 Feb 2015, 12:07

hugbug wrote:VideoSort reports Skipped-status if it didn't move any files. The script was executed but it thinks it had nothing to do. Check options VideoExtensions and MinSize and check the content of directory if it has matching files (extension and size). Also activate option Verbose, it provides more logging.
Same message with verbose on.

Code: Select all

INFO	Tue Feb 17 2015 13:03:20	Collection De Jungle Bende 2 (2015) added to history
INFO	Tue Feb 17 2015 13:03:20	Cleaning up download queue for De Jungle Bende 2 (2015)
INFO	Tue Feb 17 2015 13:03:20	Post-process-script videosort-kids/VideoSort.py for De Jungle Bende 2 (2015) skipped
INFO	Tue Feb 17 2015 13:03:18	Executing post-process-script videosort-kids/VideoSort.py for De Jungle Bende 2 (2015)
Contents of the folder:
Image

MinSize is default 100

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [PP-Script] VideoSort - better video sorting

Post by hugbug » 17 Feb 2015, 12:49

I think it's the upper case .ISO goes undetected by VideoSort. Add .ISO to VideoExtenstions and try again (via Post-process again in History).

passie
Posts: 10
Joined: 14 Feb 2015, 10:03

Re: [PP-Script] VideoSort - better video sorting

Post by passie » 17 Feb 2015, 13:24

hugbug wrote:I think it's the upper case .ISO goes undetected by VideoSort. Add .ISO to VideoExtenstions and try again (via Post-process again in History).

Yes, that did the trick.
Everything is cleaned and moved appropriately to there DestDir.
thank you very much.

Maybe for a next version add / change the following ?

Code: Select all

 
1113           # Check extension
1114            ext = os.path.splitext(old_filename)[1]
1115            if ext.lower() not in video_extensions: continue

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [PP-Script] VideoSort - better video sorting

Post by hugbug » 17 Feb 2015, 13:47

Yep, already did in my local version ;)

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [PP-Script] VideoSort - better video sorting

Post by hugbug » 17 Feb 2015, 20:43

Update - Version 6.0:
  • added support for "part"s; they are now treated as episodes;
  • fixed: certain words were stripped from titles;
  • updated guessit-library to the newest release (0.9.4);
  • new format specifiers "%cat" ("%.cat", etc.) to refer to category;
  • new format specifier "%up" to navigate to parent directory (useful with category's DestDir);
  • added workaround for titles starting with digits (guessit-library doesn't process them properly);
  • video extensions are now detected regardless of letter case.
For download link please see the first post.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [PP-Script] VideoSort - better video sorting

Post by hugbug » 17 Feb 2015, 20:59

passie wrote:I would like to download my movies in some tmp folder. Currently this is DestDir = /volume1/downloads/postproces
The unpack it and videosort should place them in either
/volume1/Kids or /Volume1/Movies depending on the category they are in.
With new format specifier %cat (added in VideoSort 6.0) you might be able to achieve the sorting without second script (VideoSort-Kids).
  • set DestDir in NZBGet to /volume1/unsorted (or /volume1/downloads/postproces if you like it better);
  • in the category Kids set the DestDir to empty;
  • your movies MUST have a category (for example Movies), set the DestDir of this category to empty;
  • set MoviesDir in VideoSort to /volume1;
  • use %cat in MoviesFormat in VideoSort, for example:

    Code: Select all

    MoviesFormat=%cat/%t (%y)
The movies will be saved into /volume1/Movies and Kids' videos will be saved to /volume1/Kids.

It's important that all downloads have categories. Otherwise they will be saved directly into /volume1. If that's a no-go you are better served with the two scripts (VideoSort and VideoSort-Kids).

A simple scan-script (option ScanScript) can be used to set "default" category if no category was set when adding the nzb-file. Something like this (not tested):

Code: Select all

#!/bin/sh
### NZBGET SCAN SCRIPT
if [ "$NZBNP_CATEGORY" = "" ]; then
    echo "[NZB] CATEGORY=default";
fi

passie
Posts: 10
Joined: 14 Feb 2015, 10:03

Re: [PP-Script] VideoSort - better video sorting

Post by passie » 17 Feb 2015, 21:21

Haha this is superb.
I was already digging myself and came up with

Code: Select all

 if os.environ['NZBPO_APPENDCATEGORIES'] == 'yes':
        destination = os.path.join(destination, os.environ['NZBPP_CATEGORY'])
else:
    destination = directory
But you beat me :-)
I'll let you know my findings tomorrow.
Many thanks already for your support

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [PP-Script] VideoSort - better video sorting

Post by hugbug » 17 Feb 2015, 21:30

Just got an idea that I could add an option to define "default" category to use for %cat, if current download has empty category.
Would decrease the risk for downloads to land in the root of MoviesDir.

passie
Posts: 10
Joined: 14 Feb 2015, 10:03

Re: [PP-Script] VideoSort - better video sorting

Post by passie » 18 Feb 2015, 08:21

hugbug wrote:Just got an idea that I could add an option to define "default" category to use for %cat, if current download has empty category.
Would decrease the risk for downloads to land in the root of MoviesDir.
Just to let you know, that everything is working as expected.
Kids are moved to /volume1/Kids & movies are moved to /volume1/Movies
For me personally this is great but as you said defining an default category could be better for others.
Once again thank you for your support. :!:

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests