retesere20

custom-liquidsoap-title

Dec 9th, 2020
30
42 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. // apply function to each
  3. $all_playlists_result = "";
  4. preg_match_all('/(playlist_.*)\= cue_cut\(id="cue_playlist/', $config_content, $matches, PREG_SET_ORDER);
  5. if (!empty($matches))
  6. {
  7. $all_playlists_result .= "\r\n# ***START MY*** Custom function applied";
  8. foreach($matches as $match)
  9. {
  10. if (!empty($match[1]))
  11. {
  12. $playlist_name = trim($match[1]);
  13. $all_playlists_result .= "\r\n$playlist_name = map_metadata(change_title, $playlist_name)";
  14. }
  15. }
  16. $all_playlists_result .= "\r\n# ***END MY*** \r\n\r\n";
  17. }
  18.  
  19. $replace=$all_playlists_result;
  20. $target ='radio = random(';
  21. $new_content= str_replace($target, $replace.$target, $new_content);
RAW Paste Data