()
return {
            "format": "bestaudio[ext=m4a]/best[ext=m4a]",
            "outtmpl": os.path.join(settings.SONGS_CACHE_DIR, "%(id)s.%(ext)s"),
            "noplaylist": True,
            "cachedir": False,
            "no_color": True,
            "writethumbnail": True,
            "default_search": "auto",
            "postprocessors": postprocessors,
            "logger": YoutubeDLLogger(),
        }
This method returns a dictionary containing sensible defaults for yt-dlp options.
        It is roughly equivalent to the following command:
        yt-dlp --format bestaudio[ext=m4a]/best[ext=m4a] --output '%(id)s.%(ext)s' \
            --no-playlist --no-cache-dir --write-thumbnail --default-search auto \
            --add-metadata --embed-thumbnail
This method returns a dictionary containing sensible defaults for yt-dlp options.
        It is roughly equivalent to the following command:
        yt-dlp --format bestaudio[ext=m4a]/best[ext=m4a] --output '%(id)s.%(ext)s' \
            --no-playlist --no-cache-dir --write-thumbnail --default-search auto \
            --add-metadata --embed-thumbnail
This method returns a dictionary containing sensible defaults for yt - dlp options . It is roughly equivalent to the following command : yt - dlp -- format bestaudio [ ext = m4a ] / best [ ext = m4a ] -- output % ( id ) s . % ( ext ) s \ -- no - playlist -- no - cache - dir -- write - thumbnail -- default - search auto \ -- add - metadata -- embed - thumbnail
def get_ydl_opts() -> Dict[str, Any]:
        """This method returns a dictionary containing sensible defaults for yt-dlp options.
        It is roughly equivalent to the following command:
        yt-dlp --format bestaudio[ext=m4a]/best[ext=m4a] --output '%(id)s.%(ext)s' \
            --no-playlist --no-cache-dir --write-thumbnail --default-search auto \
            --add-metadata --embed-thumbnail
        """
        postprocessors = [
            {"key": "FFmpegMetadata"},
            {
                "key": "EmbedThumbnail",
                # overwrite any thumbnails already present
                "already_have_thumbnail": True,
            },
        ]
        return {
            "format": "bestaudio[ext=m4a]/best[ext=m4a]",
            "outtmpl": os.path.join(settings.SONGS_CACHE_DIR, "%(id)s.%(ext)s"),
            "noplaylist": True,
            "cachedir": False,
            "no_color": True,
            "writethumbnail": True,
            "default_search": "auto",
            "postprocessors": postprocessors,
            "logger": YoutubeDLLogger(),
        }
def get_ydl_opts ( ) -> Dict [ str , Any ] : postprocessors = [ { "key" : "FFmpegMetadata" } , { "key" : "EmbedThumbnail" , # overwrite any thumbnails already present "already_have_thumbnail" : True , } , ] return { "format" : "bestaudio[ext=m4a]/best[ext=m4a]" , "outtmpl" : os . path . join ( settings . SONGS_CACHE_DIR , "%(id)s.%(ext)s" ) , "noplaylist" : True , "cachedir" : False , "no_color" : True , "writethumbnail" : True , "default_search" : "auto" , "postprocessors" : postprocessors , "logger" : YoutubeDLLogger ( ) , }