[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.
Post Reply
oofti
Posts: 6
Joined: 17 Jan 2014, 09:51

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

Post by oofti » 18 Jan 2014, 18:56

Thanks for the speedy response hugbug.

apologies - bit of a newbie here and did not quite understand your explanation below.

In NZBGet, I have 'CATEGORIES' set up for movies and have 3 'CATEGORIES' set up for TV shows:

TV
TV > HD
TV > SD

All of the above have DestDir: /volume1/sickbeardtvshows

/volume1/sickbeardtvshows is the TV Download Dir in the Post-Processing section of Sickbeard where I do 'Rename Episodes' and 'Scan and Process'

Would you be kind enough to explain in a little more detail how I can avoid interfering with this TV renaming process?

--

With regards to the Movies in Videosort, I have left MoviesDir empty so that my Categories that I use for Movies will be used as defaults. (I trust this is the correct way to use this?)

I have been playing around with the settings but can't seem to get the right combination :?

I want the file name to equal the folder name and keep the original movie file extension

So i can achieve this:

[dir] /home/user/downloads/Movie.Example.2014
[file] /home/user/downloads/Movie.Example.2014/Movie.Example.2014.mkv

Would appreciate it if you could let me know the correct combination.

Hope that's ok

oofti

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

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

Post by hugbug » 18 Jan 2014, 21:18

Options to set in NZBGet

1. Why do you have 3 categories for tv? Does Sickbeard use them all? I thought you can configure only one category in SickBeard for nzbget integration.
Anyway if all your tv categories have the same settings you can achieve the same effect using only one category (call it "TV" or "tv") and setting its option CategoryX.Aliases to "TV > HD,TV > SD" or just "tv*".

2. If you want to use VideoSort only for movies and all movies have a specific category (not empty category), then you can choose VideoSort in this category's option DefScript (CategoryX.DefScript). Since VideoSort is not selected in TV-category nor in global DefScript, the files from SickBeard will not be processed by VideoSort.

3. If your movies don't have categories or you have many categories and you use VideoSort in global DefScript you need to tell TV-category to not use VideoScript. For this you choose required scripts in TV-category's DefScript. You have to select at least one script to override global DefScript, for example Logger.py or EMail.py or create an empty script.

Options to set in VideoSort
4.
oofti wrote: I want the file name to equal the folder name and keep the movie file extension and any included .sub/.idx files

Code: Select all

MoviesFormat=%dn
SatelliteExtensions=.sub,.idx
I have left MoviesDir empty so that my Categories that I use for Movies will be used as defaults. (I trust this is the correct way to use this?)
Yes, that's correct.

Important note: any changes made on options DefScript (global and CategoryX.DefScript) do not affect nzb-files which are already in queue. To test how your newly set options work you need to add new nzb-files to queue. For already queued files you can change associated post-processing scripts in download edit dialog on page Postprocess.

Tip: after you add new nzb-file to queue go to page Postproces in download edit dialog to check if the scripts (in particular VideoSort) were selected properly. You don't need to download nzb-file to see how it will be processed.

oofti
Posts: 6
Joined: 17 Jan 2014, 09:51

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

Post by oofti » 19 Jan 2014, 15:58

Thanks for the more detailed explanation hugbug - will play around a bit more with it

with regards to the movies format.

I had played around with the format you suggested below. However it seems to delete the actual folder in the process.

I end up with the Movie.Example.2014.mkv

but it appears as:

/home/user/downloads/Movie.Example.2014.mkv

when I actually wanted it as:

/home/user/downloads/Movie.Example.2014/Movie.Example.2014.mkv

What would I need to edit in order to preserve the folder name in the parent directory?
hugbug wrote:

Code: Select all

MoviesFormat=%dn
SatelliteExtensions=.sub,.idx
.
Thanks again

oofti

bgoldie
Posts: 20
Joined: 12 Jan 2013, 19:23

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

Post by bgoldie » 19 Jan 2014, 17:09

oofti wrote: What would I need to edit in order to preserve the folder name in the parent directory?
Try
MoviesFormat=%dn/%dn.%ext

oofti
Posts: 6
Joined: 17 Jan 2014, 09:51

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

Post by oofti » 19 Jan 2014, 18:02

Great - that worked thanks!

Code: Select all

G	Sun Jan 19 2014 17:54:12	VideoSort: Skipping clean up due to large files remaining in the directory
INFO	Sun Jan 19 2014 17:54:11	VideoSort: Moved: /volume1/synmovies/The.Color.Purple.1985.720p.BluRay.x264-AVCHD/The.Color.Purple.1985.720p.BluRay.x264-AVCHD.mkv
Can anyone explain why I am seeing the 'Skipping clean up due to large files remaining in the directory' - have never seen that before (it is not deleting sample file and files with extensions I have set to be deleted)

and how I can correct any setting that maybe causing this - could not see anything in my setup that would drigger this

I have it just set to keep .srt,.sub,.txt extensions and the default video extensions.

thanks again,

oofti

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

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

Post by hugbug » 19 Jan 2014, 20:51

oofti wrote:Can anyone explain why I am seeing the 'Skipping clean up due to large files remaining in the directory'
Because the destination and the source is the same directory the cleanup function of VideoSort can't process (delete) the directory.

oofti
Posts: 6
Joined: 17 Jan 2014, 09:51

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

Post by oofti » 19 Jan 2014, 22:40

hugbug wrote:
oofti wrote:Can anyone explain why I am seeing the 'Skipping clean up due to large files remaining in the directory'
Because the destination and the source is the same directory the cleanup function of VideoSort can't process (delete) the directory.
Oh. So this must have happened after I changed to MoviesFormat=%dn/%dn.%ext ?

I tried it with 'Clean Up' no and it did not delete the .nfo and other files as I would expect the script to do (as it is specified)

and it also created the filename with (2).mkv

Am struggling to find a way to get my desired result - i just want to have the filename (with original video extension)the same as the directory above, keep the directory above and keep the file extensions I specify for accompanying files

Is this achievable? and if so, please advise as I still do not understand what I am doing wrong.

thanks again,

oofti

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

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

Post by hugbug » 19 Jan 2014, 23:00

VideoSort works this way:
  1. Renames/moves video files to another directory under different names;
  2. Renames/moves satellite files;
  3. If option Cleanup is active - completely deletes the source directory with all remaining files. Unless the source directory has files larger than MinSize - this is a safety check.
As you see VideoSort is not designed to work in situations when destination directory is the same as source directory:
  • Renamed files may become suffix "(2)" if the files already were properly named - because VideoSort detects existing files in the destination directory and don't overwrite them unless you activate option overwrite, but this would probably produce an error when trying to rename file into the same name.
  • The safety check disables Cleanup

If you want to use VideoSort you should make sure the source and destination directories are different.
To achieve this you can either download into a location which is not you desired final location. Or alternatively you should add something (any character, word, etc., anything) to generated directory name, for example:

Code: Select all

MoviesFormat=%dn.final/%dn
(replace .final with anything you like).

oofti
Posts: 6
Joined: 17 Jan 2014, 09:51

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

Post by oofti » 20 Jan 2014, 20:50

Thanks again for taking the time to help me through it.

I eventually got what you are saying and have since changed the source directory to be different from my destination

and am pleased to say it is now working as expected.

Great script! Does exactly what I need and saves me having to do all the manual work :)

ntropy
Posts: 15
Joined: 26 Apr 2013, 19:12

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

Post by ntropy » 27 Jan 2014, 16:03

Can VideoSort be used to move DVD and Blu-ray folders, or is it just for files?

Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests