From d6f8d5dc78b9f7b0559f9d3f1b0383a37811f7a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonah=20Br=C3=BCchert?= Date: Fri, 8 Apr 2022 02:05:03 +0200 Subject: [PATCH] get_artist: Don't fail on channels with only one category of content The current check is meant to detect channels with only video content, but it also hits small bands that for example have only released singles so far. An example for this is "UC1uK8RT3m4nNpXmOSsFsZeg". Since failing is not really helpful anyway (for example in audiotube, it could still play only the sound of a channel that contains only videos), I propose to remove the check altogether. --- ytmusicapi/mixins/browsing.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ytmusicapi/mixins/browsing.py b/ytmusicapi/mixins/browsing.py index 4b876fe..2a66646 100644 --- a/ytmusicapi/mixins/browsing.py +++ b/ytmusicapi/mixins/browsing.py @@ -393,10 +393,6 @@ class BrowsingMixin: response = self._send_request(endpoint, body) results = nav(response, SINGLE_COLUMN_TAB + SECTION_LIST) - if len(results) == 1: - # not a YouTube Music Channel, a standard YouTube Channel ID with no music content was given - raise ValueError(f"The YouTube Channel {channelId} has no music content.") - artist = {'description': None, 'views': None} header = response['header']['musicImmersiveHeaderRenderer'] artist['name'] = nav(header, TITLE_TEXT)