
    :j                         d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ 	 ddededeeef         deddf
dZ dS )z"Choose a controller and quick play    )Any   )
Chromecast)QuickPlayController)BbcIplayerController)BbcSoundsController)BubbleUPNPController)HomeAssistantMediaController)DefaultMediaReceiverController)SuplaController)YleAreenaController)YouTubeController)ShakaController)NrkTvController)NrkRadioController      >@castapp_namedatatimeoutreturnNc                    |dk    rt                      }n|dk    rt                      }n|dk    rt                      }n|dk    rt                      }n|dk    rt	                      }n|dk    rt                      }nw|dk    rt                      }nb|dk    rt                      }nM|d	k    rt                      }n8|d
k    rt                      }n#|dk    rt                      }nt                      |                     |           	  |j        di |d|i |                     |           dS # |                     |           w xY w)a  
    Given a Chromecast connection, launch the app `app_name` and start playing media
    based on parameters defined in `data`.

    :param cast: Chromecast connection to cast to
    :param app_name: App name "slug" to cast
    :param data: Data to send to the app controller. Must contain "media_id", and other
        values can be passed depending on the controller.
    :type cast: Chromecast
    :type app_name: string
    :type data: dict

    `data` can contain the following keys:
        media_id: string (Required)
            Primary identifier of the media
        media_type: string
            Type of the media identified by `media_id`. e.g. "program" if the media is a
            program name instead of a direct item id.
            When using a regular media controller (e.g. BubbleUPNP) this should be the
            content_type ('audio/mp3')
        enqueue: boolean
            Enqueue the media to the current playlist, if possible.
        index: string
            Play index x of matching media. "random" should also be allowed.
        audio_lang: string
            Audio language (3 characters for YleAreena)
        text_lang: string
            Subtitle language (3 characters for YleAreena)

    Youtube-specific:
        playlist_id: string
            Youtube playlist id

    Supla-specific:
        is_live: boolean
            Whether the media is a livestream

    Media controller (BubbleUPNP)-specific:
        stream_type: string
            "BUFFERED" or "LIVE"
    
bbciplayer	bbcsounds
bubbleupnpdefault_media_receiverhomeassistant_mediasupla	yleareenayoutubeshakanrktvnrkradior   N )r   r   r	   r   r
   r   r   r   r   r   r   NotImplementedErrorregister_handler
quick_playunregister_handler)r   r   r   r   
controllers        M/home/user/adhan/venv/lib/python3.11/site-packages/pychromecast/quick_play.pyr'   r'      s   b <)++

	[	 	 (**

	\	!	!)++

	-	-	-355

	*	*	*133

	W		$&&

	[	 	 (**

	Y		&((

	W		$&&

	W		$&&

	Z		'))

!###*%%%,
6666g6666
+++++
++++s   D4 4E)r   )!__doc__typingr    r   controllersr   controllers.bbciplayerr   controllers.bbcsoundsr   controllers.bubbleupnpr	   controllers.homeassistant_mediar
   controllers.mediar   controllers.suplar   controllers.yleareenar   controllers.youtuber   controllers.shakar   controllers.nrktvr   controllers.nrkradior   strdictfloatr'   r$       r*   <module>r>      sq   ( (             , , , , , , 8 8 8 8 8 8 6 6 6 6 6 6 8 8 8 8 8 8 I I I I I I = = = = = = . . . . . . 6 6 6 6 6 6 2 2 2 2 2 2 . . . . . . . . . . . . 4 4 4 4 4 4 	O, O,
O,O, sCx.O, 	O,
 
O, O, O, O, O, O,r=   