mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-24 14:06:36 +00:00
upload_date is set by metadata and is not a filterable field
This commit is contained in:
parent
ebbf654cb5
commit
623867ea3a
@ -1480,7 +1480,8 @@ class Media(models.Model):
|
||||
sorted_media = Media.objects.filter(source=self.source)
|
||||
else:
|
||||
self_year = self.upload_date.year if self.upload_date else self.created.year
|
||||
filtered_media = Media.objects.filter(source=self.source, published__year=self_year, upload_date__isnull=False)
|
||||
filtered_media = Media.objects.filter(source=self.source, published__year=self_year)
|
||||
filtered_media = [m for m in filtered_media where m.upload_date is not None]
|
||||
sorted_media = sorted(filtered_media, key=lambda x: (x.upload_date, x.key))
|
||||
position_counter = 1
|
||||
for media in sorted_media:
|
||||
|
Loading…
Reference in New Issue
Block a user