[need] skript to handle tts & Squeezebox Playlists etc

I would like to have a skript that can handle the daily tts via Squeezebox. At the moment every tts event kills my playing Songs, and my playlist.
I would like to have the squeezebox to go on with music after the tts event. Any idea how to do that?

Not sure about squeezebox - but can you just write automation like
pasue the media.
call tts.
delay while it’s playing.
call play

Working on vlc at least

@moskovskiy82 I assume you “save” the current playing media_content_id for this to work?
Can you tell me how you do that?

No. It’s just a pause\play action. Ok got it - your playlist gets killed. I also have an input select which selects the radiostation. So calling something like this - might help?

data_template:
  media_content_id: >
    {% if is_state("input_select.radio_station", "RelaxFM") %}
      http://ic2.101.ru:8000/v13
    {%-elif is_state("input_select.radio_station", "RecordFM") %}
      http://air2.radiorecord.ru:805/chil_320
    {%-elif is_state("input_select.radio_station", "Classical") %}
      http://174.36.206.197:8000/stream
    {%-elif is_state("input_select.radio_station", "Lounge") %}
      http://77.235.42.90:80/
    {%-elif is_state("input_select.radio_station", "SmoothLounge") %}
      http://sl128.hnux.com/
    {% else %}
      http://77.235.42.90:80/
    {% endif %}
  media_content_type: 'music'

I suppose I could do that indeed since the only thing that needs to be resumed is a radio stream in my current setup. I happen to use input select for this too. I do have to enter a different delay for every tts and implement the “check if radio is playing and if is does, pauze the play” lines on every TTS automation/script but I’ll look into that.