Permalink
Browse files

Python backend: Add support for renaming podcasts and changing sections

  • Loading branch information...
thp committed Jan 30, 2014
1 parent 3579f4b commit d267582aa0b16cae1ead227b141b0e707e702a67
Showing with 15 additions and 0 deletions.
  1. +15 −0 main.py
View
15 main.py
@@ -167,6 +167,19 @@ def subscribe(self, url):
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 @@ def show_episode(self, episode_id):
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

0 comments on commit d267582

Please sign in to comment.