Skip to content

Commit

Permalink
Python backend: Add support for renaming podcasts and changing sections
Browse files Browse the repository at this point in the history
  • Loading branch information
thp committed Jan 30, 2014
1 parent 3579f4b commit d267582
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions main.py
Expand Up @@ -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)
Expand Down Expand Up @@ -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.