Un-official FlexRSS Plugin for 1.1.x

Suggest, post, or discuss plugins for Deluge
Locked
SGSeries2
Member
Member
Posts: 26
Joined: Sun Sep 07, 2008 1:56 am

Un-official FlexRSS Plugin for 1.1.x

Post by SGSeries2 »

Hey guys,

Since I was tired of using my old torrent client, and I absolutely despise it when new releases come out and there is no rss support. (No offense to the deluge team. They're doing a great job, and I'd prefer they handle the bigger bugs first.) So, I've hacked together a new version of flexRSS for the 1.x series so that we don't have to wait for 1.2+ of deluge (like some other torrent client I know) for an rss feed plugin. So, if you feel daring, go ahead an give it a try.

This is in no way a substitution for any officially released version that may come out, since all I really wanted to do was hack around in python a bit. (First time.) This is more or less a direct port, so the code is a bit ugly and many of the fancy new features in the 1.x api for plugins are not taken advantage of. So, if anyone is working on this plugin (or similar), feel free to continue, take a gander at what I did to port it for ideas, or whatever.

Typical dislaimer: All copyrights held by their respected, original copyright holders, provided as is, no warranties of any kind, freely redistributable using GPL, etc., etc. You get the idea.

Warnings:
-I've only tested this under sabayon (linux) x86_64 with py2.5 on 1.0RC8, svn (rev3038), official 1.0 (for about 6 hrs. and counting... so far svn 3038 has been the most stable for me)
-Haven't really tested the cookies feature, since I never use them, but I know they're saved and loaded appropriately. The rest should be transparent between versions, so they should work just like they did in the older release.

Some notes on changes/features different from the official .5x series flexRSS plugin:

-support for the 1.x api :)
-config tab is now in the general preferences section
-new history tab (wip) - currently only provides a history for generic-type filter matches that have successfully been added to deluge
-open url option added to feeds section's right-click menu (useful for feeds that sometimes reference websites instead of a torrent link)
-there is a webui, but there's currently nothing there; I don't use this feature, so it may never happen unless I'm/someone else's inclined otherwise to add it

known issues/limitations:
-flexrss config files from the .5x series have been known to cause issues; the typical issue is that the plugin will not load at all with them in your config directory. Removing these files from your deluge config directory (ex. ~/.config/deluge/flex*) is currently the only solution. (As an extra precaution, you could back them up just in case you ever need them again.)
-in filters, 'Insert torrent at top of queue' doesn't work (limitation as of svn 3830 / too lazy to implement a cb, since it adds complexity for something so simple)
-if you try to download a torrent from the flexRSS ui and adding the torrent fails, there's no real feedback unless you started deluge from cli and are watching the cli for messages (check to see if it is a valid torrent file using the new open url option)
-filtering doesn't exactly work as expected* (It should work exactly the same as the previous version, but has this really ever worked correctly? No, seriously, has it? :))

*suggestion for the last entry: if you have any non-alphanumeric character in what you want to match, use a '.*' instead of some other, more 'accurate' regex convention (like escapes).

To install on linux, put the attached egg file in your /usr/lib/python2.*/site-packages/deluge-*/deluge/plugins folder (make sure you have permissions)
To install on windows... I don't know. :)

If you remove it, be sure to disable the plugin before removing. (In v1.0, deluge would crash on me if it wasn't there and it was enabled. Didn't really test the rest.)
Attachments
flexRSS-0.1.egg
(157.89 KiB) Downloaded 9831 times
Last edited by SGSeries2 on Sun Oct 12, 2008 9:52 pm, edited 1 time in total.
reference2myself
New User
New User
Posts: 8
Joined: Sat Dec 15, 2007 5:01 pm

Re: Un-official FlexRSS Plugin for 1.x

Post by reference2myself »

When I enable this plugin it doesn't give me a configuration tab on Ubuntu 8.04
johnnyg
Top Bloke
Top Bloke
Posts: 1522
Joined: Sun Oct 28, 2007 4:00 am
Location: Sydney, Australia

Re: Un-official FlexRSS Plugin for 1.x

Post by johnnyg »

I got it working by copying the .egg to /var/lib/python-support/python2.5/deluge/plugins/.
awesome work for doing such a quick port (despite no longer being able to specify where to download a filter) :D
markybob
Compulsive Poster
Compulsive Poster
Posts: 1230
Joined: Thu May 24, 2007 11:27 pm
Location: Chicago, IL, USA
Contact:

Re: Un-official FlexRSS Plugin for 1.x

Post by markybob »

SGSeries2 wrote:Hey guys,

Since I was tired of using my old torrent client, and I absolutely despise it when new releases come out and there is no rss support. (No offense to the deluge team. They're doing a great job, and I'd prefer they handle the bigger bugs first.) So, I've hacked together a new version of flexRSS for the 1.x series so that we don't have to wait for 1.2+ of deluge (like some other torrent client I know) for an rss feed plugin. So, if you feel daring, go ahead an give it a try.

This is in no way a substitution for any officially released version that may come out, since all I really wanted to do was hack around in python a bit. (First time.) This is more or less a direct port, so the code is a bit ugly and many of the fancy new features in the 1.x api for plugins are not taken advantage of. So, if anyone is working on this plugin (or similar), feel free to continue, take a gander at what I did to port it for ideas, or whatever.

Typical dislaimer: All copyrights held by their respected, original copyright holders, provided as is, no warranties of any kind, freely redistributable using GPL, etc., etc. You get the idea.

Warnings:
-I've only tested this under sabayon (linux) x86_64 with py2.5 on 1.0RC8, svn (rev3038), official 1.0 (for about 6 hrs. and counting... so far svn 3038 has been the most stable for me)
-Haven't really tested the cookies feature, since I never use them, but I know they're saved and loaded appropriately. The rest should be transparent between versions, so they should work just like they did in the older release.

Some notes on changes/features different from the official .5x series flexRSS plugin:

-support for the 1.x api :)
-config tab is now in the general preferences section
-new history tab (wip) - currently only provides a history for generic-type filter matches that have successfully been added to deluge
-open url option added to feeds section's right-click menu (useful for feeds that sometimes reference websites instead of a torrent link)
-there is a webui, but there's currently nothing there; I don't use this feature, so it may never happen unless I'm/someone else's inclined otherwise to add it

known issues/limitations:
-in filters, 'Insert torrent at top of queue' doesn't work (limitation as of svn 3830 / too lazy to implement a cb, since it adds complexity for something so simple)
-if you try to download a torrent from the flexRSS ui and adding the torrent fails, there's no real feedback unless you started deluge from cli and are watching the cli for messages (check to see if it is a valid torrent file using the new open url option)
-filtering doesn't exactly work as expected* (It should work exactly the same as the previous version, but has this really ever worked correctly? No, seriously, has it? :))

*suggestion for the last entry: if you have any non-alphanumeric character in what you want to match, use a '.*' instead of some other, more 'accurate' regex convention (like escapes).

To install on linux, put the attached egg file in your /usr/lib/python2.*/site-packages/deluge-*/deluge/plugins folder (make sure you have permissions)
To install on windows... I don't know. :)

If you remove it, be sure to disable the plugin before removing. (In v1.0, deluge would crash on me if it wasn't there and it was enabled. Didn't really test the rest.)
SGSeries2,
we've been hoping for someone to pick up the slack on rss :) andar nor i use rss, so it gets sidelined. do you plan on maintaining this? if so, we could talk about getting you svn access and become part of our little team. in any case, hope to see you in our irc channel (#deluge on freenode). thanks
SGSeries2
Member
Member
Posts: 26
Joined: Sun Sep 07, 2008 1:56 am

Re: Un-official FlexRSS Plugin for 1.x

Post by SGSeries2 »

reference2myself wrote:When I enable this plugin it doesn't give me a configuration tab on Ubuntu 8.04
From OP:
SGSeries2 wrote:-config tab is now in the general preferences section
(with respect to above: under the flexRSS header on the left side) Is that where you looked when flexRSS was enabled? (screenshot, screenshot... I have none. :()
johnnyg wrote:despite no longer being able to specify where to download a filter
I didn't notice that that was a previous feature. It's been a loooong time since I used the original. I'll have to look into it.
markybob wrote:andar nor i use rss ...do you plan on maintaining this? ...
What do you mean you don't use rss? :shock: Well, as far as maintaining, so long as I'm a deluge rss user, I don't see why not. Deluge currently seems pretty solid, so I don't see why that would change anytime soon. If someone finds a bug in this plugin, it is brought to my attention, and I can recreate the issue, then sure, I'd be willing to fix it. 8-)
mvoncken
Developer
Developer
Posts: 225
Joined: Mon Sep 03, 2007 9:38 pm

Re: Un-official FlexRSS Plugin for 1.x

Post by mvoncken »

Great work!

I took a little peek at your code and I did notice that the gtk-ui has to be running to download feeds and auto-add.
It would be best if downloading feeds and adding torrents is executed in the core part of the plugin.

I can give more specific help if you want to modify this.
dev: webui, core, labels | irc:vonck7 |
SGSeries2
Member
Member
Posts: 26
Joined: Sun Sep 07, 2008 1:56 am

Re: Un-official FlexRSS Plugin for 1.x

Post by SGSeries2 »

mvoncken wrote:Great work!

I took a little peek at your code and I did notice that the gtk-ui has to be running to download feeds and auto-add.
It would be best if downloading feeds and adding torrents is executed in the core part of the plugin...
Thanks!

Ah, you're right. The gtk-ui does indeed need to be running. Well, my primary concern at the time was just getting it up and running in a 'classic' environment (where the gtk ui was always up). I wasn't too familiar with the core-gui separation aspects other than the very basics at the time, too. So, that's certainly an avenue I will have to look into more in-depth to make it useful in a non-gtk ui environment. It's one of the reasons I had no plans on a webui for the plugin atm, since implementing one in its current state would require too much redundant code and add unnecessary complexity. This core-gtk separation thing would have to be done first.

Much of the gtk callback functions are separate from their primary tasks already anyways, so it may not be too hard of a transition, as soon as I figure out how to utilize export functions in the core portion of the plugin for use on the gtk side of things. I think the blocklist plugin also has some export function(s), so I may look into that for some guidance, too.
durand
New User
New User
Posts: 6
Joined: Wed Apr 16, 2008 8:15 pm

Re: Un-official FlexRSS Plugin for 1.x

Post by durand »

Thanks! Works great on Ubuntu Intrepid. Now I just have to figure out how to use FlexRSS :shock:
danii
Seeder
Seeder
Posts: 123
Joined: Tue Oct 23, 2007 10:29 pm
Location: Braga, Portugal

Re: Un-official FlexRSS Plugin for 1.x

Post by danii »

First of all thank you SGSeries2 for picking up the RSS plugin. I've using it for a week and it works pretty well
durand wrote:Thanks! Works great on Ubuntu Intrepid. Now I just have to figure out how to use FlexRSS :shock:
you can allways start with the FlexRSS documentation it seems a bit outdated but it's a good start
the FlexRSS thread is also a good place to find some tips
durand
New User
New User
Posts: 6
Joined: Wed Apr 16, 2008 8:15 pm

Post by durand »

Yeah, I think I have most of it covered now. There was a moment when every episode from the past series started downloading but it should be fine now :). One thing I would like to know is how to manually tell it to add new torrents. It seems to be at random or when deluge first starts but is there a manual "Check for new torrents" button?

Thanks and one again, good job!
Locked