package Ġcom . sed mell uq . discord . lav ap layer . container . play lists Ċ Ċ import Ġcom . sed mell uq . discord . lav ap layer . container . Media Container Detection Ċ import Ġcom . sed mell uq . discord . lav ap layer . container . Media Container Detection Result Ċ import Ġcom . sed mell uq . discord . lav ap layer . container . Media Container Hints Ċ import Ġcom . sed mell uq . discord . lav ap layer . container . Media Container Probe Ċ import Ġcom . sed mell uq . discord . lav ap layer . tools . Data Format Tools . stream To Lines Ċ import Ġcom . sed mell uq . discord . lav ap layer . tools . io . Seek able InputStream Ċ import Ġcom . sed mell uq . discord . lav ap layer . track . Audio Reference Ċ import Ġcom . sed mell uq . discord . lav ap layer . track . Audio Track Info Ċ import Ġmu . Kotlin Logging Ċ import Ġjava . io . IOException Ċ Ċ /** Ċ Ġ* ĠPro be Ġfor Ġa Ġplaylist Ġcontaining Ġthe Ġraw Ġlink Ġwithout Ġany Ġformat . Ċ Ġ*/ Ċ object ĠPlain Playlist Container Probe Ġ: ĠMedia Container Probe Ġ{ ĊĠĠĠ Ġprivate Ġval Ġlog Ġ= ĠKotlin Logging . logger Ġ{ Ġ Ġ} ĊĠĠĠ Ġprivate Ġval Ġlink Pattern Ġ= Ġ""" ^ (?: https ?| icy ) :// .* """. to Pattern () ĊĊĠĠĠ Ġoverride Ġval Ġname : ĠString Ġ= Ġ" plain " ĊĊĠĠĠ Ġ@ Throws ( IOException :: class ) ĊĠĠĠ Ġoverride Ġfun Ġprobe ( reference : ĠAudio Reference , ĠinputStream : ĠSeek able InputStream ): ĠMedia Container Detection Result ? Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ(! Media Container Detection . match Next Bytes As Regex ( inputStream , ĠMedia Container Detection . STREAM _ SCAN _ DISTANCE , Ġlink Pattern , ĠChar sets . UTF _ 8 )) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġnull ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġlog . debug Ġ{ Ġ" Track Ġ${ reference . identifier } Ġis Ġa Ġplain Ġplaylist Ġfile ." Ġ} ĊĠĠĠĠĠĠĠ Ġreturn Ġload From Lines ( stream To Lines ( inputStream , ĠChar sets . UTF _ 8 )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġmatches Hints ( hints : ĠMedia Container Hints ?): ĠBoolean Ġ= Ġfalse ĊĊĠĠĠ Ġoverride Ġfun Ġcreate Track ( parameters : ĠString ?, Ġtrack Info : ĠAudio Track Info , ĠinputStream : ĠSeek able InputStream ) Ġ= ĊĠĠĠĠĠĠĠ Ġthrow ĠUnsupportedOperationException () ĊĊĠĠĠ Ġprivate Ġfun Ġload From Lines ( lines : ĠList < String >): ĠMedia Container Detection Result Ġ{ ĊĠĠĠĠĠĠĠ Ġfor Ġ( line Ġin Ġlines ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġmatcher Ġ= Ġlink Pattern . matcher ( line ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( matcher . matches ()) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġreturn ĠMedia Container Detection Result . refer ( this , ĠAudio Reference ( matcher . group ( 0 ), Ġnull )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn ĠMedia Container Detection Result . unsupported Format ( this , Ġ" The Ġplaylist Ġfile Ġcontains Ġno Ġlinks .") ĊĠĠĠ Ġ} Ċ } Ċ