Page 8 of 15
Re: Autodownload script
Posted: January 25th, 2009, 10:38 pm
by markus101
If you're at all looking to rename you episodes I suggest TVRename
http://www.tvrename.com/ but it's also great for making sure you have all the episodes of a series or season (for shows like SNL).
I also don't like looking at Season 01 instead of Season 1, but for simplicity I ended up adopting the leading zero.
Thanks for all the work on this script MiniMad.
Cheers and Happy Downloading (and Renaming),
Markus
Re: Autodownload script
Posted: January 25th, 2009, 11:01 pm
by Stokkes
Sorry, I'm not about to rename 5000+ episodes. Like I said, I have two HTPCs that rely on the episodes the way they're currently named (they both have databases that refer to filenames in their libraries). If I renamed all the episodes, the HTPCs would detect duplicate episodes and my watched list (all the episodes I've seen or haven't seen) would be wiped. I'm not about to put myself through that ordeal.
Re: Autodownload script
Posted: January 25th, 2009, 11:32 pm
by pilGrim
markus101 wrote:
If you're at all looking to rename you episodes I suggest TVRename
http://www.tvrename.com/ but it's also great for making sure you have all the episodes of a series or season (for shows like SNL).
Markus
I was using a naming convention that I came up with that was not compatible with any of the scripts out there, so I had to rename over 5,000 shows. I used the following and it was a snap...
- ReNamer (Free)
http://www.den4b.com/ Very easy to do a number of batch changes to your files.
- TVNamer.py (Free) script is part of the tvdb_ui suite that is used by the script in this thread. Gets the proper series name and episode name from TVDB.com Very easy to use just run with the parameter of your TV Show folder location. Remember to pass on spaces and put an extra "" to make the python script see your \ character literally.
- Better File Rename: (10 Euros)
http://www.publicspace.net/windows/Bett ... .html I used to use this exclusively, until I found the free options above. It is very powerful and easy to use and I still use it for some tasks.
I have not tried the one Markus suggests, but for those out there that need to do file renaming you now have a lot of options to choose from.
;-)
Re: Autodownload script
Posted: January 26th, 2009, 2:25 am
by pinion
I'm trying to get the latest movie script I could find going herebut am getting an error when I run it:
Code: Select all
freenas:/mnt/Scratch# python2.5 rssmovies.py
295 existing movies
2009-01-26 12:19:41: Notting.Hill.1999.INTERNAL.DVDRip.XViD-SSB
Traceback (most recent call last):
File "rssmovies.py", line 67, in <module>
more_info=node.getElementsByTagName("report:moreinfo")[0].childNodes[0].data
IndexError: list index out of range
Does anyone have any idea what I'm doing wrong? I'm using the nzbs.org feed for xvid movies and made sure I set both my directories to what they are configured to in sabnzbd of which I see it can tell how many movies I already have. Any help is appreciated!
Re: Autodownload script
Posted: January 26th, 2009, 8:23 am
by minimad
Hi pinion,
Now I haven't looked at the movie script closely, but I'm guessing that the nzbs.org feed doesn't have a 'report:moreinfo' part, as I think that is a NewzBin specific option. You might have to do some tweaking to get it to use a non NewzBin feed.
@stokkes
I'll try to incorporate different naming formats. I thought I was doing well with just over 1TB, but 7TB crumbs, that's impressive. The format your using is a 'recognised' one, The script can process nzbs in that format, so it should be to difficult to modify to process the files and I'm sure the tvnamer.py processes in that format as well so expect something maybe tonight (my time), depending on the kids :-)
Re: Autodownload script
Posted: January 26th, 2009, 9:23 am
by pilGrim
Stokkes wrote:
Sorry, I'm not about to rename 5000+ episodes. Like I said, I have two HTPCs that rely on the episodes the way they're currently named (they both have databases that refer to filenames in their libraries). If I renamed all the episodes, the HTPCs would detect duplicate episodes and my watched list (all the episodes I've seen or haven't seen) would be wiped. I'm not about to put myself through that ordeal.
Stokes what program are you using on the HTPC? I use Meedio and there is a plugin to export your watched settings so you can re-import them after a database rebuild.
Re: Autodownload script
Posted: January 26th, 2009, 9:40 am
by pinion
Great! I was wanting to use Newzbin anyway but the URL for the feed is kind of funky so i wanted to make sure I was at least getting that part right. I'm fairly certain I am now but it looks as if it's having problems processing some of the chars in the name of the movie. At least that's what this sounds like to me:
Code: Select all
freenas:/mnt/Scratch# python2.5 /mnt/Scratch/rssmovies.py
295 existing movies
2009-01-26 19:36:33: 4: Rise of the Silver Surfer (2007)
2009-01-26 19:36:34: Total Recall (1990)
Checking to see if we have : "Total Recall" - yes
Traceback (most recent call last):
File "/mnt/Scratch/rssmovies.py", line 57, in <module>
print time.strftime("%Y-%m-%d %H:%M:%S")+": "+ report_title
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 41: ordinal not in range(128)
thanks minimad!
Re: Autodownload script
Posted: January 26th, 2009, 11:46 am
by markus101
I'm having issues with episodes getting added to the queue. I've posted the relevant portion of the debug output of Trying to download Numb3rs (it was on the RSS Feed), plus I had a decently long queue due to downloading some old TV shows for my Dad...
Here is the Pastebin link:
http://pastebin.com/m27419143
I've also tried this with an empty queue and the same issue persists, but this time it doesn't try to run through the entire queue (as there is none) before it says not in queue...
I tried applying the fix for 0.7 and the Newzbin downloading, that makes version 0.7 work, so I'm not completely out of luck for tonight's shows.
Re: Autodownload script
Posted: January 26th, 2009, 3:32 pm
by pinion
I had some time to check it out and this is the movie name it's getting stuck on "Fabuleux destin d'Amélie Poulain, Le (2001)" I'm going to edit my search to not take anything with é in it but would this be an easy fix? Now that some more movies have come up I see the script is working great... until it hits that movie name. Now I just need to figure out how to change the star rating and number of votes to fit my liking.
Re: Autodownload script
Posted: January 26th, 2009, 4:07 pm
by minimad
@markus101
If I understand correctly the 'fix' I sent you has worked for the shows you are trying to download. For those unaware the is a 'small' issue of if you us Newzbn, it doesn't actually put anything in the queue. I've fixed this in 0.8 and 0.81 (can't remember if I've posted those versions yet). Correct me if I'm wrong (on anything)
@pinion
Yep, 'non' english characters cause the script to go 'ga ga'. Not sure if I can fix that just yet, I'm only into week 3 of python coding so I'm still learning functions etc as I try to develop this script.
Re: Autodownload script
Posted: January 26th, 2009, 4:49 pm
by markus101
I applied the fix to 0.7 to make it add items to the queue, but 0.8 was a different issue, it never actually posted the Adding to queue message and simply went on to processing the next file in the feed. I see that 0.8 has the update applied, but doesn't properly add it to the queue, the difference I see is in line line (using WinMerge).
I am using the SmartQueue check which should run this code:
0.8:
Code: Select all
if isWanted(series, report, season) and isMissing(series, season, episode) and (not isInQueueSmart(series, season, episode)):
0.7:
Code: Select all
if isWanted(series, report) and isMissing(series, season, episode) and (not isInQueueSmart(series, season, episode)):
'
EDIT: Looks like this is failing before it is actually trying to send the file to the queue, I put in some debug print messages and I never get the message saying it is trying to be added to the queue as I did with the bug in 0.7 (that looks to be fixed in 0.
. here is a PasteBin of the log file relevant as well as the change I made in the script to get the "uncommon" print debug message.
I alos noticed that when looking for CSI: NY (which i don't want) the script returns CSI: Crime Scene Investigation, which I do want, but it is still rejected, this actually should be added to the queue (in error), which would be a different bug... Log is at the end of the pasteBin.
PasteBin:
http://pastebin.com/m55f0f740
Thanks,
Markus
Re: Autodownload script
Posted: January 26th, 2009, 5:32 pm
by Stokkes
pilGrim wrote:
Stokes what program are you using on the HTPC? I use Meedio and there is a plugin to export your watched settings so you can re-import them after a database rebuild.
XBMC on my Windows HTPC and Plex on my Mac one.
Re: Autodownload script
Posted: January 26th, 2009, 5:33 pm
by minimad
Hi Markus,
Err, yeah, CSI: NY, looks like the aliases code is messing up there.
If you put :-
if re.match("CSI- NY", showname, re.IGNORECASE):
print("MATCHED CSI- NY")
return "CSI: NY"
#end if re.match
just after the last CSI NY one, that should sort out the CSI problem. As you can see the aliases code is very very dumb, it has to be told about every different format for a CSI show and the order is important, I'll improve it at somepoint but hopefully I won't have to, theTVDB should have an aliases side built soon.
Not sure why its failing to add to queue but I'll check it out.
Re: Autodownload script
Posted: January 26th, 2009, 5:35 pm
by Stokkes
minimad wrote:
@stokkes
I'll try to incorporate different naming formats. I thought I was doing well with just over 1TB, but 7TB crumbs, that's impressive. The format your using is a 'recognised' one, The script can process nzbs in that format, so it should be to difficult to modify to process the files and I'm sure the tvnamer.py processes in that format as well so expect something maybe tonight (my time), depending on the kids :-)
You're exactly right, tvnamer.py processes the files just fine (in fact, in the configuration, you can set the format of the episode names), it also finds the seasons whether they are named Season 01 or Season 1.
I really appreciate you putting some time into this..
On a side note, in case anyone didn't know about MyTvNzb 2.5 RSS, check it out here (I'm not the author, it's just a plug).. Very interesting in that you can completely customize an RSS feed:
http://mytvnzb.foechoer.be/
Re: Autodownload script
Posted: January 26th, 2009, 7:37 pm
by minimad
HiAll,
Allow me to present version 0.81 (codename: bugger it I've deleted something I shouldn't have).
http://pastebin.com/f601122a4
New Features:
It should find ANY files in your tv dir for a missing match (didn't take me long Stokkes :-) ), no more renaming for the old timers. Haven't fixed the season search yet (still looks for xx rather than x) but hey, only one miracle per night.
It's had minimal testing (no newxbin tests yet). Download adding that was broken in 0.8 is fixed (hence the codename), oh yeah and I've cleaned up the code a bit (again with the codename).
Any suggestions for a codename for 0.82?