Page 22 of 88

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Posted: July 30th, 2010, 9:03 am
by csop19
wow, this looks cool :)

Just found sabnzbd+ today and installed CouchPotato + the UserScript.

However, if you have NoScript, it won't like the XSS :)
Just use this user-defined ABE rule

Code: Select all

# Allow Couchpotato to work with IMDB 
Site LOCAL
Accept GET POST from .imdb.com LOCAL
Deny
LOCAL indicates any location in your local network.

Keep it up :)
I shall add more feedback when I have gathered enough experience.

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Posted: July 30th, 2010, 1:44 pm
by vdown
Just spotted one other problem. If you have unpack_check set to 0 in config.ini (ie  __UNPACK__ isnt appended to the folder name) and Couch Potato has renaming enabled you get a corrupt file. As CouchPotato copies the file before its been fully unpacked.

I suppose the easy workaround is to write a script to move the file into the Couch Potato folder after its unpacked.

The reason I have unpack_check set to 0 is the amount of times sab renames fail under Windows, which is a Windows problem.

Thought that might help, if someone else was surprised to find corrupt files.

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Posted: July 30th, 2010, 2:23 pm
by csop19
One option would be to wait, until the temporary files are gone, and then start moving.

Another issue that I've encountered is the following: If sabnzbd runs on an other computer, the move will copy it to the destination, and then delete it at the old position. Just as if you'd copy from one partition to another.
The paths that I have set in CouchPotato are in the Windows-network path format, i.e. \\local-server-ip\downloads\movies move to: \\local-server-ip\video
When I use the Windows explorer and do a drag-and drop move, it works flawlessly. ChouchPotato however, copies and deletes.

I have just checked out the code from GitHub, and I'll see if I can find something. However, my Python is a little rusty :D

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Posted: July 30th, 2010, 2:45 pm
by RuudBurger
@csop19
I use shutil.move (http://docs.python.org/library/shutil.html#shutil.move) which should do a rename if its on the same file system. Could you post an issue for that on github? I'll check it out later.

@vdown
Could you tell me if the containing directory has the same "last edited date" as the file that is being extracted? If so, I could make a check and make sure that "last edited date" is more then xx seconds old before doing an rename.

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Posted: July 30th, 2010, 3:42 pm
by rascalli
@Ruudburger

Would it be possible tomake a downloaded page , maybe the same as the Movies Page
That way Couchpotato can still check if a movie was not there already , and we ahve a sort of libary.

What you think ???    :P  ::)

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Posted: July 30th, 2010, 3:50 pm
by RuudBurger
Just wanted to show the following numbers since I myself started using CP.
Image
I even deleted some successfully downloaded movies and some are still on "waiting for better quality", so I think downloaded could be about 60 :D

@rascalli
Yeah, I think I have to come up with something new for all the finished stuff, and other tasks that could be done with them. Like trailer download and eventually subtitles, thumbnails etc.

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Posted: July 30th, 2010, 4:18 pm
by rascalli
RuudBurger wrote: Yeah, I think I have to come up with something new for all the finished stuff, and other tasks that could be done with them. Like trailer download and eventually subtitles, thumbnails etc.
Sounds good, maybe an option to look at below ?? :  (not sure if that info is found on the API's )

* Languages
* Releases with subs

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Posted: July 31st, 2010, 2:45 am
by BradJ
Hi,

Love this program. Exactly what I've been looking for.

I've installed it on Windows 7 x64 Ultimate using the Windows installer.
I have about 20 movies that are 'Wanted'. One actually downloaded last night, but the others aren't downloading even though the NZB's are being found.

Below is an excerpt from the log for one of them. It appears CP is finding some NZB's but deciding not to submit them to sab (except for the one I mentioned above).
I have the retention set high so it's not due to that. Is it waiting for something? These movies aren't new.
Thanks.

17:23:26,950 INFO  [app.lib.provider.yarr.sources.nzbmatrix] Found: Fanboys 2008 LIMITED 720p BluRay x264 BestHD
17:23:26,950 INFO  [app.lib.provider.yarr.sources.nzbmatrix] Found: Fanboys 2008 LiMiTED PROPER 720p BluRay x264 SiNNERS
17:23:26,950 INFO  [app.lib.provider.yarr.sources.nzbmatrix] Found: Fanboys 2008 720p BluRay DTS x264 EbP
17:23:25,619 INFO  [app.lib.provider.yarr.sources.nzbmatrix] Searching: http://rss.nzbmatrix.com/rss.php?userna ... &subcat=42
17:23:25,532 INFO  [app.lib.provider.movie.search] Getting extra movie info for Fanboys.

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Posted: July 31st, 2010, 2:59 am
by csop19
@BradJ: nzbmatrix' download API is down, but search works.

So.. I have been working on my fork a little:

Code: Select all

http://github.com/alshain/CouchPotato
What are my ideas, what would I like to change:
at first, I want to thank you for the amount of time that you have put into this project, RuudBurger. It's great to have the chance to be working on this, when something, and that's quite a lot actually, already works, so you can extend more easily.
But that's exactly where I encountered the first problems... I believe the system, at its current state, is rather static, everything is hardcoded.

I have noticed that you "abuse" the webserver to pass application-specific configuration settings through the webserver. I have freed the imdbWrapper and themoviedb providers from this. They now access the configuration directly.
To simplify the access, I have refactored your main configuration class, "configApp". I have built a super class "ConfigWrapper" and ported the functionality to access the underlying config structure to that function. This gives us the possibility, to let plugins have their own configuration files while retaining easy access.
Then I've made a convenience class "ConfigSection", which gets, sets setDefaults to a specific section only.

The paths are now customizeable. You can set your own log path (the loge filename will remain the same though, so only specify the directory).
The path to the config file is now specified using an optional parameter when starting the script.
For example

Code: Select all

CouchPotato.py -d config/config.ini
It would be great if someone could check this on a linux system, because I have modified the path business in many places.

I have also changed the logging business. Removed some code I deemed uncecessary :D
Let's put it this way, the interface loads on my system :P

I have begun extending a superclass for the providers, but I feel that a complete overhaul is necessary to make the system as flexible as possible.
A problem that I have encountered is your naming scheme... I can't seem to get the grasp of it :)

The new plugin system has already been begun with, just look at the apps.lib.providerS package. and the plugin.py in lib. It's rudimentary still and I will have to spend some more thoughts about it what would be a smart solution and I'm curious for your input :)

As for the naming, what do these names stand for:
yarr, rss?
Also, in your provider package, it looks a little messy. You have a folder called yarr, movie, trailers, in the movie folder you have sources? imdbWrapper builds on top of baseMovie -> rss?

I can't rembember what else I've changed, I have just tried to organize the code a little bit better. Ah yes, the debug flag is now a static memeber of the class CouchPotato, which resides in the app package. Maybe it should be called Environment or w/e, it also keeps the log instance at ready and the path for the configuration directory.

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Posted: July 31st, 2010, 3:50 am
by RuudBurger
Wow, someone who knows what he is doing. That's what I needed ;)
Just a quick reply, as I am looking in you code right now.

yarr: is what a pirate says :D, its the base for all the nzb/torrent providers
rss: is just a base for the providers who use rss/xml
I know my naming is bit messy, but I try to use lowerCamelCase everywhere, except for database tables which are UperCamelCase

BTW:
Are you one windows? as lot of the code has been committed while there seems to be no change. Think only a different "newline" char?
Its makes it harder to see what changed.

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Posted: July 31st, 2010, 4:09 am
by csop19
"knows what he's doing"... I wouldn't say that, at least not python-wise :D - but I do a lot of OOP experience with PHP5.

yeah.. the line endings.... It always wanted to commit the cherrypy files :S just ignore them...
but I think I've got it under control now, found the option on my gitclient, that resolves that automagical feature :)

Can you update your copy of my code real quick? I just noticed that that I pushed a crash :D


//edit (naming): ah I see.
However, I wouldn't use a base class for RSS/XML. For instance, the IMDB lookup is not RSS based, nor is searching on any "provider". I'd create an extra RSS/XML class, or rather a real "Feeds" class to handle this.

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Posted: July 31st, 2010, 4:12 am
by RuudBurger
I really like the idea of it being more variable. Config in the provider class itself. Thats nice!
The logging really bugged me a lot, so I was happy that worked and just left it that way.
Providers are in yarr,movie,trailer because that are the 3 types I use right now. Yarr are the searchers for nzb/torrents. Trailers for trailers (doh) and movie contain the searchers to find movie information, which are IMDB and TMDB at the moment.

I feels kinda weird when someone else is judging your code this. hehe.

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Posted: July 31st, 2010, 4:17 am
by csop19
:D yeah I can understand that... (judging^^)

As for the provider config: I thought of creating a directy structure inside the config directory. Each plugin type would have its subfolder, then each plugin one folder with its name there inside. The plugin itself would reside in its own provider directory, including all its views.


Ah yes, something else I've changed is the handling with the database upgrade. It nows uses Introspection to discover an appropriate migration function.

As you can see, I have left the providers untouched, I have created the providers package instead, a name that I find more appropriate, since the contents is going to be multiple providers, and not just classes, that are used for a provider.

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Posted: July 31st, 2010, 4:18 am
by RuudBurger
Please check you PM :D

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Posted: July 31st, 2010, 5:19 pm
by Bluedust
Forgive my ignorance, still new to all this stuff.
I love the interface while the movies are waited to be downloaded, with all the ratings and details and such.  But it seems like once they're downloaded all that goes away, is there a way to change that?

I love how in SickBeard even though it's handled through Sabnzbd and eventually XBMC, that you have the web interface with all your shows you downloaded, descriptions, pictures, etc etc.

Also, is there a way for it to pick up the movies in the folder I downloaded before I installed CouchPotato?  They're all in the same folder but only the ones I set to download in CouchPotato actually show up in it.  Granted I'm still new to this so hopefully I made sense.

PS.  The IMDB grab thing is phenomenal, definitely helps when you have the less tech-inclined in the same house!