[Feature Request] Scripting support in RSS Feeds

Discuss newly added features or request new features.
kloaknet
Posts: 337
Joined: 23 Jul 2014, 08:52

Re: [Feature Request] Scripting support in RSS Feeds

Post by kloaknet » 05 Sep 2015, 12:10

NZBFP_FEEDID returns '0', while the FeedX.something on the RSS Feeds settings page shows a 1. Also when a Feedscript is called, the log shows

Code: Select all

Executing feed-script a.py for Feed0
while the RSS Feed 1 is started. Might be confusing for the users.

EDIT: its a bit more odd, calling RSS via Downloads Tab, hitting Feeds button
when calling the RSS feed 1 (from settings page) it returns me a 0
when calling the RSS feed 2 (from settings page) it returns me a 1
when calling the RSS feed 3 (from settings page) it returns me a 0, while it says Feed0 in the logs

The above is probably related to that for 2, 2 feeds are active at the same time or something?

It looks like the feed number returned via NZBFP_FEEDID is related to the # of active feeds, not the actual feed being called? Would it be possible to add another variable that gives the number of the feed being used, so e.g. the Feed name can be retrieved, or a check can be made that it only is applied to a typical set of feeds (although you have come up with the FeedX.script option)

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

Re: [Feature Request] Scripting support in RSS Feeds

Post by hugbug » 05 Sep 2015, 18:26

He-he, this all has been fixed yesterday :)

l2g
Posts: 228
Joined: 27 Jun 2014, 22:13
Contact:

Re: [Feature Request] Scripting support in RSS Feeds

Post by l2g » 08 Sep 2015, 01:56

I wrapped this awesome new feature into pynzbget (commit); I hope you don't mind :)!

I do have a few quick questions about the FeedID though:
  1. Once you get it (NZBFP_FEEDID), do you use it to index into the other environment variables similar to how the Scheduler/Task scripts work (using the TaskID)? Hence is FeedX.FeedScript accessed via NZBFP_FEED_X_FEEDSCRIPT?
  2. Does FeedX.FeedScript == NZBFP_FILENAME? What other types can i expect to find here?

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

Re: [Feature Request] Scripting support in RSS Feeds

Post by hugbug » 14 Sep 2015, 17:23

l2g wrote:Once you get it (NZBFP_FEEDID), do you use it to index into the other environment variables similar to how the Scheduler/Task scripts work (using the TaskID)? Hence is FeedX.FeedScript accessed via NZBFP_FEED_X_FEEDSCRIPT?
Yes, this is however broken when creating a new feed and the script is called from settings page in a case the new feed isn't saved into config file yet. There shouldn't be necessary for a feed script to access these settings though.
l2g wrote:Does FeedX.FeedScript == NZBFP_FILENAME? What other types can i expect to find here?
NZBFP_FILENAME is the name of temporary rss feed content file, which the script must read and write back a modified version of the feed.

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests