Refactoring: Remove "published" from PodcastChannel
This field wasn't used at all in gPodder's UI or backend.
This commit is contained in:
parent
37d3a1d53a
commit
477119df01
|
@ -66,7 +66,6 @@ class Database(object):
|
|||
'link',
|
||||
'description',
|
||||
'cover_url',
|
||||
'published',
|
||||
'auth_username',
|
||||
'auth_password',
|
||||
'http_last_modified',
|
||||
|
@ -83,7 +82,6 @@ class Database(object):
|
|||
'title',
|
||||
'description',
|
||||
'url',
|
||||
'published',
|
||||
'guid',
|
||||
'link',
|
||||
'file_size',
|
||||
|
|
|
@ -750,7 +750,6 @@ class PodcastChannel(PodcastModelObject):
|
|||
self.link = custom_feed.get_link()
|
||||
self.description = custom_feed.get_description()
|
||||
self.cover_url = custom_feed.get_image()
|
||||
self.published = int(time.time())
|
||||
self.save()
|
||||
|
||||
guids = [episode.guid for episode in self.get_all_episodes()]
|
||||
|
@ -776,11 +775,6 @@ class PodcastChannel(PodcastModelObject):
|
|||
self.title = self.title[len(YOUTUBE_PREFIX):] + ' on YouTube'
|
||||
# End YouTube-specific title FIX
|
||||
|
||||
try:
|
||||
self.published = int(rfc822.mktime_tz(feed.feed.get('updated_parsed', None+(0,))))
|
||||
except:
|
||||
self.published = int(time.time())
|
||||
|
||||
if hasattr(feed.feed, 'image'):
|
||||
for attribute in ('href', 'url'):
|
||||
new_value = getattr(feed.feed.image, attribute, None)
|
||||
|
@ -975,7 +969,6 @@ class PodcastChannel(PodcastModelObject):
|
|||
self.link = ''
|
||||
self.description = ''
|
||||
self.cover_url = None
|
||||
self.published = 0
|
||||
self.parse_error = None
|
||||
|
||||
self.auth_username = ''
|
||||
|
|
|
@ -33,7 +33,6 @@ def initialize_database(db):
|
|||
link TEXT NOT NULL DEFAULT '',
|
||||
description TEXT NOT NULL DEFAULT '',
|
||||
cover_url TEXT NULL DEFAULT NULL,
|
||||
published INTEGER NOT NULL DEFAULT 0,
|
||||
auth_username TEXT NULL DEFAULT NULL,
|
||||
auth_password TEXT NULL DEFAULT NULL,
|
||||
http_last_modified TEXT NULL DEFAULT NULL,
|
||||
|
@ -128,7 +127,6 @@ def convert_gpodder2_db(old_db, new_db):
|
|||
row['link'],
|
||||
row['description'],
|
||||
row['image'],
|
||||
row['pubDate'],
|
||||
row['username'] or None,
|
||||
row['password'] or None,
|
||||
row['last_modified'] or None,
|
||||
|
|
Loading…
Reference in New Issue