[Python] Corrie TV (Coronation Street)/Enders renamer script

Come up with a useful post-processing script? Share it here!
J03 8LACK
Full Member
Full Member
Posts: 120
Joined: April 2nd, 2009, 1:33 am

Re: [Python] Corrie TV (Coronation Street)/Enders renamer sc

Post by J03 8LACK »

Hey James,

Sorry that was a little bug. -01 was removing the month also. So I have change the code to correct.

take a look

Code: Select all

   if AirDate[10:13] == "-01" :   # correct multi part if A/B Airdate and flag MultiPart
      AirDate = AirDate[:10]   # keeps only the first 10 chars of Airdate 2013-01-01
      multiPart = 0
      print AirDate + " This is Part 1"
   if AirDate[10:13] == "-02" :
      AirDate = AirDate[:10]  # keeps only the first 10 chars of Airdate 2013-01-01
      multiPart = 1
      print AirDate + " This is Part 2"
Here is version 3 - http://www.mediafire.com/?8m78s94syww8jha

Now remember that this script only works if the uploader keeps to this naming format.

As for the Corrie problem. The uploader named the file wrong - coronation.street.07.01.12.part.1.[ws.pdtv].avi
should be coronation.street.07.01.13.part.1.[ws.pdtv].avi

If its uploaded wrong I can't fix it. I just move it to the failed folder and tell you to check it.

Hope this helps
J03
jamesjfa
Jr. Member
Jr. Member
Posts: 50
Joined: June 15th, 2012, 9:37 pm

Re: [Python] Corrie TV (Coronation Street)/Enders renamer sc

Post by jamesjfa »

lol well spotted with the year. I never even noticed that. I will apply the script later today.

Cheers,
James
jamesjfa
Jr. Member
Jr. Member
Posts: 50
Joined: June 15th, 2012, 9:37 pm

Re: [Python] Corrie TV (Coronation Street)/Enders renamer sc

Post by jamesjfa »

J03 Hope you're well

I have have a new one for you.

I recently moved everything back over to the Synology 212j. Everything has been working ok aprt from one or 2 things. Coronation Street has been working great. Eastenders however not so good. Both scripts have the same on line 1 which is:

#!/usr/local/python/bin/python -OO

The error I get when the Eastenders script runs is:

Unknown option: -
usage: /usr/local/python/bin/python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.

When I run it from the cmd line on the NAS however I get this:

/usr/local/python/bin/python -OO EastEndersSynology.py
/volume1/Downloads/EastEndersTemp/EastEnders 20130204.avi
Orginal filename : EastEnders 20130204.avi
EastEnders 0
20130204.avi 1
new filename : EastEnders.2013-02-04.avi
2013-02-04
File is an avi OK to rename
New filename : EastEnders - S29E21.avi
No folder supplied - is this being called from SABnzbd?

Just not to sure what is happening with it. The other issue I have is with movies. Say for instance a movie is CD1 & CD2. I would like to merge these to one file for presentation. I did this on the mac with an APPLETV script and mencoder. Do you know if this would be possible on the Synology?

Cheers,
James
J03 8LACK
Full Member
Full Member
Posts: 120
Joined: April 2nd, 2009, 1:33 am

Re: [Python] Corrie TV (Coronation Street)/Enders renamer sc

Post by J03 8LACK »

Hey james,

Try removing one of the O's from the shebang.

#!/usr/local/python/bin/python -O

As for the CD1 + CD2 problem, I personally don't join any files myself. And if your and HD downloader then most of the files are not split.
So in short i dont know of any joiners

Tell me how it goes
J03
jamesjfa
Jr. Member
Jr. Member
Posts: 50
Joined: June 15th, 2012, 9:37 pm

Re: [Python] Corrie TV (Coronation Street)/Enders renamer sc

Post by jamesjfa »

Hi J03

It is still the same error. Very strange. I am able, or should I say sickbeard is pulling other copies and they are being processed automatically. Would be nice to get the script to run as a backup though. At least when I run it via the cmd line on the Synology it will rename the file.

Cheers,
James
J03 8LACK
Full Member
Full Member
Posts: 120
Joined: April 2nd, 2009, 1:33 am

Re: [Python] Corrie TV (Coronation Street)/Enders renamer sc

Post by J03 8LACK »

Hey james,

your going to have to do a little checking.
1- check the permissions on the eastender script - make sure its executable
2- check the shebang line for any strange characters like tabs and carriage returns - easy fix delete everything up to the first line of actual code then insert the shebang line.. this type of problem comes from editing the script on windows and then moving it linux or unix.

Is sickbeard now able to find coronation street and eastenders correctly?

tell me how is goes?
J03
jamesjfa
Jr. Member
Jr. Member
Posts: 50
Joined: June 15th, 2012, 9:37 pm

Re: [Python] Corrie TV (Coronation Street)/Enders renamer sc

Post by jamesjfa »

I don't think it finds corrie automatically but will sometimes pick up Eastenders. When I get back tonight I will tell you how it is formatted (eastenders ones that are picked up).

I will also check the permissions. Like I say though it is using the same shebang as the corrie script and that works.

Thank you J03
jamesjfa
Jr. Member
Jr. Member
Posts: 50
Joined: June 15th, 2012, 9:37 pm

Re: [Python] Corrie TV (Coronation Street)/Enders renamer sc

Post by jamesjfa »

Hi

The Eastenders that gets picked up automatically is in the following format:

Eastenders 2013 02 05 HDTV x264-DEADPOOL

I tried modifying thr shebang and also the permissions but still cannot get the script to run without the same error. I have tried going through the corrie one to see if there is a difference but cannot see any.

Cheers,
James
blackice101
Newbie
Newbie
Posts: 1
Joined: August 15th, 2013, 11:31 am

Re: [Python] Corrie TV (Coronation Street)/Enders renamer sc

Post by blackice101 »

Hello,

Does anyone have any recommendations on how to best get Coronation Street now? There doesn't seem to be a regular uploader unless I'm somehow missing it. I'd appreciate whatever help anyone can provide.

And of course, thanks for all the work you've put into this!!!
J03 8LACK
Full Member
Full Member
Posts: 120
Joined: April 2nd, 2009, 1:33 am

Re: [Python] Corrie TV (Coronation Street)/Enders renamer sc

Post by J03 8LACK »

blackice101,
Have you try just using the rss setup with binsearch feed just as this script does. you don't have to use the script to download it more for renaming it for sickbeard to id it and track it. A lot of the nzb indexer sites don't track Coronation Street that's why i create this little tool.

how have you been downloading them?
give this way a try....
J03
jamesjfa
Jr. Member
Jr. Member
Posts: 50
Joined: June 15th, 2012, 9:37 pm

Re: [Python] Corrie TV (Coronation Street)/Enders renamer sc

Post by jamesjfa »

I'm back for more.....

Have been grabbing these manually from torrent as the binsearch method stopped working. Any new methods for Corrie and EastEnders?

Cheers,
J
jamesjfa
Jr. Member
Jr. Member
Posts: 50
Joined: June 15th, 2012, 9:37 pm

Re: [Python] Corrie TV (Coronation Street)/Enders renamer sc

Post by jamesjfa »

I am now using Sonarr (formally NZBDrone) torrents edition. Now, Coronation street and Eastenders are picked up automatically. If it can't find them on usenet it will try torrent. :-)
Post Reply