Apply suggestions from code review

This commit is contained in:
pukkandan 2024-01-03 09:07:28 +05:30 committed by GitHub
parent 071326c0cc
commit 698199b0e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 15 deletions

View File

@ -24,7 +24,6 @@ import traceback
import unicodedata import unicodedata
from .cache import Cache from .cache import Cache
from .compat import functools, urllib # isort: split from .compat import functools, urllib # isort: split
from .compat import compat_os_name, compat_shlex_quote, urllib_req_to_req from .compat import compat_os_name, compat_shlex_quote, urllib_req_to_req
from .cookies import LenientSimpleCookie, load_cookies from .cookies import LenientSimpleCookie, load_cookies
@ -1756,7 +1755,6 @@ class YoutubeDL:
for deprecated_field, new_field in deprecated_multivalue_fields.items(): for deprecated_field, new_field in deprecated_multivalue_fields.items():
if deprecated_field not in ie_result: if deprecated_field not in ie_result:
continue 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]) ie_result[new_field] = re.split(r', ?', ie_result[deprecated_field])
def add_default_extra_info(self, ie_result, ie, url): def add_default_extra_info(self, ie_result, ie, url):

View File

@ -422,23 +422,24 @@ class InfoExtractor:
track_number: Number of the track within an album or a disc, as an integer. 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), track_id: Id of the track (useful in case of custom indexing, e.g. 6.iii),
as a unicode string. as a unicode string.
artist_list: Artist(s) of the track, as a list of unicode strings. artist_list: List of artists of the track.
composer_list: Composer(s) of the piece, as a list of unicode strings. composer_list: List of composers of the piece
genre_list: Genre(s) of the track, as a list of unicode strings. genre_list: List of genres of the track.
album: Title of the album the track belongs to. album: Title of the album the track belongs to.
album_type: Type of the album (e.g. "Demo", "Full-length", "Split", "Compilation", etc). 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. album_artist_list: List of all artists appeared on the album. E.g.
(e.g. ["Ash Borer", "Fell Voices"] or ["Various Artists"], ["Ash Borer", "Fell Voices"] or ["Various Artists"].
useful for splits and compilations). Useful for splits and compilations.
disc_number: Number of the disc or other physical medium the track belongs to, disc_number: Number of the disc or other physical medium the track belongs to,
as an integer. as an integer.
composer: Deprecated, use "composer_list" instead. Composer(s) of the piece, composer: Deprecated; use "composer_list" instead.
comma-separated Composer(s) of the piece, comma-separated.
artist: Deprecated, use "artist_list" instead. Artist(s) of the track, comma-separated. artist: Deprecated; use "artist_list" instead.
genre: Deprecated, use "genre_list" instead. Genre(s) of the track, comma-separated. Artist(s) of the track, comma-separated.
album_artist: Deprecated, use "album_artist_list" instead. All artists appeared on the genre: Deprecated; use "genre_list" instead.
album, comma-separated. 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: The following fields should only be set for clips that should be cut from the original video: