async fn station_stream_uri(&self, id: String) -> Result<Mutex<String>, AppError> {
        // Make sure the station_id_service_map is loaded. Feels wrong to do it like this though.. Needs refactoring.
        self.stations().await;

        let service = match self
            .station_id_service_map
            .lock()
            .await
            .get(&id.to_string())
        {
            Some(s) => s.clone(),
            None => return Err(AppError::NotFound),
        };

        service.station_stream_uri(id).await
    }
/// Get the stream URL for a locast station id.
Get the stream URL for a locast station id.
Get the stream URL for a locast station id .
async fn station_stream_uri(&self, id: String) -> Result<Mutex<String>, AppError> {
        // Make sure the station_id_service_map is loaded. Feels wrong to do it like this though.. Needs refactoring.
        self.stations().await;
        let service = match self
            .station_id_service_map
            .lock()
            .await
            .get(&id.to_string())
        {
            Some(s) => s.clone(),
            None => return Err(AppError::NotFound),
        };
        service.station_stream_uri(id).await
    }
async fn station_stream_uri ( & self , id : String ) -> Result < Mutex < String > , AppError > { // Make sure the station_id_service_map is loaded. Feels wrong to do it like this though.. Needs refactoring. self . stations ( ) . await ; let service = match self . station_id_service_map . lock ( ) . await . get ( & id . to_string ( ) ) { Some ( s ) => s . clone ( ) , None => return Err ( AppError :: NotFound ) , } ; service . station_stream_uri ( id ) . await }
Get the stream URL for a locast station id.
Get the stream URL for a locast station id .
&self
id
String