Skip to content

Commit

Permalink
add length
Browse files Browse the repository at this point in the history
  • Loading branch information
datawhores committed Aug 28, 2024
1 parent 7b20ea3 commit d4a0f86
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ofscraper/commands/managers/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ def sort_media(self):
medias=sorted(medias,key=lambda x: x["media_id"],reverse=reversed)
elif sort=="size":
medias=sorted(medias,key=lambda x: x["size"] or 0,reverse=reversed)
elif sort=="length":
medias=sorted(medias,key=lambda x: self._convert_seconds(x),reverse=reversed)
self.media=medias


Expand Down

0 comments on commit d4a0f86

Please sign in to comment.