Media Rover

Got a program that plays well with SABnzbd? Share it here!
wally007
Release Testers
Release Testers
Posts: 155
Joined: August 28th, 2009, 5:24 pm

Re: Media Rover

Post by wally007 »

kierse wrote: Hey wally007
wally007 wrote: Thanks. Care to explain how you approached quality support ?

2. series has desired quality level of 'high' and will accept 'low' or 'high' quality episodes.  Episode A on disk has quality level 'low'.
- MR will only replace episode A with an offering of quality 'high'

Kierse
It sounds great but i'm afraid how Plex / XBMC will deal with this. Once episode is scraped, its added to the database. If different file with same episode number is added , PLex / XBMC will show given episode twice. It could be solved if MR could delay downloading "non" preferred quality for user defined time frame.

Say, series has desired quality level of 'high' and will accept 'low' or 'high' quality episodes. Episode shows up in the LOW level feed. - MR could wait for XX minutes , waiting for episode to show up in HIGH level feed.
Obviously MR would have to add "bookamark" to the database to be able to download LOW level file if HIGH level file is not in the feed in user defined time frame.

I guess this would add even more complexity to the project, but i'm no programmer so i have no idea how complex this would get to implement. 
User avatar
kierse
Sr. Member
Sr. Member
Posts: 254
Joined: March 5th, 2009, 11:59 pm
Location: Canada
Contact:

Re: Media Rover

Post by kierse »

wally007 wrote: It sounds great but i'm afraid how Plex / XBMC will deal with this. Once episode is scraped, its added to the database. If different file with same episode number is added , PLex / XBMC will show given episode twice. It could be solved if MR could delay downloading "non" preferred quality for user defined time frame.

Say, series has desired quality level of 'high' and will accept 'low' or 'high' quality episodes. Episode shows up in the LOW level feed. - MR could wait for XX minutes , waiting for episode to show up in HIGH level feed.
Obviously MR would have to add "bookamark" to the database to be able to download LOW level file if HIGH level file is not in the feed in user defined time frame.

I guess this would add even more complexity to the project, but i'm no programmer so i have no idea how complex this would get to implement. 
Hmm, that does complicate things a bit.  When sorting a new download, MR checks if the episode already exists on disk.  If it is, and the new download is of a more desirable quality level, MR will replace the existing episode with the new episode.  Would this behavior confuse Plex/XBMC?  The file will still have the same name and there will only be one copy of a given episode on disk.  The only noticeable difference will be the size of the file.
wally007
Release Testers
Release Testers
Posts: 155
Joined: August 28th, 2009, 5:24 pm

Re: Media Rover

Post by wally007 »

well if anything , usually LOW Q = .avi container , HIGH Q = .mkv container.

Another issue with Plex/XBMC/Boxee is that once file gets replaced by another file , "WATCHED" status will get shot to hell.

I still think what you're doing is great ... i was just thinking aloud what would happen if 2 day old episode gets replaced. This scenario will have to be taken into consideration by user when setting up MR and using it with XBMC forks. ( though Plex users might be better off since new library is supposed to replace old and very strict XBMC library )

Also hopefully MR will "DELETE" old episode ONLY if newly downloaded episode is extracted correctly by sabnzbd ( ie passed the new job completion flag )
Last edited by wally007 on April 14th, 2010, 3:10 pm, edited 1 time in total.
jkristoph
Newbie
Newbie
Posts: 19
Joined: June 6th, 2009, 1:59 pm

Re: Media Rover

Post by jkristoph »

There is a simple solution to all of this...and I currently do it...works like a charm!

curl --get "http://0.0.0.0:3000/xbmcCmds/xbmcHttp?c ... ary(video)"

Also enable "clean library on update" advanced option in plex or xbmc.

This command initiates a library update for XBMC, Plex etc.  I have placed this line of code at the end of the media rover sorting script and viola.  Every time a file is downloaded my library is automatically cleaned and updated.
wally007
Release Testers
Release Testers
Posts: 155
Joined: August 28th, 2009, 5:24 pm

Re: Media Rover

Post by wally007 »

jkristoph wrote: There is a simple solution to all of this...and I currently do it...works like a charm!

curl --get "http://0.0.0.0:3000/xbmcCmds/xbmcHttp?c ... ary(video)"

Also enable "clean library on update" advanced option in plex or xbmc.

This command initiates a library update for XBMC, Plex etc.  I have placed this line of code at the end of the media rover sorting script and viola.  Every time a file is downloaded my library is automatically cleaned and updated.
That works on local machine. Usually, users use Media Rover and Sabnzbd on home server where media is stored but XBMC/PLEX/BOXEE is in the living room on quite HTPC.
jkristoph
Newbie
Newbie
Posts: 19
Joined: June 6th, 2009, 1:59 pm

Re: Media Rover

Post by jkristoph »

Change the IP, I have mine set at:

curl --get "http://192.168.1.121:3000/xbmcCmds/xbmc ... ary(video)"

My setup is similar to what you have mentioned and I update the Plex Box through my LAN.
wally007
Release Testers
Release Testers
Posts: 155
Joined: August 28th, 2009, 5:24 pm

Re: Media Rover

Post by wally007 »

No no , you probably dont understand what i mean.

Most users have sabnzbd and media rover on server , computer that is running all the time.

XBMC/PLEX/BOXEE is meant for living room , mac mini / apple tv / asus 330 / xbox etc and THESE are NOT ON all the time , only woken up when user wants to play media.

If you have more than 1 HTPC at home , how would you update all of them ( when they're not ON ) Also there's a  risk cleaning up/ erasing your whole library in case mount share got disconnected ?!
Also "WATCHED" status and recently added section will get messy if there's no time limit on how long MR will look for preferred quality.
As far as i know XBMC doesnt have centralized library , plex surely doesnt , not yet anyway.

I admit this is limitation of XBMC ( forks ) library code, NOT Media Rovers problem  but its just something to keep in mind. In my own case , i KNOW which Shows are released in HD and which are not so i will just do what i do now, run 2 instances of MR.
Last edited by wally007 on April 15th, 2010, 1:17 am, edited 1 time in total.
User avatar
kierse
Sr. Member
Sr. Member
Posts: 254
Joined: March 5th, 2009, 11:59 pm
Location: Canada
Contact:

Re: Media Rover

Post by kierse »

wally007 wrote: ...once file gets replaced by another file , "WATCHED" status will get shot to hell.
I also use XBMC and will start doing some testing to see if any of your concerns are valid.  When replacing an episode, two things will change: a) the file size, and b) the modification date.  As long as the new file is named exactly the same as the one it's replacing, I don't see how XBMC/Plex (or any other app) will be able to tell the difference (unless they monitor size or modification date, which seems unlikely).  Hopefully testing will let us know.
wally007 wrote: Also hopefully MR will "DELETE" old episode ONLY if newly downloaded episode is extracted correctly by sabnzbd ( ie passed the new job completion flag )
As mentioned, the new status flag is now supported.  The sorting script will stop unless everything unpacked as expected
wally007 wrote: Also there's a  risk cleaning up/ erasing your whole library in case mount share got disconnected ?!
Good point, if your connection drops for some reason while copying a large file across your internal network you will be left with a corrupt/incomplete episode file.  I'll look at changing how the sorting script replaces an existing file to limit this possibility.
wally007 wrote: Also "WATCHED" status and recently added section will get messy if there's no time limit on how long MR will look for preferred quality.
Before I even consider tackling an upgrade time limit, I want to verify that replacing an existing file will mess with its watched status.  Adding a time limit would definitely complicate things
wally007 wrote: In my own case , i KNOW which Shows are released in HD and which are not so i will just do what i do now, run 2 instances of MR.
The new quality system should definitely help with your setup.  You can now specify quality on a per series basis as well as indicate what quality a particular source feed offers.

Kierse
User avatar
kierse
Sr. Member
Sr. Member
Posts: 254
Joined: March 5th, 2009, 11:59 pm
Location: Canada
Contact:

Re: Media Rover

Post by kierse »

Nice!  I've recently started using XBMC and was hoping there was something like this.  Thanks for the heads up!

Kierse
wally007
Release Testers
Release Testers
Posts: 155
Joined: August 28th, 2009, 5:24 pm

Re: Media Rover

Post by wally007 »

Kierse , im pretty sure it will detect new file.

Like i said , SD files are .avi , HD files are .mkv. You can try this with simple renaming.

Scrape file LOST S01E01.avi and then quit Plex/XBMC.
rename that file to LOST S01E01.mkv and start up XBMC and update the library again .

You'll see that Season 1 , Episode 1 shows up in XBMC/PLex twice , EVEN THOUGH only one copy is on the disk. By default ( and recommended ) XBMC doesnt clean up library , only adds newly found files. You have to go to settings and clean library to remove .avi version of the episode.
Last edited by wally007 on April 16th, 2010, 8:08 pm, edited 1 time in total.
User avatar
kierse
Sr. Member
Sr. Member
Posts: 254
Joined: March 5th, 2009, 11:59 pm
Location: Canada
Contact:

Re: Media Rover

Post by kierse »

wally007 wrote: Like i said , SD files are .avi , HD files are .mkv.
Yes, you are indeed correct.  For some reason I wasn't considering the file extension when thinking about replacing the file.  Ok, I'll look at adding some sort of a delay option to the scheduler.

Kierse
avatarr
Newbie
Newbie
Posts: 29
Joined: April 17th, 2010, 9:46 pm

Re: Media Rover

Post by avatarr »

First of all, my sincere apologies for what I fear is a stupid question. Since I was unable to explicitly find the answer in this thread (or at least a few pages of it) or the wiki, I'm going to ask anyway.

I have a QNAP NAS running sabnzbd automatically that also has Python installed on it, what would be the best way to go about using MR on my NAS? I realize I can install it and run it at the command line through ssh, but how do I make it run periodically to "scan" for new shows on a regular basis without having to manually prompt MR to run?

Thanks in advance; and please be gentle to this linux / python noob.  :-\
User avatar
kierse
Sr. Member
Sr. Member
Posts: 254
Joined: March 5th, 2009, 11:59 pm
Location: Canada
Contact:

Re: Media Rover

Post by kierse »

Hey avatarr,

I don't own nor have I ever used a QNAP NAS before but hopefully I can help you get things setup.  Here goes:
avatarr wrote: I have a QNAP NAS running sabnzbd automatically that also has Python installed on it, what would be the best way to go about using MR on my NAS?
You can put MR wherever you like.  The simplest place would be to put it in the home directory of the user you SSH in with.
avatarr wrote: I realize I can install it and run it at the command line through ssh, but how do I make it run periodically to "scan" for new shows on a regular basis without having to manually prompt MR to run?
You'll need to set up a cron job (if you are unfamiliar with the term, cron jobs are basically scheduled tasks) to run MR every X number minutes.  The QNAP web interface might give you the ability to register new cron jobs, otherwise you'll need to do it via the command line.  Cron can be confusing for new users so I'd recommend using a cron builder (like this one: http://www.robertplank.com/cron/). 

Let me know if you run into any problems.  Good luck!

Kierse
avatarr
Newbie
Newbie
Posts: 29
Joined: April 17th, 2010, 9:46 pm

Re: Media Rover

Post by avatarr »

kierse,
First of all, thanks for the timely and helpful response. I was finally able to get it configured and get it to queue downloads. I haven't tackled the cron job yet, but it doesn't look too difficult.

My next question is related to the post-processing script (PPS). This would be the first time I'll be using a PPS and the available documentation for sab for post-processing scripts is pretty light. Assuming I don't use any other PPS's, what would be the best way to go about configuring sab to use the episodesort.py script; and how does it know to run just for TV and not other stuff? And finally, how does it know to run just on jobs added via MR (or will it run on other TV jobs if I bookmark them on nzbmatrix)?

I read the wiki / setup instructions where it alludes to placing the script in the sab script folder; and there was also mention of a symbolic link (and one person who seems to have just specified the script itself). If I point it to the mediarover directory on my nas, where I have the job running (linux), should it be running the .py file, the .sh file, or something else? Basically, how do I get it to work correctly?  If someone could post a small screen shot of that part of their sabnzbd configuration and give a little bit of amplifying information on the location of their script(s), that would probably do it for me.

I realize this sounds very noobish and I'm borderline embarrassed for asking, but seeing as everyone in this thread seems to be very helpful and patient, I figured it couldn't hurt.

Thanks again for a great script. I think you'll find a lot more people using this after newzbin.com's demise.
wally007
Release Testers
Release Testers
Posts: 155
Joined: August 28th, 2009, 5:24 pm

Re: Media Rover

Post by wally007 »

its all in categories. MR asks you in conf file what category you want Media Rover to use. So you can either make new media_rover category and assign post processing script to that category or just use existing TV category and assign post processing script to that.

So in summary its very easy : decide which category you want to use with Media Rover ( type that in conf file ) and then assign post processing script to that category in Sabnzbd.

As far as setting up post processing script in sabnzbd , its all very detailed in Manual and Wiki.
Post Reply