package Ġcom . e gor iku . rad iot ok . rad iop layer . data Ċ Ċ import Ġandroid . support . v 4 . media . Media Metadata Compat Ċ import Ġcom . e gor iku . rad iot ok . common . ext . log D Ċ import Ġcom . e gor iku . rad iot ok . rad iop layer . data . mapper . to Media Source Ċ import Ġcom . e gor iku . rad iot ok . rad iop layer . model . Media Path Ċ import Ġcom . e gor iku . rad iot ok . rad iop layer . model . Media Path . Shuffle And Play Root Ċ import Ġcom . google . android . ex op layer 2 . source . Concat en ating Media Source Ċ import Ġcom . google . android . ex op layer 2 . upstream . Default Http DataSource Ċ Ċ class ĠCurrent Radio Queue Holder ( ĊĠĠĠ Ġprivate Ġval Ġdefault Http DataSource Factory : ĠDefault Http DataSource . Factory Ċ ) Ġ{ ĊĠĠĠ Ġvar Ġcurrent Media Source Ġ= ĠConcat en ating Media Source () ĊĠĠĠĠĠĠĠ Ġprivate Ġset ĊĊĠĠĠ Ġvar Ġcurrent Media Path : ĠMedia Path Ġ= ĠMedia Path . Root ĊĠĠĠĠĠĠĠ Ġprivate Ġset ĊĊĠĠĠ Ġvar Ġradio St ations Ġ= Ġmutable ListOf < Media Metadata Compat >() ĊĠĠĠĠĠĠĠ Ġprivate Ġset ĊĊĠĠĠ Ġfun Ġis Single () Ġ= Ġcurrent Media Path Ġ== ĠMedia Path . Single ĊĊĠĠĠ Ġfun Ġis Random Radio () Ġ= Ġcurrent Media Path Ġ== ĠSh uffle And Play Root . Shuffle Random Ġ|| ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcurrent Media Path Ġ== ĠSh uffle And Play Root . Shuffle Lik ed ĊĊĠĠĠ Ġfun Ġget Media Metadata OrNull ( position : ĠInt ): ĠMedia Metadata Compat ? Ġ= ĊĠĠĠĠĠĠĠ Ġradio St ations . get OrNull ( position ) ĊĊĠĠĠ Ġfun Ġupdate Queue ( media Path : ĠMedia Path , Ġstations : ĠList < Media Metadata Compat >) Ġ{ ĊĠĠĠĠĠĠĠ Ġlog D (" update Queue : Ġsize Ġ= Ġ${ stations . size }") ĊĊĠĠĠĠĠĠĠ Ġcurrent Media Path Ġ= Ġmedia Path ĊĊĠĠĠĠĠĠĠ Ġradio St ations . clear () ĊĠĠĠĠĠĠĠ Ġradio St ations . addAll ( stations ) ĊĊĠĠĠĠĠĠĠ Ġcurrent Media Source . clear () ĊĠĠĠĠĠĠĠ Ġcurrent Media Source . add Media Sources ( stations . to Media Source ( default Http DataSource Factory )) ĊĠĠĠ Ġ} Ċ }