The code to retrieve the torrent's url was not correct anymore with the

modifications made in the last few commits.
This commit is contained in:
Cyrille Bollu 2018-07-26 14:22:22 +02:00
parent c825daef58
commit 7cfc9b8c23
1 changed files with 2 additions and 0 deletions

View File

@ -75,6 +75,8 @@ def list_videos():
# TODO: Get the best quality torrent given settings and/or available bandwidth
# See how they do that in the peerTube client's code
min_size = -1
resp = urllib2.urlopen(inst + '/api/v1/videos/' + video['uuid'])
metadata = json.load(resp)
for f in metadata['files']:
if f['size'] < min_size or min_size == -1:
# TODO: See if using magnet wouldn't be better