Page 2 of 3

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

PostPosted: Sun Mar 13, 2011 3:44 pm
by sjk
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.

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

PostPosted: Wed Mar 16, 2011 9:41 pm
by Chuggett
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

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

PostPosted: Thu Mar 17, 2011 3:22 am
by Chuggett
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.

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

PostPosted: Thu Mar 17, 2011 8:09 am
by Chuggett
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

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

PostPosted: Thu Mar 17, 2011 9:09 am
by Chuggett
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

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

PostPosted: Sun Mar 20, 2011 8:38 am
by dhy8386
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.

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

PostPosted: Sat Aug 20, 2011 5:36 pm
by dhcrees
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.

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

PostPosted: Thu Dec 15, 2011 7:49 pm
by jmueller
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.

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

PostPosted: Wed Mar 14, 2012 7:43 am
by FOOOD
Am I right in thinking this only works with tv shows, not movies?

If not, is there a similar process for renaming movies?

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

PostPosted: Wed Mar 14, 2012 1:02 pm
by Mr_Noodle
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.

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

PostPosted: Fri May 04, 2012 12:42 am
by nriley
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.

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

PostPosted: Fri May 04, 2012 11:59 am
by Mr_Noodle
There's some bizarre bug. Try reinstalling Hazel or rebooting. It really is some sort of weird "phase of the moon" type of thing.

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

PostPosted: Wed May 30, 2012 9:51 pm
by Maxxodd1
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.

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

PostPosted: Thu May 31, 2012 4:49 pm
by Mr_Noodle
Did you supply the full path to the tvrenamer program?

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

PostPosted: Thu May 31, 2012 5:23 pm
by Maxxodd1
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?