From d267582aa0b16cae1ead227b141b0e707e702a67 Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Thu, 30 Jan 2014 21:19:24 +0100 Subject: [PATCH] Python backend: Add support for renaming podcasts and changing sections --- main.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/main.py b/main.py index 55eb6fc..4e9c204 100644 --- a/main.py +++ b/main.py @@ -167,6 +167,19 @@ class gPotherSide: pyotherside.send('update-stats') # TODO: Return True/False for reporting success + def rename_podcast(self, podcast_id, new_title): + podcast = self._get_podcast_by_id(podcast_id) + podcast.rename(new_title) + self.core.save() + pyotherside.send('podcast-list-changed') + + def change_section(self, podcast_id, new_section): + podcast = self._get_podcast_by_id(podcast_id) + podcast.section = new_section + podcast.save() + self.core.save() + pyotherside.send('podcast-list-changed') + @run_in_background_thread def unsubscribe(self, podcast_id): podcast = self._get_podcast_by_id(podcast_id) @@ -269,3 +282,5 @@ get_fresh_episodes_summary = gpotherside.get_fresh_episodes_summary download_episode = gpotherside.download_episode delete_episode = gpotherside.delete_episode toggle_new = gpotherside.toggle_new +rename_podcast = gpotherside.rename_podcast +change_section = gpotherside.change_section