Commit 9ad02333 authored by Stein Magnus Jodal's avatar Stein Magnus Jodal
Browse files

Merge pull request #48 from vespakoen/fix-get-images

Ensure None values don't get included in the images
parents 1c0c4a5a a31015d0
......@@ -68,13 +68,19 @@ def resolve_url(url, stream=False):
logger.info(e.message)
return
images = []
if video.bigthumb is not None:
images.append(video.bigthumb)
if video.bigthumbhd is not None:
images.append(video.bigthumbhd)
track = Track(
name=video.title,
comment=video.videoid,
length=video.length * 1000,
album=Album(
name='YouTube',
images=[video.bigthumb, video.bigthumbhd]
images=images
),
uri=uri
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment