From c31d334ae7bc1e0838e4e1669bbc8526b525cce5 Mon Sep 17 00:00:00 2001 From: nathom Date: Sat, 10 Apr 2021 21:33:42 -0700 Subject: [PATCH] Catch NonStreamable error --- streamrip/core.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/streamrip/core.py b/streamrip/core.py index 378d396..067983f 100644 --- a/streamrip/core.py +++ b/streamrip/core.py @@ -23,7 +23,7 @@ from .constants import ( ) from .db import MusicDB from .downloader import Album, Artist, Label, Playlist, Track, Tracklist -from .exceptions import AuthenticationError, NoResultsFound, ParsingError +from .exceptions import AuthenticationError, NoResultsFound, ParsingError, NonStreamable from .utils import capitalize logger = logging.getLogger(__name__) @@ -179,7 +179,11 @@ class MusicDL(list): logger.debug("Added filter argument for artist/label: %s", filters_) if not (isinstance(item, Tracklist) and item.loaded): - item.load_meta() + try: + item.load_meta() + except NonStreamable: + click.secho(f"{item!s} is not available, skipping.", fg='red') + continue if isinstance(item, Track): # track.download doesn't automatically tag