aboutsummaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2011-06-20 19:27:27 +0200
committercedricbonhomme <devnull@localhost>2011-06-20 19:27:27 +0200
commit9e084bfe7f987f0bf1b319834c3265bff7e97f36 (patch)
tree4d73298aabe8ebaf782fe63c7c7495906d85653d /utils.py
parentIt is now possible to change the name of a feed anytime via the feed manageme... (diff)
downloadnewspipe-9e084bfe7f987f0bf1b319834c3265bff7e97f36.tar.gz
newspipe-9e084bfe7f987f0bf1b319834c3265bff7e97f36.tar.bz2
newspipe-9e084bfe7f987f0bf1b319834c3265bff7e97f36.zip
It is now possible to change the logo of a feed anytime via the feed management page. The data base is automatically uptodated.
Diffstat (limited to 'utils.py')
-rwxr-xr-xutils.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/utils.py b/utils.py
index 96bfa2c5..dfcad598 100755
--- a/utils.py
+++ b/utils.py
@@ -291,6 +291,19 @@ def change_feed_name(feed_url, new_feed_name):
except Exception, e:
print e
+def change_feed_logo(feed_url, new_feed_logo):
+ """
+ Change the logo of a feed given in parameter.
+ """
+ try:
+ conn = sqlite3.connect(sqlite_base, isolation_level = None)
+ c = conn.cursor()
+ c.execute('UPDATE feeds SET feed_image_link="' + new_feed_logo + '" WHERE feed_link="' + feed_url +'"')
+ conn.commit()
+ c.close()
+ except Exception, e:
+ print e
+
def remove_feed(feed_url):
"""
Remove a feed from the file feed.lst and from the SQLite base.
bgstack15