mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
svtplay: in -A and --all-last sort the list if we have episodeNumber
fixes #800
This commit is contained in:
parent
68553d9870
commit
2fb54e368b
@ -6,6 +6,7 @@ import os
|
|||||||
import copy
|
import copy
|
||||||
import json
|
import json
|
||||||
import hashlib
|
import hashlib
|
||||||
|
from operator import itemgetter
|
||||||
|
|
||||||
from svtplay_dl.log import log
|
from svtplay_dl.log import log
|
||||||
from svtplay_dl.service import Service, OpenGraphThumbMixin
|
from svtplay_dl.service import Service, OpenGraphThumbMixin
|
||||||
@ -209,6 +210,8 @@ class Svtplay(Service, OpenGraphThumbMixin):
|
|||||||
return episodes
|
return episodes
|
||||||
|
|
||||||
def videos_to_list(self, lvideos, videos):
|
def videos_to_list(self, lvideos, videos):
|
||||||
|
if "episodeNumber" in lvideos[0] and lvideos[0]["episodeNumber"]:
|
||||||
|
lvideos = sorted(lvideos, key=itemgetter('episodeNumber'))
|
||||||
for n in lvideos:
|
for n in lvideos:
|
||||||
parse = urlparse(n["contentUrl"])
|
parse = urlparse(n["contentUrl"])
|
||||||
if parse.path not in videos:
|
if parse.path not in videos:
|
||||||
|
Loading…
Reference in New Issue
Block a user