bundle.youtube.track ==================== .. py:module:: bundle.youtube.track Classes ------- .. autoapisummary:: bundle.youtube.track.TrackData bundle.youtube.track.YoutubeTrackData bundle.youtube.track.YoutubeStreamOption bundle.youtube.track.YoutubeResolveOptions bundle.youtube.track.MP3TrackData bundle.youtube.track.MP4TrackData Functions --------- .. autoapisummary:: bundle.youtube.track.sanitize_string bundle.youtube.track.get_identifier Module Contents --------------- .. py:function:: sanitize_string(input_string: str) -> str .. py:function:: get_identifier(filename: str) -> str .. py:class:: TrackData(/, **data: Any) Bases: :py:obj:`bundle.core.data.Data` Base data model class, providing utilities for serialization and deserialization from/to JSON, along with JSON Schema generation. .. attribute:: model_config Default model configuration settings. .. py:attribute:: title :type: str :value: None .. py:attribute:: author :type: str :value: None .. py:attribute:: duration :type: int :value: None .. py:attribute:: identifier :type: str :value: None .. py:attribute:: filename :type: str :value: None .. py:method:: post_init() .. py:class:: YoutubeTrackData(/, **data: Any) Bases: :py:obj:`TrackData` Base data model class, providing utilities for serialization and deserialization from/to JSON, along with JSON Schema generation. .. attribute:: model_config Default model configuration settings. .. py:attribute:: audio_url :type: str :value: None .. py:attribute:: video_url :type: str :value: None .. py:attribute:: thumbnail_url :type: str :value: None .. py:attribute:: audio_mime_type :type: str :value: None .. py:attribute:: video_mime_type :type: str :value: None .. py:attribute:: audio_streams :type: list[YoutubeStreamOption] :value: None .. py:attribute:: video_streams :type: list[YoutubeStreamOption] :value: None .. py:method:: is_resolved() -> bool Return True when the resolver filled the stream URLs. .. py:class:: YoutubeStreamOption(/, **data: Any) Bases: :py:obj:`bundle.core.data.Data` Base data model class, providing utilities for serialization and deserialization from/to JSON, along with JSON Schema generation. .. attribute:: model_config Default model configuration settings. .. py:attribute:: itag :type: int .. py:attribute:: kind :type: Literal['audio', 'video'] .. py:attribute:: url :type: str :value: None .. py:attribute:: resolution :type: str :value: None .. py:attribute:: abr :type: str :value: None .. py:attribute:: fps :type: int :value: 0 .. py:attribute:: mime_type :type: str :value: None .. py:attribute:: progressive :type: bool :value: False .. py:attribute:: filesize :type: int :value: 0 .. py:class:: YoutubeResolveOptions(/, **data: Any) Bases: :py:obj:`bundle.core.data.Data` Base data model class, providing utilities for serialization and deserialization from/to JSON, along with JSON Schema generation. .. attribute:: model_config Default model configuration settings. .. py:attribute:: select_video_itag :type: int | None :value: None .. py:attribute:: select_audio_itag :type: int | None :value: None .. py:attribute:: best :type: bool :value: True .. py:class:: MP3TrackData(/, **data: Any) Bases: :py:obj:`TrackData` Base data model class, providing utilities for serialization and deserialization from/to JSON, along with JSON Schema generation. .. attribute:: model_config Default model configuration settings. .. py:attribute:: path :type: pathlib.Path .. py:class:: MP4TrackData(/, **data: Any) Bases: :py:obj:`TrackData` Base data model class, providing utilities for serialization and deserialization from/to JSON, along with JSON Schema generation. .. attribute:: model_config Default model configuration settings. .. py:attribute:: path :type: pathlib.Path