SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac)

  Thread Rating:
  • 6 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
cliffe Offline
Senior Member
Posts: 180
Joined: Jun 2010
Reputation: 7
Smile  New version available Post: #41
Capt.Insano Wrote:Although I made a feature request a few posts back, which was implemented crazily fast (Copy rather than Move), Thank You Cliffe and then even improved upon with Symlink functionality, Thank You Schmoko ; I still haven't started using this great script because no of Episode Naming.

Ok, how's this for crazily fast? I just added a feature to optionally fetch the episode names from thetvdb.com

SortTV Version 1.1 has this new feature:
  • --rename-format:SIMPLE
    As before, files are named "show name S01E01.ext"
  • --rename-format:INCLUDE-EPISODE-TITLE
    Fetches the episode title from thetvdb.com
    Files are named "show name S01E01 - episode title.ext"

SIMPLE is much faster, since INCLUDE-EPISODE-TITLE involves network requests.

The new version also fixes some small bugs.

I guess later I will add image downloading etc. Maybe eventually .nfo generation...

--

Regarding thetvdb.com, this is a free service that has information about tv shows. If you find any information is missing then please log in add add to the database Smile
(This post was last modified: 2010-10-17 21:03 by cliffe.)
find quote
cliffe Offline
Senior Member
Posts: 180
Joined: Jun 2010
Reputation: 7
Post: #42
Oh I almost forgot, to upgrade to v1.1 you will need to install the TVDB perl module:

On Linux:
Code:
sudo cpan TVDB::API
On Windows:
Code:
cpan TVDB::API

The first post has been updated with all the new info.
find quote
cliffe Offline
Senior Member
Posts: 180
Joined: Jun 2010
Reputation: 7
Post: #43
Version 1.2 fixes a bug that was introduced in v1.1. So please upgrade.
https://sourceforge.net/projects/sorttv/files/

Regarding installing the perl modules (as described in my last post), it is pretty safe to just hit enter to all the prompts.

I hope the new features come in handy.

I am also interested in hearing more people's experiences with SortTV.

Thanks.
find quote
Capt.Insano Offline
Member
Posts: 78
Joined: Mar 2010
Reputation: 0
Location: Dublin, Ireland
Post: #44
Really looking forward to setting this up, when I'm home from work!!

$10 donation sent, seriously fast development on requests so very well deserved!!

Thanks Cliffe,
The Capt.
find quote
CoinTos Offline
Member
Posts: 87
Joined: Oct 2010
Reputation: 0
Location: Canada
Post: #45
Hi cliffe,

First off really great script. I am just wondering if this script can help me in my migration. I currently have my media on my windows computer, I want to move it my linux raid server I am setting up. Now, correct me if I am wrong but currently you script just sorts to file show title/Season number, which great for most of my shows. An example of a problem for my migration is with new CSI eps I would like it to be sorted to CSI Crime Scene Investigator. Is there a way a custom title support can be added, sort of a extra option in the config or a extra file where I could tell if it find CSI (not Miami/NY) make it CSI Crime Scene Investigator in the sort.

Thanks again for the script.

Edit: Also another example with the current script in my testing, it fails to get the ep title for Mike & Molly since they name the torrented version Mike and Molly. Finally, is there a way to get it to rename Show - S00E00 - Ep Title.avi? Again, sorry to pester and thanks for development on this script, these are just some migration thoughts so I can continue to use tvrename for name changes when needed over samba. I can always adapt if needed. :-)
(This post was last modified: 2010-10-20 18:53 by CoinTos.)
find quote
Capt.Insano Offline
Member
Posts: 78
Joined: Mar 2010
Reputation: 0
Location: Dublin, Ireland
Post: #46
Would it be possible to set naming parameters in sorttv.conf. to choose the format of episode naming?

ie:
My sorttv.conf has:
Code:
rename-format:INCLUDE-EPISODE-TITLE

Episodes get named as follows:
Code:
[Series] [Ep #] - [Ep Name]

eg: 30 Rock S05E04 - Live Show (East Coast Taping)

but all the episodes on my Media Server are naming using the following naming convention:
Code:
[Series].[Ep #].[Ep Name]

eg: 30 Rock.S05E03.Let's Stay Together

Could I set how these "Variables" appear in episode names? It would prob suit people to have custom naming conventions.

P.S: The .conf option
Code:
use-dots-instead-of-spaces:FALSE
does not fit the purpose as the above example would be
"30.Rock.S05E03.-.Let's.Stay.Together"

I hope this post made sense!!

The Capt
find quote
cliffe Offline
Senior Member
Posts: 180
Joined: Jun 2010
Reputation: 7
Smile  New version available Post: #47
A new version of SortTV is now available (v1.3).
  • New feature: Show name substitution
  • Pattern matching improvements: ignores and, &, +

The new sample configuration file contains:
Code:
show-name-substitute:CSI-->CSI: Crime Scene Investigation
show-name-substitute:Sanctuary US-->Sanctuary
If you come up with any others that might be helpful, then please let me know and I will add them to the sample conf file.

You can get the new version from:
https://sourceforge.net/projects/sorttv/files/

If you find this script helpful then please consider making a $5 paypal donation
http://sourceforge.net/donate/index.php?group_id=330009


CoinTos Wrote:Hi cliffe,

First off really great script. I am just wondering if this script can help me in my migration. I currently have my media on my windows computer, I want to move it my linux raid server I am setting up. Now, correct me if I am wrong but currently you script just sorts to file show title/Season number, which great for most of my shows. An example of a problem for my migration is with new CSI eps I would like it to be sorted to CSI Crime Scene Investigator. Is there a way a custom title support can be added, sort of a extra option in the config or a extra file where I could tell if it find CSI (not Miami/NY) make it CSI Crime Scene Investigator in the sort.

Thanks again for the script.

Edit: Also another example with the current script in my testing, it fails to get the ep title for Mike & Molly since they name the torrented version Mike and Molly. Finally, is there a way to get it to rename Show - S00E00 - Ep Title.avi? Again, sorry to pester and thanks for development on this script, these are just some migration thoughts so I can continue to use tvrename for name changes when needed over samba. I can always adapt if needed. :-)

Done, grab the new version Smile

Currently the renaming does not create that specific style (however, it is almost identical without the first '-'). Adding the option will be easy. I am trying not to have regex in the conf file for simplicity, but I have to think about the best way to implement the different styles that people might want.
find quote
cliffe Offline
Senior Member
Posts: 180
Joined: Jun 2010
Reputation: 7
Post: #48
Capt.Insano Wrote:Would it be possible to set naming parameters in sorttv.conf. to choose the format of episode naming?

ie:
My sorttv.conf has:
Code:
rename-format:INCLUDE-EPISODE-TITLE

Episodes get named as follows:
Code:
[Series] [Ep #] - [Ep Name]

eg: 30 Rock S05E04 - Live Show (East Coast Taping)

but all the episodes on my Media Server are naming using the following naming convention:
Code:
[Series].[Ep #].[Ep Name]

eg: 30 Rock.S05E03.Let's Stay Together

Could I set how these "Variables" appear in episode names? It would prob suit people to have custom naming conventions.

P.S: The .conf option
Code:
use-dots-instead-of-spaces:FALSE
does not fit the purpose as the above example would be
"30.Rock.S05E03.-.Let's.Stay.Together"

I hope this post made sense!!

The Capt

Ok, stay tuned. I'll implement something soon... Maybe tomorrow.

In the mean time, feel free to hack around line ~479 of sorttv.pl to make your copy output to your desired format.
Eg:

if you change (line 474):
$title = " - $name";
to
$title = " $name";
and turn on use-dots-instead-of-spaces, you get your desired format

Update: Almost... Change it to $title = ".$name"; and also change 479 to put a "." rather than a space between show name and episode.
(This post was last modified: 2010-10-21 00:29 by cliffe.)
find quote
cliffe Offline
Senior Member
Posts: 180
Joined: Jun 2010
Reputation: 7
Big Grin    Post: #49
Capt.Insano Wrote:Really looking forward to setting this up, when I'm home from work!!

$10 donation sent, seriously fast development on requests so very well deserved!!

Thanks Cliffe,
The Capt.

Thanks Smile
find quote
cliffe Offline
Senior Member
Posts: 180
Joined: Jun 2010
Reputation: 7
Smile  New version available Post: #50
Ok, you asked for it and here it is.

A new version of SortTV is now available (v1.4).

The new version now allows custom file renaming, and a number of examples are provided in the sorttv.conf file, so just choose the one that matches the format you want.

--rename-format:{formatstring}
Hint: including the Episode Title as part of the name slows the process down a bit since titles are retrieved from thetvdb.com
The formatstring can be made up of:
  • [SHOW_NAME]: "My Show"
  • [EP1]: "S01E01"
  • [EP2]: "1x1"
  • [EP3]: "1x01"
  • [EP_NAME1] " - Episode Title"
  • [EP_NAME2] ".Episode Title"
If not specified the format is "[SHOW_NAME] - [EP1][EP_NAME1]"
For example:
for "My Show S01E01 - Episode Title" (this is the default)
--rename-format:[SHOW_NAME] - [EP1][EP_NAME1]
for "My Show.S01E01.Episode Title"
--rename-format:[SHOW_NAME].[EP1][EP_NAME2]

You can get the new version from:
https://sourceforge.net/projects/sorttv/files/

If you find this script helpful then please consider making a $5 paypal donation
http://sourceforge.net/donate/index.php?group_id=330009
find quote
Post Reply