]> jfr.im git - yt-dlp.git/commitdiff
[bandcamp] fix failing test. remove subclass hack
authorinsaneracist <redacted>
Wed, 28 Oct 2020 15:12:58 +0000 (08:12 -0700)
committerinsaneracist <redacted>
Wed, 28 Oct 2020 15:12:58 +0000 (08:12 -0700)
youtube_dlc/extractor/bandcamp.py
youtube_dlc/extractor/extractors.py

index dbf96f33da9f338267939d8995a4ae1058cae8f9..7d29481c0d0c17a5b477a3f9461a2852f581c3d2 100644 (file)
@@ -236,15 +236,6 @@ def _real_extract(self, url):
         }
 
 
-class BandcampAlbumTrackIE(BandcampIE):
-    IE_NAME = "Bandcamp:albumtrack"
-    """Hack class to force album downloads to have prefixed track numbers by default"""
-    def _real_extract(self, url):
-        data = super()._real_extract(url)
-        data['title'] = '{:02d} - {} - {}'.format(data['track_number'], data['artist'], data['track'])
-        return data
-
-
 class BandcampAlbumIE(BandcampBaseIE):
     IE_NAME = 'Bandcamp:album'
     _VALID_URL = r'https?://(?:(?P<subdomain>[^.]+)\.)?bandcamp\.com(?:/album/(?P<album_id>[^/?#&]+))?'
@@ -341,7 +332,7 @@ def _real_extract(self, url):
         entries = [
             self.url_result(
                 compat_urlparse.urljoin(url, track['title_link']),
-                ie=BandcampAlbumTrackIE.ie_key(),
+                ie=BandcampIE.ie_key(),
                 video_title=track['title'])
             for track in tracks
             if track.get('duration')]
index fbd4ed1e34cf9da613a3f9623c7ba8308fc11384..d31edd7c87dd7a5f7fbeda9f190a2a4b186fd201 100644 (file)
@@ -84,7 +84,7 @@
 )
 from .azmedien import AZMedienIE
 from .baidu import BaiduVideoIE
-from .bandcamp import BandcampIE, BandcampAlbumTrackIE, BandcampAlbumIE, BandcampWeeklyIE
+from .bandcamp import BandcampIE, BandcampAlbumIE, BandcampWeeklyIE
 from .bbc import (
     BBCCoUkIE,
     BBCCoUkArticleIE,