Plex Forums: Auto-rename your episodes - Plex Forums

Jump to content

  • (22 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Auto-rename your episodes

#1 User is offline   spaceman Icon

  • Plug-in Dev
  • PipPipPip
  • Group: Castle Keeper
  • Posts: 772
  • Joined: 16-September 08
  • Gender:Male
  • Location:10 Miles West of the exact centre of the universe

Post icon  Posted 27 December 2008 - 04:46 AM

Attached File  Episode_Linker1.3.4.zip (107.03K)
Number of downloads: 3050


New in 1.3.4
Fixed bug with multiple dots in file names
Fixed bug in automated upgrade.

New in 1.3.3
Auto-mounting remote destinations.
S01E01 format is working for all input naming formats.
Some more minor tweaks in default rules.
Fix for Folder Actions misfires.
Option to continue evaluating rule if no match found.
More detail in Console log.
Default rules updated automatically on first launch.

If you're updating from version 1.3.2:
When you first launch Episode Linker you'll find a new set of rules along with the old ones.
If you've made any changes to the default rules you should merge those changes with the new version.
You can then delete the old rules.
Note: You don't have to do this for each folder you're watching, once is enough.

If any of your destination folders are on remote volumes:
Mount the remote volumes before updating folder settings.
Select the destination folder and press tab (or click Browse and select them again)
Fill in access info if prompted (press Cancel for guest access)
Check the server name is correct.
Press Update

Quit Episode Linker for changes to take effect.


If you're updating from 1.3.1 open the Preferences and ensure that you have an action type selected

If you're updating from 1.3 you'll need to do the following:
Quit Episode Linker
Delete /Users/yourUserName/Library/Preferences/com.softwarefromspace.episodelinker.plist
Replace the old version with the new one. If you want to keep old versions they should be in zip archives.
Open the new version and re-enter your settings (sorry, I'll make all this automatic for future updates)

Changes for v1.3.2
Hard linking works again. Thanks scsa for the console log.
Fix for myminirocks' -1726 error on quit problem.

Changes for v1.3.1
Fixes for blank entries and non-existent folders
Update Plex option now works when run from the GUI
No longer launches app when renaming automatically
Disabling rules now works
and many more UI tweaks

Changes for v1.3
New GUI
User editable rename rules (Now Python flavoured!)
Automated folder action setup on application quit
wait for files fix for Hilbe.

Installation:
Decompress and drag the application to the Applications folder.

By default the script creates hard links so you can continue seeding without using double the space on your hard drive.
When you're done seeding you can delete the original without breaking the new version.
You'll need to have both the downloads folder and the TV folder on the same volume to take advantage of this feature.

If anyone has feature requests or bug reports let me know.

Attached File(s)


0

#2 User is offline   MaxxOdd Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 31
  • Joined: 01-June 08

Posted 27 December 2008 - 08:51 AM

Spaceman, I was wondering what exactly this script does?
0

#3 User is offline   spaceman Icon

  • Plug-in Dev
  • PipPipPip
  • Group: Castle Keeper
  • Posts: 772
  • Joined: 16-September 08
  • Gender:Male
  • Location:10 Miles West of the exact centre of the universe

Posted 28 December 2008 - 02:34 AM

View PostMaxxOdd, on Dec 27 2008, 03:51 AM, said:

Spaceman, I was wondering what exactly this script does?

Here are some of the files in my downloads folder

Terminator.The.Sarah.Connor.Chronicles.S02E13.HDTV.XviD-XOR.avi
The Colbert Report 12-01-2008.avi
The Colbert Report 2008-12-02.avi
The.Big.Bang.Theory.2x01.The.Bad.Fish.Paradigm.HDTV.XviD-FoV.avi
The.Big.Bang.Theory.S02E02.HDTV.XViD-DOT.avi

Here are the same files in my TV folder after running the script

Terminator The Sarah Connor Chronicles/Season 2/Terminator The Sarah Connor Chronicles - S02E13.avi
The Colbert Report/Season 2008/The Colbert Report - S2008E1201.avi
The Colbert Report/Season 2008/The Colbert Report - S2008E1202.avi
The Big Bang Theory/Season 2/The Big Bang Theory - S02E01.avi
The Big Bang Theory/Season 2/The Big Bang Theory - S02E02.avi

Notice the consistent naming and folder structure? What you don't see is that the new files don't take up any additional space on the hard drive, that running the script didn't interfere with my bittorrent client and that everything happened automatically the moment the files finished downloading.

Those Colbert episodes don't show up in library mode yet, we still need a tvdb scraper capable of handling episodes listed by date.
I'm also working on handling iTunes-style episode naming and I'll add a call to Plex to update the library and another to (optionally) show a notification on completion. Stay tuned for more updates.
0

#4 User is offline   spaceman Icon

  • Plug-in Dev
  • PipPipPip
  • Group: Castle Keeper
  • Posts: 772
  • Joined: 16-September 08
  • Gender:Male
  • Location:10 Miles West of the exact centre of the universe

Posted 28 December 2008 - 04:13 AM

Update posted, see link at top
Added: Support for ShowName/101 style naming
Added: Script can be run directly from within script editor. You will be prompted for source folder each time you run.
0

#5 User is offline   MaxxOdd Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 31
  • Joined: 01-June 08

Posted 29 December 2008 - 07:56 AM

Pretty cool!
0

#6 User is offline   GinSoakedBoy Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 01-September 08

Posted 29 December 2008 - 04:24 PM

Great script, been waiting for this.

Is there any way to handle the way the script handles the naming and hard linking?
0

#7 User is offline   spaceman Icon

  • Plug-in Dev
  • PipPipPip
  • Group: Castle Keeper
  • Posts: 772
  • Joined: 16-September 08
  • Gender:Male
  • Location:10 Miles West of the exact centre of the universe

Posted 29 December 2008 - 04:30 PM

You could go into the package contents, navigate to Contents/Resources, and edit the bash script directly.
Not for the faint of heart. There's nothing like the xml files in Plex. If you're looking for a particular addition you can post a sample path and I'll add it in the next version.
0

#8 User is offline   Hilbe Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 38
  • Joined: 17-December 08

Posted 05 January 2009 - 02:30 PM

I keep getting an "Operation not permitted" from the AppleScript. My setup is my AFP mount /Volumes/Media, with 2 directories: Downloads and TV Shows. I setup all my downloads to go into Downloads upon completion, then setup a Folder Action for this folder with the destination of TV Shows. The permissions are all 777 and the files do not already exist. I'm puzzled...
0

#9 User is offline   spaceman Icon

  • Plug-in Dev
  • PipPipPip
  • Group: Castle Keeper
  • Posts: 772
  • Joined: 16-September 08
  • Gender:Male
  • Location:10 Miles West of the exact centre of the universe

Posted 05 January 2009 - 02:48 PM

View PostHilbe, on Jan 5 2009, 09:30 AM, said:

I keep getting an "Operation not permitted" from the AppleScript. My setup is my AFP mount /Volumes/Media, with 2 directories: Downloads and TV Shows. I setup all my downloads to go into Downloads upon completion, then setup a Folder Action for this folder with the destination of TV Shows. The permissions are all 777 and the files do not already exist. I'm puzzled...

I'm not sure this will work across a network.
Are both folders on the same volume on the host computer?
Could you try running the script from that computer and let me know if it works?

I can think of one or two ways of working around the problem, let me know and I'll post something that should work for you.
0

#10 User is offline   Hilbe Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 38
  • Joined: 17-December 08

Posted 05 January 2009 - 02:55 PM

View Postspaceman, on Jan 5 2009, 09:48 AM, said:

I'm not sure this will work across a network.
Are both folders on the same volume on the host computer?
Could you try running the script from that computer and let me know if it works?

I can think of one or two ways of working around the problem, let me know and I'll post something that should work for you.


My setup uses the Airport Disks, so there is no host computer. They are both on the same volume. I PMd you the log details...
0

#11 User is offline   Hilbe Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 38
  • Joined: 17-December 08

Posted 05 January 2009 - 03:16 PM

View PostHilbe, on Jan 5 2009, 09:55 AM, said:

My setup uses the Airport Disks, so there is no host computer. They are both on the same volume. I PMd you the log details...


I figured it out. You cannot link files on AFP mounts, but you can move them (changed "ln" to "mv" successfully). Maybe you could create a second script for moving episodes? :)
0

#12 User is offline   realitymonkey Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 11
  • Joined: 06-January 09

Posted 07 January 2009 - 12:27 PM

Great script and is working well except, I would like to be able to delete the original file so I know which files have been moved without having to check each time.

Looked through your code but its a bit beyond me to be honest to try and work out where to add a delete line and exactly what that line should be.

Many Thanks
0

#13 User is offline   Hilbe Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 38
  • Joined: 17-December 08

Posted 07 January 2009 - 12:34 PM

View Postrealitymonkey, on Jan 7 2009, 07:27 AM, said:

Great script and is working well except, I would like to be able to delete the original file so I know which files have been moved without having to check each time.

Looked through your code but its a bit beyond me to be honest to try and work out where to add a delete line and exactly what that line should be.

Many Thanks


I extracted the linkEpisodes bash script and opened it with TextEdit. I changed the line with "ln" to "mv". I then saved the script as "moveEpisodes" into another directory. I put it on a crontab to run daily to move all my shows as they get downloaded. I'll post it if spaceman doesn't come out with something new and improved :)
0

#14 User is offline   realitymonkey Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 11
  • Joined: 06-January 09

Posted 07 January 2009 - 12:43 PM

Ah Cunning, will have a play in a bit
0

#15 User is offline   spaceman Icon

  • Plug-in Dev
  • PipPipPip
  • Group: Castle Keeper
  • Posts: 772
  • Joined: 16-September 08
  • Gender:Male
  • Location:10 Miles West of the exact centre of the universe

Posted 07 January 2009 - 04:29 PM

New version is up. See post at top.
More additions coming in the near future.
0

#16 User is offline   Hilbe Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 38
  • Joined: 17-December 08

Posted 07 January 2009 - 04:39 PM

View Postspaceman, on Jan 7 2009, 11:29 AM, said:

New version is up. See post at top.
More additions coming in the near future.


Thanks. Any idea how to handle the issue with the Folder Action occuring before the file is 100% copied to a AFP share? I just have it running on a cron for now.
0

#17 User is offline   spaceman Icon

  • Plug-in Dev
  • PipPipPip
  • Group: Castle Keeper
  • Posts: 772
  • Joined: 16-September 08
  • Gender:Male
  • Location:10 Miles West of the exact centre of the universe

Posted 07 January 2009 - 04:47 PM

View PostHilbe, on Jan 7 2009, 11:39 AM, said:

Any idea how to handle the issue with the Folder Action occuring before the file is 100% copied to a AFP share?


Yes, I wrote up some code for it but I'm unable to test it here. You can uncomment the waitForItems function and the calls to it and save the script if you'd like to do some testing before then.
btw that function won't do anything unless the script is triggered by a folder action.

View PostHilbe, on Jan 7 2009, 11:39 AM, said:

I just have it running on a cron for now.

You'll need to update your cron job as the calling syntax for the bash file has changed. Just add a -m before the srcfolder and you should be good to go.
0

#18 User is offline   realitymonkey Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 11
  • Joined: 06-January 09

Posted 07 January 2009 - 07:29 PM

Great thanks Spaceman can you confirm what the updates are ?
0

#19 User is offline   realitymonkey Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 11
  • Joined: 06-January 09

Posted 07 January 2009 - 07:42 PM

Thanks for the PM Spaceman can't seem to reply for some reason but message below

Was meaning what are the new features in this version compared to the original. As I have the original working well

Thanks

RM
0

#20 User is offline   spaceman Icon

  • Plug-in Dev
  • PipPipPip
  • Group: Castle Keeper
  • Posts: 772
  • Joined: 16-September 08
  • Gender:Male
  • Location:10 Miles West of the exact centre of the universe

Posted 07 January 2009 - 07:46 PM

The changes are listed in the topmost post
That way someone coming to this thread for the first time can find the latest version of the script along with the release notes without having to go to the end of the thread and search backwards.

Here are the changes I listed
Changes for v1.2
You can now create symlinks or copies or simply move the original files.
To choose one of these settings:
Open the script. Run it. Choose Settings. Select one of the four options. Press return. Quit Script Editor.
0

  • (22 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic



1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users