~bronikowski/radiogopher

ref: ed1f1ae2ec157ee66aa5c1abca69431646ef977c radiogopher/feeds.py -rw-r--r-- 332 bytes
ed1f1ae2Emil Oppeln-Bronikowski It was terrible idea to write this configuration module like that. 1 year, 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import config

subscribed_feeds = config.Feeds('feeds')

def add(feed):

    if feed not in subscribed_feeds['podcasts']:
        subscribed_feeds['podcasts'][feed] = {'last_checked': None}
        subscribed_feeds.save()
        return True

def remove(feed):
    del subscribed_feeds['podcasts'][feed]
    subscribed_feeds.save()