[PP-Script] TurboSort - organize movies and tv shows

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: 7565
Joined: 09 Sep 2008, 11:58
Location: Germany

[PP-Script] TurboSort - organize movies and tv shows

Post by hugbug » 28 May 2013, 14:05

Update 11 July 2013: TurboSort has been replaced by the new script VideoSort discussed in the topic [PP-Script] VideoSort - better video sorting. TurboSort will no longer be developed.

This is a script for downloaded TV shows and movies. It uses scene-standard naming conventions (and a lot of nonstandard ones, too) to match TV shows and movies and rename/move/sort/organize them as you like.

This post-processing script is a wrapper for program turbo_sort written by Michael Riha. All credits go to original author.

The script is written in Python and works on all platforms supporting Python including Linux, Mac, Windows.

Info about turbo_sort (original program):
Author: Michael Riha (rihamichael@gmail.com).
Web-site and source code: http://code.google.com/p/turbo-sort/.
License: GPLv3 (http://www.gnu.org/licenses/gpl.html).
Version: 2.2.3 beta (release date: 2013-04-19).

Info about pp-script:
Author: Andrey Prygunkov (nzbget@gmail.com).
PP-Script Version: 2.2.3-1.

Download
Download link

Installation
  1. Download from the link above;
  2. Unpack into pp-scripts directory. Your pp-scripts directory now should have file "TurboSort.py";
  3. Open settings in web-interface and check/edit options for the script.
  4. That's it.
Examples of formatting strings:
  • %t (%y) - Pulp Fiction (1994).mkv;
  • %q/%t %y - 1080p/Pulp Fiction 1994.mkv;
  • %y/%t - 1994/Pulp Fiction.mkv;
  • %t/Season %s/%t S%0s E%0e - The Office/Season 6/The Office S06 E03.mkv;
  • Shows/%T Season %s/%t S%s E%e - Shows/THE OFFICE Season 6/The Office S6 E3.mkv;
  • %t/%t %sm %0d %y - The Daily Show/The Daily Show Mar 05 2012.mkv;
  • %t/%y/%fm/%t %y-%m-%d - The Daily Show/2012/March/The Daily Show 2012-3-5.mkv.

DominikReber
Posts: 2
Joined: 12 Apr 2013, 12:41

Re: [PP-Script] TurboSort - organize movies and tv shows

Post by DominikReber » 01 Jun 2013, 10:45

Hi

I dont seem to get this working.
I've installed the script, and I could choose it in nzbget.
Now when I download something, the download gets finished and then i get the blue "TurboSort: unknown" for the postprocess. The file just gets downloaded & unpacked into the "dst"-Folder, but no renaming happening.
I'm running the latest testing-build of nzbget.

One download I've added using couchpotato, and one nzb I've added manually. Both didnt work...

Any log for this somewhere?

Thanks

Dominik

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

Re: [PP-Script] TurboSort - organize movies and tv shows

Post by hugbug » 01 Jun 2013, 13:20

Check if the script has enough permissions.
Try to start the script from terminal and post its output here.

To get log activate all logging options:

Code: Select all

DetailTarget=both
InfoTarget=both
WarningTarget=both
ErrorTarget=both
ProcessLogKind=Info
Then post your log here.

naan
Posts: 17
Joined: 11 Jun 2013, 14:21

Re: [PP-Script] TurboSort - organize movies and tv shows

Post by naan » 11 Jun 2013, 14:28

Hi Hugbug,

I couldn't find any info if this script is also capable to fallback and use the nzb name for renaming when the filename is something like "345234523.mkv" for example ?
In sabnzbd you can use a feature called generic sorting for these cases.

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

Re: [PP-Script] TurboSort - organize movies and tv shows

Post by hugbug » 12 Jun 2013, 06:15

No but I'll ask Michael (the author) if he could add this.

naan
Posts: 17
Joined: 11 Jun 2013, 14:21

Re: [PP-Script] TurboSort - organize movies and tv shows

Post by naan » 17 Jun 2013, 19:31

Thanks for the effort ! Any news yet ?

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

Re: [PP-Script] TurboSort - organize movies and tv shows

Post by hugbug » 17 Jun 2013, 19:49

I'm waiting until my two other requests are implemented and then ask about this new feature.
I don't want stress him too much ;).

naan
Posts: 17
Joined: 11 Jun 2013, 14:21

Re: [PP-Script] TurboSort - organize movies and tv shows

Post by naan » 18 Jun 2013, 20:57

I'll keep an eye on this thread for any progress, thanks again for taking the request to the author !

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

Re: [PP-Script] TurboSort - organize movies and tv shows

Post by hugbug » 05 Jul 2013, 09:42

I'm thinking about improvements in the script.

Original turbo_sort script is designed to be run on the whole collection of media files with subfolders.

With NZBGet the script is called for each download and therefore has somewhat different requirements.

In the original script it would be probably difficult to use the nzb-name (also destination folder name) for renaming because the script doesn't know if it should take the name of direct parent folder or go higher in the folder tree. Example:

Code: Select all

<dir>   Video
<dir>      Series
<dir>         Game.of.Thrones.S03E10
<dir>             aaaaa
<file>                GOT0310.mkv
The original script is called with folder "Video" as parameter. It goes deeper the folder tree, find mkv-file and would take "aaaaa" as the name of download. In the NZBGet version the script is called with "Game.of.Thrones.S03E10" and could take this as download name.

I could ask the author to add an option to use the passed root directory name ("Game.of.Thrones.S03E10").

There are however other cases which make the thing complex:

1. The nzb-file doesn't have a meaningful name, for example 4242345345345.nzb.

Code: Select all

<dir>         4242345345345
<file>                Game of Thrones S02E01 720p BluRay X264-REWARD.mkv
The script should use the mkv-file name then.

2. The nzb-file has a meaningful name, but the video file has a bad name:

Code: Select all

<dir>         Dexter S02E01 720p BluRay X264-REWARD
<file>                reward-dexter.s03e01.mkv
The problem here is that video file match the pattern for a "good filename". The script thinks that the show name is "reward-dexter".

3. The nzb-file includes multiple video files. For example on binsearch.info I could select multiple collections and save them into one nzb file, for example "Game of Thrones.nzb"

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
TurboSort must use video files names in this case.

4. Like previous case but video files have bad names:

Code: Select all

<dir>         Game.of.Thrones
<file>                GOT0301.mkv
<file>                GOT0302.mkv
<file>                GOT0303.mkv
Here the script can't sort good.

I'm not sure what exactly the script should do and how should I formalize the requirements for the script.

dogzipp
Posts: 31
Joined: 22 Dec 2010, 22:12

Re: [PP-Script] TurboSort - organize movies and tv shows

Post by dogzipp » 07 Jul 2013, 19:47

I am more worried about this type of problem:

The nzb-file has a meaningful name, but the video file has a bad name.

We have been seeing this tons the last couple of months. The NZB's have perfectly fine names, most are deobfuscated thanks to several public and private methods. But the MKV inside is something like: 4242345345345.mkv

We definitely need some way of TurboSort to support using the NZB name as well, and this I would guess is a priority feature, or LOTS of files will not be processed/sorted successfully.

The other three scenarios, while they might be possible, they're not as urgent as the one I mentioned.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests