From 698199b0e86b8ebbc1b21fea6b95c52908b81cc6 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Wed, 3 Jan 2024 09:07:28 +0530 Subject: [PATCH] Apply suggestions from code review --- yt_dlp/YoutubeDL.py | 2 -- yt_dlp/extractor/common.py | 27 ++++++++++++++------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index ea03e7274c..8ac93fecca 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -24,7 +24,6 @@ import traceback import unicodedata from .cache import Cache - from .compat import functools, urllib # isort: split from .compat import compat_os_name, compat_shlex_quote, urllib_req_to_req from .cookies import LenientSimpleCookie, load_cookies @@ -1756,7 +1755,6 @@ class YoutubeDL: for deprecated_field, new_field in deprecated_multivalue_fields.items(): if deprecated_field not in ie_result: continue - self.deprecation_warning(f'"{deprecated_field}" field is deprecated. Use "{new_field}" instead') ie_result[new_field] = re.split(r', ?', ie_result[deprecated_field]) def add_default_extra_info(self, ie_result, ie, url): diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index b614472b57..cde9c167bb 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -422,23 +422,24 @@ class InfoExtractor: track_number: Number of the track within an album or a disc, as an integer. track_id: Id of the track (useful in case of custom indexing, e.g. 6.iii), as a unicode string. - artist_list: Artist(s) of the track, as a list of unicode strings. - composer_list: Composer(s) of the piece, as a list of unicode strings. - genre_list: Genre(s) of the track, as a list of unicode strings. - + artist_list: List of artists of the track. + composer_list: List of composers of the piece + genre_list: List of genres of the track. album: Title of the album the track belongs to. album_type: Type of the album (e.g. "Demo", "Full-length", "Split", "Compilation", etc). - album_artist_list: All artists appeared on the album, as a list of unicode strings. - (e.g. ["Ash Borer", "Fell Voices"] or ["Various Artists"], - useful for splits and compilations). + album_artist_list: List of all artists appeared on the album. E.g. + ["Ash Borer", "Fell Voices"] or ["Various Artists"]. + Useful for splits and compilations. disc_number: Number of the disc or other physical medium the track belongs to, as an integer. - composer: Deprecated, use "composer_list" instead. Composer(s) of the piece, - comma-separated - artist: Deprecated, use "artist_list" instead. Artist(s) of the track, comma-separated. - genre: Deprecated, use "genre_list" instead. Genre(s) of the track, comma-separated. - album_artist: Deprecated, use "album_artist_list" instead. All artists appeared on the - album, comma-separated. + composer: Deprecated; use "composer_list" instead. + Composer(s) of the piece, comma-separated. + artist: Deprecated; use "artist_list" instead. + Artist(s) of the track, comma-separated. + genre: Deprecated; use "genre_list" instead. + Genre(s) of the track, comma-separated. + album_artist: Deprecated; use "album_artist_list" instead. + All artists appeared on the album, comma-separated. The following fields should only be set for clips that should be cut from the original video: