More gpo fixes caused by youtube streaming and duration.

This commit is contained in:
auouymous 2020-09-14 13:48:09 -06:00
parent f7509f1a9b
commit 5414410551
1 changed files with 4 additions and 2 deletions

View File

@ -721,8 +721,10 @@ class gPodderCli(object):
return True
def youtube(self, url):
fmt_ids = youtube.get_fmt_ids(self._config.youtube)
yurl = youtube.get_real_download_url(url, False, fmt_ids)
fmt_ids = youtube.get_fmt_ids(self._config.youtube, False)
yurl, duration = youtube.get_real_download_url(url, False, fmt_ids)
if duration is not None:
episode.total_time = int(int(duration) / 1000)
print(yurl)
return True