Skip to content

Commit

Permalink
[downloader;ytdl] utilize '_ytdl_index' metadata fields
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Mar 24, 2019
1 parent a9bdd0f commit 114b8ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gallery_dl/downloader/ytdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ def download(self, url, pathfmt):
return False

if "entries" in info_dict:
return self._download_playlist(pathfmt, info_dict)
index = pathfmt.keywords.get("_ytdl_index")
if index is None:
return self._download_playlist(pathfmt, info_dict)
else:
info_dict = info_dict["entries"][index]
return self._download_video(pathfmt, info_dict)

def _download_video(self, pathfmt, info_dict):
Expand Down

0 comments on commit 114b8ee

Please sign in to comment.