[Plan] Movie watch script, sort of couchpotato

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
Post Reply
kloaknet
Posts: 337
Joined: 23 Jul 2014, 08:52

[Plan] Movie watch script, sort of couchpotato

Post by kloaknet » 30 Aug 2015, 18:13

Hi coders,

Because of the new feature within NZBget to use Filter scripts before and nzb is grabbed from a feed (haven't really looked into it how it works, but seems promising), It should somehow be possible to make something to watch for typical movies based on imdb ID. (ill leave out shows, because its hard to get past Sonarr/SickGear/tons of alternatives, and RSS TV feeds get dumped with shows). I think I can figure out the filtering on quality etc (ie on a Newznab mymovies feed or something). Ok I know a lot is already possible with filters, but that really requires some coding skills to configure it, or scary copy paste work for other users.

So idea for the filtering part is to make a filter script, add filter options via settings page (optionally specify stuff etc), and raise dupe scores to get all the options users will need.


The 2nd, and more difficult part, and I am not an experienced py/interface coder, is the hope to use the option hugbug has planned :) https://github.com/nzbget/nzbget/issues/50, and reading that it may even looks like a command line option, where you could enter a movie name to search for a match and accept that match or not to be added to a watch list based on imdb ID. Starting a nice looking popup in NZBget itstelf would maybe be even cooler ;-to show e.g. the list of movies you have under watch). Maybe hugbug can shoot some holes in the above idea, so I don't waste time on getting the 2nd part to work. :oops:


Overall I don't want something that looks fancy, but something that just works, is way lighter than couch (no need for fancy trailers etc). Getting the filter script stuff etc to work would be already cool enough in combination with Newznab MyMovies. In the future, I ll try to start with the filter script stuff..., if you got great plans, or are a better coder, feel free to join this quest.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [Plan] Movie watch script, sort of couchpotato

Post by hugbug » 30 Aug 2015, 19:07

What you describe is already possible with rss filters and don't require scripts.

However if you want to avoid "scary" filters you can make the script a scheduler script which fetches the nzbs from indexer on its own. A problem with rss feeds is that if the user adds another movie to the list you have to search the indexer for the movie (may be it's already available). This doesn't work with rss feeds. Since you already did the direct communication with indexer you can do the rss part too.
kloaknet wrote:The 2nd, and more difficult part
Luckily there is a solution for that which doesn't require any UI at all. IMDB has a watchlist-feature. The user (with imdb account) adds movies to personal list with one click and your script fetches that list periodically or at each run.

When the script sees a new movie in the list it searches nzb using API calls. Later it monitors rss feeds for the movies in the list.

kloaknet
Posts: 337
Joined: 23 Jul 2014, 08:52

Re: [Plan] Movie watch script, sort of couchpotato

Post by kloaknet » 31 Aug 2015, 15:10

hugbug wrote:What you describe is already possible with rss filters and don't require scripts.

However if you want to avoid "scary" filters you can make the script a scheduler script which fetches the nzbs from indexer on its own. A problem with rss feeds is that if the user adds another movie to the list you have to search the indexer for the movie (may be it's already available). This doesn't work with rss feeds. Since you already did the direct communication with indexer you can do the rss part too.
I think the filters are amazing :D (I only miss an 'ignore' option, to ignore the item in the feed until next check ;), btw I just noticed that on the wiki, https://github.com/nzbget/nzbget/wiki/RSS the dupescore:downloading option is not mentioned? ) , but the average usenet user isn't that kind of a coder anymore. So I'd like to make it just as simple as a script, with working basic settings/filters/toggle options. I like the scheduler idea, but I am a bit lazy and don't want to read/split/etc the RSS, as I think NZBget does filter the info already with the feed script option. The API part is true, and sort of needed for looking into already available items, but I have to start somewhere.
hugbug wrote: Luckily there is a solution for that which doesn't require any UI at all. IMDB has a watchlist-feature. The user (with imdb account) adds movies to personal list with one click and your script fetches that list periodically or at each run.
Thats a really great idea, it probably makes the script also a lot lighter/user friendlier (and easier to write)!

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [Plan] Movie watch script, sort of couchpotato

Post by hugbug » 03 Sep 2015, 20:11

kloaknet wrote:I only miss an 'ignore' option, to ignore the item in the feed until next check
Wouldn't reject for items newer than, say 15 minutes, do the similar job?

Code: Select all

Reject: age:<15m
kloaknet wrote:I just noticed that on the wiki, https://github.com/nzbget/nzbget/wiki/RSS the dupescore:downloading option is not mentioned?
You mean "dupestatus:downloading", right? Indeed. Fixed. Thanks.

BTW, Update:
  • new option "FeedX.FeedScript" to define per rss feed scripts; in addition to existing global option “FeedScript”.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [Plan] Movie watch script, sort of couchpotato

Post by hugbug » 03 Sep 2015, 20:28

kloaknet wrote:Thats a really great idea, it probably makes the script also a lot lighter/user friendlier (and easier to write)!
For the first version I recommend to write a relatively simple script:
  • the script fetches imdb watch list and saves it into "TempDir";
  • the watchlist is fetched not on every run but according to definable update interval, in minutes or hours;
  • the script has options to define imdb user id and update interval;
  • the script loads the rss feed from passed file, inspects all items using field "imdbid" and removes all items which are not in the watchlist.
How to use the script:
  • set options imdb user id and update interval;
  • add new rss feed with feed URL for new HD content or similar;
  • choose the script for FeedX.FeedScript
That's it.

NZBGets duplicate handling takes care of not downloading already downloaded titles.

If user has specific preferences to quality settings he can use rss filter.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [Plan] Movie watch script, sort of couchpotato

Post by hugbug » 04 Sep 2015, 21:40

I've written a simple version as spoken in my previous post.
I'll post it in its own thread. Feel free to reuse it in your more complex script.

kloaknet
Posts: 337
Joined: 23 Jul 2014, 08:52

Re: [Plan] Movie watch script, sort of couchpotato

Post by kloaknet » 05 Sep 2015, 06:07

hugbug wrote: Wouldn't reject for items newer than, say 15 minutes, do the similar job?

Code: Select all

Reject: age:<15m
If I am right, the reject option sets the item to rejected for all time after the first check of the feed, isn't it? So basically when you want to wait to download a other version, because a earlier version is being downloaded the

Code: Select all

Reject: dupestatus:downloading
will result in a reject item in the queue that isn't picked up again?

hugbug wrote: For the first version I recommend to write a relatively simple script:
  • the script fetches imdb watch list and saves it into "TempDir";
  • the watchlist is fetched not on every run but according to definable update interval, in minutes or hours;
  • the script has options to define imdb user id and update interval;
  • the script loads the rss feed from passed file, inspects all items using field "imdbid" and removes all items which are not in the watchlist.
How to use the script:
  • set options imdb user id and update interval;
  • add new rss feed with feed URL for new HD content or similar;
  • choose the script for FeedX.FeedScript
That's it.

NZBGets duplicate handling takes care of not downloading already downloaded titles.

If user has specific preferences to quality settings he can use rss filter.

Yep, that's what I was thinking about, first I just wanted to start with quality filtering, but having the movie filter part that easy, starting with that is way more fun :)

Edit:
hugbug wrote:I've written a simple version as spoken in my previous post.
I'll post it in its own thread. Feel free to reuse it in your more complex script.
A cool, making it probably even easier for me :)

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [Plan] Movie watch script, sort of couchpotato

Post by hugbug » 05 Sep 2015, 19:51

kloaknet wrote:If I am right, the reject option sets the item to rejected for all time after the first check of the feed, isn't it?
No, only accepted items (+backlog items) are stored in the feed history and are not processed again. Rejected items will be processed on sub-sequential feed fetches and can be eventually accepted later, like in the example with "age".

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests