コード例 #1
0
ファイル: models.py プロジェクト: fk-lx/mygpo
    def get_subscribed_podcasts(self):
        """ Returns all subscribed podcasts for the device

        The attribute "url" contains the URL that was used when subscribing to
        the podcast """

        from mygpo.db.couchdb.podcast_state import get_subscribed_podcast_states_by_device
        states = get_subscribed_podcast_states_by_device(self)
        return podcasts_for_states(states)
コード例 #2
0
ファイル: models.py プロジェクト: fk-lx/mygpo
 def get_subscribed_podcast_ids(self):
     from mygpo.db.couchdb.podcast_state import get_subscribed_podcast_states_by_device
     states = get_subscribed_podcast_states_by_device(self)
     return [state.podcast for state in states]