My Perfect Process:Movie+TV D/L, Convert, UnRar, Rename, Tag

From your noodle to other noodles. Talk about ways to get the most from Hazel. Even exchange recipes for the cool rules you've thought up. DO NOT POST YOUR QUESTIONS HERE.

Moderators: Mr_Noodle, Moderators

daci wrote:… it gives me errors all the time

What are the errors?

Try wrapping $1 in double-quotes, i.e. "$1".

PS: Best not to multipost, e.g. here and there. Makes it tougher for readers to choose where to post replies.
sjk
 
Posts: 332
Joined: Thu Aug 02, 2007 5:43 pm
Location: Eugene

Thank you for posting your Perfect Process.

I have a problem though and hope you can help. When the process moves the newly converted M4V files to the TV Namer folder, my hazel scrip returns errors with the external script. When i have delved into the embedded script that you have used, i think it is here that is bringing me undone. I noticed that your location of the script folder resided on your local drive, and i tried to change the file location on mine, but it is not working.

I have installed the TVNamer program with the easyInstall option on its site.
I have placed the OPs TV Namer scripts folder in my scripts folder in my Users Library file
I have also copied the 3 TV namer files and placed them in the Apps folder just in case.

Image

Any help would greatly be appreciated.

Thank
Chris
Chuggett
 
Posts: 30
Joined: Wed Mar 16, 2011 9:17 pm

After 6 hours of struggling to find out why its not working, i learned how to read a path correctly and to avoid spaces in file names. The backwards slash is what tricked this newbie.
Chuggett
 
Posts: 30
Joined: Wed Mar 16, 2011 9:17 pm

Hi guys

Im still having a few little issues that i hope you can identify.

Firstly, the json scripts that the OP provided, is not creating the folder structure for the file when it renames them. That is, when it changes the filename, it should then place it into the Series Title > Season Number . Its not happening for me.

I have opened up the config-C script in Textedit that the OP references in the hazel actions, and i have adjusted the output destination of the file to my Time Capsule, but instead of going there, it gets trashed instead.

I am not experiencing any error messages from growl.

Thanks for your assistance
Chris
Chuggett
 
Posts: 30
Joined: Wed Mar 16, 2011 9:17 pm

I seemed to have narrowed my problem down a little
* I have run the config script through terminal, and i had success in creating the folder heirachy that i am after.
* I set a colour label to Green rule, to see if the rule was passing through, and it wasn't, so I deleted one of the rules that was causing the files to trash and it the flowed through and coloured my files green.
* But the config file, when run through hazel is still not working.

The Code is
Code: Select all
 /usr/local/bin/tvnamer --config=/Users/macmini/Documents/Scripts/mytvnamerconfig-c.json "$1"


Thanks again
Chuggett
 
Posts: 30
Joined: Wed Mar 16, 2011 9:17 pm

Hi

The best test is doing through terminal directly. If you did that and it works, and the script is working to rename the file so you know your file paths are right within hazel, it is likely the rule set up. Can you describe or screenshot your final move rule? Also, tell me all the rules that are running on the specific folder. Also, try and run on a new file and then send/attach a link to your log file. I would be curious if it is erroring out and/or not running because another rule is matching before or something else.
dhy8386
 
Posts: 94
Joined: Tue Nov 09, 2010 12:19 pm

A good choice for making this process a lot simpler, especially for TV shows. Have a look at:

NZBVortex (AppStore or http://www.nzbvortex.com)
Magic Media Marker (AppStore)

The first will automatically download NZB files for TV shows you request from popular NZBSites, the second program will watch a specific folder, encode (using handbrakeCLI) and then tag the finished file properly.

Currently I have to use Hazel to rename the TV Shows (using the pattern matching feature), so that MMM can then use the file name of the finished show to get the correct tag information (e.g. showname.s01e01.mp4)

Hope this helps, any questions welcome.
dhcrees
 
Posts: 5
Joined: Sat Aug 20, 2011 11:24 am

carloscloud wrote:This is a great workflow but I have problem with executing the tvnamer shell script.

Everything works perfect if i execute the following command directly in the bash terminal,
/usr/local/bin/tvnamer --config=/Users/Martin/mytvnamerconfig.json tv.show.s04e02.720p.hdtv.x264-group.mkv

But when I execute the same command line in Hazel (/usr/local/bin/tvnamer --config=/Users/Martin/mytvnamerconfig.json "$1") I receive errors in the Hazel log:

2011-08-20 14:50:21.426 (null)[0] tv.show.s04e02.720p.hdtv.x264-group.mkv: Rule Copy of Rename w/ TVnamer & Final Move matched.
Python error: <stdin> is a directory, cannot continue
2011-08-20 14:50:21.708 hazelfolderwatch[8134] [Error] Shell script failed: Error processing shell script on file /Volumes/Downloads/4.Renaming/tv.show.s04e02.720p.hdtv.x264-group.mkv.


This is how my Hazel rule looks like:
Image


Please help me, I'm really looking forward to have a full automated download workflow.

This is actually where I am stuck too. The command works flawless in terminal but if I want to run it as a shell script from within Hazel it does not work for some reason.
jmueller
 
Posts: 11
Joined: Thu Dec 15, 2011 2:20 pm

Am I right in thinking this only works with tv shows, not movies?

If not, is there a similar process for renaming movies?
FOOOD
 
Posts: 49
Joined: Thu May 31, 2007 4:29 pm
Location: UK

I don't know about tvrenamer but I suggest putting $1 in quotes like this:

Code: Select all
  /usr/local/bin/tvnamer --batch "$1"


Otherwise, it'll barf on files with spaces in their names.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I'm not using tvnamer but a Python script I wrote, but I'm seeing the same error:

Code: Select all
5/3/12 11:39:05 PM   [0x0-0xc40c4].com.noodlesoft.HazelHelper[1534]   Python error: <stdin> is a directory, cannot continue


I've got two Macs both running OS X 10.6.8 and Hazel 2.0.5. I have this script working fine on one of them (a 2010 MacBook Pro) but when I exported the rule and imported it to the other (2007 iMac) I started getting this message. The system Python 2.6.1 should be in use on both machines.

Any idea how the script's stdin is getting connected to a directory, and why it's different from one Mac to the other? This error is getting generated by Python before my script has a chance to do anything. If I comment out my entire script, just leaving the shebang line, I still see the same message.
nriley
 
Posts: 19
Joined: Mon Sep 12, 2011 1:19 pm

There's some bizarre bug. Try reinstalling Hazel or rebooting. It really is some sort of weird "phase of the moon" type of thing.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Has anyone gotten this to work? I'm stuck on the tvrenam step. Like everyone else, I can get this to run from terminal just fine, but I get this error when I run it through Hazel as an embedded shell script.

2012-05-30 18:44:24.984 hazelworker[11282] [Error] Shell script failed: Error processing shell script on file /Users/blah/blah.blah


I've tried many iterations and can't seem to get anything to work. Any help would be appreciated.
Maxxodd1
 
Posts: 2
Joined: Wed May 30, 2012 9:45 pm

Did you supply the full path to the tvrenamer program?
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Did you supply the full path to the tvrenamer program?


Yes, my error is the exact same as jmueller a couple of posts up. My input is the full file path to the script as well as the config file. I just can't understand why it runs fine from terminal, but errors out from hazel?
Maxxodd1
 
Posts: 2
Joined: Wed May 30, 2012 9:45 pm

PreviousNext

Return to Tips & Tricks - DO NOT POST QUESTIONS