1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-30 23:24:16 +01:00

viafree: Make all-last work as intended

--all-last now returns X newest episodes instead of oldest
This commit is contained in:
qnorsten 2017-04-21 17:09:36 +02:00
parent a9e1e92ba2
commit c762575038

View File

@ -209,14 +209,10 @@ class Viaplay(Service, OpenGraphThumbMixin):
for n in janson["format"]["videos"][str(i)]["clip"]:
videos.append(n["sharingUrl"])
n = 0
episodes = []
for i in videos:
if n == options.all_last:
break
episodes.append(i)
n += 1
return episodes
if options.all_last > 0:
return sorted(episodes[-options.all_last:])
return sorted(episodes)
def _autoname(self, dataj):
program = dataj["format_slug"]