Label: Fix move on completed

This commit is contained in:
Andrew Resch 2009-01-02 03:25:39 +00:00
commit 76a17a4028

View file

@ -177,7 +177,8 @@ class Core(CorePluginBase):
if changed: if changed:
self.config.save() self.config.save()
def export_get_labels(self): @export
def get_labels(self):
return sorted(self.labels.keys()) return sorted(self.labels.keys())
#Labels: #Labels:
@ -222,8 +223,12 @@ class Core(CorePluginBase):
torrent.set_remove_at_ratio(options['remove_at_ratio']) torrent.set_remove_at_ratio(options['remove_at_ratio'])
if options["apply_move_completed"]: if options["apply_move_completed"]:
torrent.set_move_on_completed(options["move_completed"]) torrent.set_options(
torrent.set_move_on_completed_path(options["move_completed_path"]) {
"move_completed": options["move_completed"],
"move_completed_path": options["move_completed_path"]
}
)
def _has_auto_match(self, torrent ,label_options): def _has_auto_match(self, torrent ,label_options):
"match for auto_add fields" "match for auto_add fields"
@ -266,7 +271,7 @@ class Core(CorePluginBase):
if options["auto_add"]: if options["auto_add"]:
for torrent_id, torrent in self.torrents.iteritems(): for torrent_id, torrent in self.torrents.iteritems():
if self._has_auto_match(torrent, options): if self._has_auto_match(torrent, options):
self.export_set_torrent(torrent_id , label_id) self.set_torrent(torrent_id , label_id)
self.config.save() self.config.save()