Works perfectly now!
It was allowing me to output the filename without the showname tacked on originally but now I can’t seem to get it to do it again. It’s outputting “Mad Men.SXXEYY showtitle.avi” and I was hoping to get “SXXEYY showtitle.avi”.
Is this still possible?
Thanks again for this awesome script!
It should be possible, I’m away from home momentarily but might find some time next weekend. The last code segment changes the filename and I’ll have to split the variable seriesandepisode into showname and episode which will make it easy to delete just the first one.
Awesome dude, appreciate it.
try replacing:
tell application "Finder" to set name of file ersteselement to seriesandepisode & "." & episodentitel & ".avi"<br />
by:
set AppleScript's text item delimiters to "."<br />
set showname to the first text item of seriesandepisode<br />
set seasonandepisode to the second text item of seriesandepisode<br />
tell application "Finder" to set name of file ersteselement to seasonandepisode & "." & episodentitel & ".avi"
didn't test it but it should work.
i managed to change to correct path. but i mostly have .mkv files.
and automator renamed it to .avi.
Please have a look at the update.
Great
I’m trying to get this workflow to run as a folder action, but can’t seem to get past an error message: In the second Run AppleScript section, I’m getting
Can't make POSIX file (alias "Downloads:ShowName.S01E01.blahblah.avi") of «script» into type alias. (-1700)
Any ideas? :)
(Also, is there any way to get the Automator app to actually show you the line of code where it's hitting the error? All I'm getting is that it's in this particular chunk of the workflow, but can't seem to narrow it down...)
My first guess would be that the volume part is missing in the POSIX file path: try adding Macintosh HD or whatever your volume name is. I used to run the script in Automator for debugging but am not sure if there was any information about the line in which the error occurred. A quick google search gave me this: http://forums.plexapp.com/index.php/topic/2822-auto-rename-your-episodes/page__view__findpost__p__22176
not sure if it helps you.
By the way, are folder actions reliable? I once added one to upload my exported plex library to a ftp server but it often didn’t work, probably a problem with the ftp-upload extension though.
Not to be an ass, but the new tvnamer has a config file… So all you need is to (like now) drop a file on the app…
But its more easy to edit the config this way…
https://github.com/dbr/tvnamer
In Automator use: “Start Shell Command” and then add this " /usr/local/bin/tvnamer “$@” " and set “As Argument”
One line, thats it…
(Even better is to use Transmissions new " Run script on end download " func.
But yeah, you need to have tvnamer installed on the machine… and that is pretty easy…)
I’ve added my config.
tvnamer.txt (1.44 KB)
And the Application.
RenameApp.zip (48.5 KB)
Not that I dont like the application, this is only an idea.
(I just run a shell script everytime Transmission has a new file… which is added to a rule so all tv shows goes to 1 folder, movies to another…)
/mkh
Great app, just what I was looking for 
Just one thing: how can I make it work with more than one file as input? I need this to work as an iCal event without manually dropping the files onto the app. I tried just to query the files but then the script just processes the last file. I also thought about simply running it multiple times, but then it would return an error once no file is left to be processed.
By NOT using the application , i've just setup af tiny cronscript to check a folder,
tvnamer -r /folder/
This sounds really promising :-)
Is it possible to extend this for movies also?
1) Check IMDB/MovieDB for actual name and year
2) Create folder for the movie: Accurate name (Year)
3) Move moviefile to that folder
4) Rename movie file to that of th folder.mkv .avi .mpeg etc
5) Check for external subtitle files in that folder
6) Rename sub-file to exact match of movie file AND PRESERVE THE LANGUAGE ID moviefilename.Dan.srt - moviefilename.Eng.srt etc
Ex:
File: xxxxxx.cccc.934875jffjfjfjf.Mississippi.Burning.subwayandundergroundandmetro.everywherebyseether.mkv
> Look-up: Mississippi Burning (1988)
Folder
- Mississippi Burning (1988)
Files
Mississippi Burning (1988).mkv
Mississippi Burning (1988).Dan.srt
Mississippi Burning (1988).Eng.srt
Mississippi Burning (1988).Spa.srt
Mississippi Burning (1988).Ita.srt
Also... could this app be made to check the existing media folders for TV Shows and Movies for consistency?
I changed the media path but get error when running this.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.