Re: [Plugin] YaRSS2 - RSS plugin with GTKUI support
Posted: Mon Nov 13, 2017 2:33 pm
You didn't get my question. I had a problem with 2 different daemons running, but I fixed it myself.
Support Forum for the Deluge BitTorrent Client
https://forum.deluge-torrent.org/
I also had this issue and after a little experimentation found that this was only for RSS feeds using magnet links. Long story short looked at the code and here is how you can fix it (in the most brutish of ways).pstryk wrote:Hi,
I have a problem with autolabeling of torrents from RSS feed. The download works ok - no issues there, but it will just not autolabel them.
Code: Select all
.config/deluge/plugins/YaRSS2-1.4.3-py2.7.egg
Code: Select all
if download.is_magnet:
self.log.info("Adding magnet: '%s'" % torrent_url)
download.torrent_id = component.get("TorrentManager").add(options=options,
magnet=utf8_encoded(download.url))
else:
# Error occured
if not download.success:
self.log.warn("Failed to add '%s'." % (torrent_url))
return download
self.log.info("Adding torrent: '%s'." % (torrent_url))
# Get the torrent data from the torrent file
try:
torrentinfo.TorrentInfo(filedump=download.filedump)
except Exception, e:
download.set_error("Unable to open torrent file: %s. Error: %s" % (torrent_url, str(e)))
self.log.warn(download.error_msg)
download.torrent_id = component.get("TorrentManager").add(filedump=download.filedump,
filename=os.path.basename(torrent_url),
options=options)
download.success = download.torrent_id is not None
if download.success is False and download.error_msg is None:
download.set_error("Failed to add torrent to Deluge. Is the torrent already added?")
self.log.warn(download.error_msg)
else:
if "Label" in component.get("Core").get_enabled_plugins() and\
subscription_data and subscription_data.get("label", ""):
component.get("CorePlugin.Label").set_torrent(download.torrent_id, subscription_data["label"])
return download
Code: Select all
if download.is_magnet:
self.log.info("Adding magnet: '%s'" % torrent_url)
download.torrent_id = component.get("TorrentManager").add(options=options,
magnet=utf8_encoded(download.url))
if "Label" in component.get("Core").get_enabled_plugins() and\
subscription_data and subscription_data.get("label", ""):
component.get("CorePlugin.Label").set_torrent(download.torrent_id, subscription_data["label"])
else:
# Error occured
if not download.success:
self.log.warn("Failed to add '%s'." % (torrent_url))
return download
self.log.info("Adding torrent: '%s'." % (torrent_url))
# Get the torrent data from the torrent file
try:
torrentinfo.TorrentInfo(filedump=download.filedump)
except Exception, e:
download.set_error("Unable to open torrent file: %s. Error: %s" % (torrent_url, str(e)))
self.log.warn(download.error_msg)
download.torrent_id = component.get("TorrentManager").add(filedump=download.filedump,
filename=os.path.basename(torrent_url),
options=options)
download.success = download.torrent_id is not None
if download.success is False and download.error_msg is None:
download.set_error("Failed to add torrent to Deluge. Is the torrent already added?")
self.log.warn(download.error_msg)
else:
if "Label" in component.get("Core").get_enabled_plugins() and\
subscription_data and subscription_data.get("label", ""):
component.get("CorePlugin.Label").set_torrent(download.torrent_id, subscription_data["label"])
return download
Code: Select all
import os
from torrent_handling import TorrentHandler
Is this failing for all feeds you try? Can you share the feed you are using?corkerss wrote:Hello,
Connected to feed, Can fetch all the titles but the downloads do not start.
Running on RasPi 2 with Jessie Stretch
(2017-12-08T22:24:09): Fetching subscription 'test'.
(2017-12-08T22:24:09): Fetching RSS Feed: 'rarbg' with Cookie: '{}' and User-agent: 'Deluge v1.3.13 YaRSS2 v1.4.3 Linux/4.9.59+'.
(2017-12-08T22:24:09): bozo_exception when parsing rssfeed: <urlopen error [Errno 104] Connection reset by peer>
(2017-12-08T22:24:09): No items retrieved
I tested the feed on MacOSX with uTorrent and worked fine
Thank you
Hello,bro wrote:You mean copy the config to a new machine or config directory? The YaRSS2 config is stored in yarss2.conf in the deluge config directory. Just copy that file to the new destination.tafazzi87 wrote:there is a way to export my configuration and after that import on a new?
I have never tried just the YaRSS config file, but often I have copied the entire deluge settings folder to new installs or other computers.egdod316 wrote:Hello,bro wrote:You mean copy the config to a new machine or config directory? The YaRSS2 config is stored in yarss2.conf in the deluge config directory. Just copy that file to the new destination.tafazzi87 wrote:there is a way to export my configuration and after that import on a new?
I made a copy of my yarss2.conf file. Then, after setting up deluge on another system, I tried copying it to the appropriate location. But, once I install the yarss2 plugin and restart the deluged service, the yarss2.conf file is restored to its defaults.
Is there a proper way to restore my .conf so I don't have to setup my subscriptions again?
Thanks for the reply. I actually wasn't moving Deluge. I was just setting up the remote client on another PC. I installed the YaRss2 plugin but I'm guessing since it was already installed on the OSMC device, I was having an issue with it not wanting to install on the local device. Anyway, I made a copy of the .conf but not the .conf~ and then deleted the plugin. I then reinstalled the plugin and tried copying in the file. I tried a few combinations including starting deluged so that the .conf was generated, stopping deluged, replacing the file and then starting it again but it just kept resetting the file.Shryp wrote:
I have never tried just the YaRSS config file, but often I have copied the entire deluge settings folder to new installs or other computers.
Did you copy the YaRSS.conf file and the YaRSS.conf~ file? I believe the tilda is just a backup, but I would copy both just to be sure. Also, maybe try copying the files over after you have the plugin installed. Make sure deluged is shut down when you are copying the files as well.
The config file is only for the system actually doing the downloading. The remote system just gets the plugin installed so you can view the subscriptions if need be.egdod316 wrote:Thanks for the reply. I actually wasn't moving Deluge. I was just setting up the remote client on another PC. I installed the YaRss2 plugin but I'm guessing since it was already installed on the OSMC device, I was having an issue with it not wanting to install on the local device. Anyway, I made a copy of the .conf but not the .conf~ and then deleted the plugin. I then reinstalled the plugin and tried copying in the file. I tried a few combinations including starting deluged so that the .conf was generated, stopping deluged, replacing the file and then starting it again but it just kept resetting the file.Shryp wrote:
I have never tried just the YaRSS config file, but often I have copied the entire deluge settings folder to new installs or other computers.
Did you copy the YaRSS.conf file and the YaRSS.conf~ file? I believe the tilda is just a backup, but I would copy both just to be sure. Also, maybe try copying the files over after you have the plugin installed. Make sure deluged is shut down when you are copying the files as well.
Since I didn't copy the other file, I know I somewhat limited the troubleshooting. I've went ahead and set everything up again and now I can stop and restart the service and everything sticks as it should.