mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-25 14:36:34 +00:00
Use the less ambiguous list.extend
function
This commit is contained in:
parent
0e720f9042
commit
971cea5c0e
@ -527,8 +527,8 @@ class Source(db.models.Model):
|
|||||||
days = timezone.timedelta(seconds=self.download_cap).days
|
days = timezone.timedelta(seconds=self.download_cap).days
|
||||||
response = indexer(self.get_index_url(type=type), days=days)
|
response = indexer(self.get_index_url(type=type), days=days)
|
||||||
if not isinstance(response, dict):
|
if not isinstance(response, dict):
|
||||||
return []
|
return list()
|
||||||
entries = response.get('entries', [])
|
entries = response.get('entries', list())
|
||||||
return entries
|
return entries
|
||||||
|
|
||||||
def index_media(self):
|
def index_media(self):
|
||||||
@ -537,11 +537,11 @@ class Source(db.models.Model):
|
|||||||
'''
|
'''
|
||||||
entries = list()
|
entries = list()
|
||||||
if self.index_videos:
|
if self.index_videos:
|
||||||
entries += self.get_index('videos')
|
entries.extend(self.get_index('videos'))
|
||||||
# Playlists do something different that I have yet to figure out
|
# Playlists do something different that I have yet to figure out
|
||||||
if not self.is_playlist:
|
if not self.is_playlist:
|
||||||
if self.index_streams:
|
if self.index_streams:
|
||||||
entries += self.get_index('streams')
|
entries.extend(self.get_index('streams'))
|
||||||
|
|
||||||
if settings.MAX_ENTRIES_PROCESSING:
|
if settings.MAX_ENTRIES_PROCESSING:
|
||||||
entries = entries[:settings.MAX_ENTRIES_PROCESSING]
|
entries = entries[:settings.MAX_ENTRIES_PROCESSING]
|
||||||
|
Loading…
Reference in New Issue
Block a user