From 95282a29f74b3410da445aa93fa7edf525857c31 Mon Sep 17 00:00:00 2001 From: firebfm Date: Thu, 28 May 2020 18:38:12 -0400 Subject: [PATCH] Support for single track url --- redsea/cli.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/redsea/cli.py b/redsea/cli.py index 93f3f70..1710e5d 100644 --- a/redsea/cli.py +++ b/redsea/cli.py @@ -58,8 +58,12 @@ def parse_media_option(mo): if not components or len(components) <= 2: print('Invalid URL: ' + m) exit() - type_ = components[1] - id_ = components[2] + if len(components) == 5: + type_ = components[3] + id_ = components[4] + else: + type_ = components[1] + id_ = components[2] if type_ == 'album': type_ = 'a' elif type_ == 'track':