Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default replay gain #1259

Merged
merged 1 commit into from Jul 9, 2021
Merged

Conversation

paddatrapper
Copy link
Contributor

Fixes: #1258

Currently I'm unable to test, so requires feedback from @matias-tecnosoul

@matias-tecnosoul
Copy link

Hi, I've updated the telnetliquidsoap.py file by hand in my already installed LT. I mean, I didn´t update from git (I tried the main branch with "git pull" and it was up to date...) I don't know if I should install some other branch/fork.
Doing it this way showed me the same error :/
Please let me know if I should try to reinstall or smtg else...
thanks!

Jul  1 10:55:29 mantra airtime-liquidsoap[76]: 2021/07/01 10:55:29 [server:3] Client localhost disconnected without saying goodbye..!
Jul  1 10:55:29 mantra airtime-playout[90]: Exception in thread Thread-30:
Jul  1 10:55:29 mantra airtime-playout[90]: Traceback (most recent call last):
Jul  1 10:55:29 mantra airtime-playout[90]:   File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
Jul  1 10:55:29 mantra airtime-playout[90]:     self.run()
Jul  1 10:55:29 mantra airtime-playout[90]:   File "/usr/local/lib/python3.6/dist-packages/airtime_playout-1.0-py3.6.egg/pypo/timeout.py", line 13, in run
Jul  1 10:55:29 mantra airtime-playout[90]:     self.result = func(*args, **kwargs)
Jul  1 10:55:29 mantra airtime-playout[90]:   File "/usr/local/lib/python3.6/dist-packages/airtime_playout-1.0-py3.6.egg/pypo/telnetliquidsoap.py", line 114, in queue_push
Jul  1 10:55:29 mantra airtime-playout[90]:     annotation = create_liquidsoap_annotation(media_item)
Jul  1 10:55:29 mantra airtime-playout[90]:   File "/usr/local/lib/python3.6/dist-packages/airtime_playout-1.0-py3.6.egg/pypo/telnetliquidsoap.py", line 12, in create_liquidsoap_annotation
Jul  1 10:55:29 mantra airtime-playout[90]:     if media["replay_gain"]:
Jul  1 10:55:29 mantra airtime-playout[90]: KeyError: 'replay_gain'
Jul  1 10:55:29 mantra airtime-playout[90]: 2021-07-01 10:55:29,001 [pypoliqqueue] [INFO ]  waiting 521.998513s until next scheduled item
Jul  1 10:55:29 mantra airtime-liquidsoap[76]: 2021/07/01 10:55:29 [cue_cut_5777:3] Cueing out...
Jul  1 10:55:29 mantra airtime-liquidsoap[76]: 2021/07/01 10:55:29 [s4:3] Finished with "/var/tmp/airtime/pypo/cache/scheduler/66.mp3".
Jul  1 10:55:29 mantra airtime-liquidsoap[76]: 2021/07/01 10:55:29 [amplify_5781:3] End of the current overriding.
Jul  1 10:55:29 mantra airtime-liquidsoap[76]: 2021/07/01 10:55:29 [cross_5784:3] No next track ready yet.
Jul  1 10:55:29 mantra airtime-liquidsoap[76]: 2021/07/01 10:55:29 [schedule_noise_switch:3] Switch to map_metadata_5859 with forgetful transition.
Jul  1 10:55:29 mantra airtime-liquidsoap[76]: 2021/07/01 10:55:29 [lang:3] transition called...
Jul  1 10:55:29 mantra airtime-liquidsoap[76]: 2021/07/01 10:55:29 [dummy(dot)4:3] Source failed (no more tracks) stopping output...
Jul  1 10:55:29 mantra airtime-liquidsoap[76]: 2021/07/01 10:55:29 [dummy(dot)3:3] Source failed (no more tracks) stopping output...
 
this is how my telnetliquidsoap.py looks like
telnetliquidsoap

@paddatrapper
Copy link
Contributor Author

Slightly different error that exposes a flaw in the patch. It should be in a try catch block, not an if

@matias-tecnosoul
Copy link

You mean replacing this

filename = media["dst"]
replay_gain = "0"
if media["replay_gain"]:
        replay_gain = media["replay_gain"]

by this?

filename = media["dst"]
try:
     replay_gain = media["replay_gain"]
except:
        replay_gain = "0"

I'm trying it now and so far it seems good! :)

I found this log that I dont remember seeing before.

Jul 1 21:34:46 mantra airtime-playout[100]: Exception in thread Thread-35:
Jul 1 21:34:46 mantra airtime-playout[100]: Traceback (most recent call last):
Jul 1 21:34:46 mantra airtime-playout[100]: File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
Jul 1 21:34:46 mantra airtime-playout[100]: self.run()
Jul 1 21:34:46 mantra airtime-playout[100]: File "/usr/local/lib/python3.6/dist-packages/airtime_playout-1.0-py3.6.egg/pypo/timeout.py", line 13, in run
Jul 1 21:34:46 mantra airtime-playout[100]: self.result = func(*args, **kwargs)
Jul 1 21:34:46 mantra airtime-playout[100]: File "/usr/local/lib/python3.6/dist-packages/airtime_playout-1.0-py3.6.egg/pypo/telnetliquidsoap.py", line 121, in queue_push
Jul 1 21:34:46 mantra airtime-playout[100]: show_name = media_item["show_name"]
Jul 1 21:34:46 mantra airtime-playout[100]: KeyError: 'show_name'

Not sure if its related, I share it just in case...
thanks a lot!

@matias-tecnosoul
Copy link

I confirm Im not getting more Keyerror=replay_gain, but KeyError: 'show_name' yes.
Also the output worked fine for a couple of tracks and now is offline again.

@matias-tecnosoul
Copy link

I'm trying replacing this:

        show_name = media_item["show_name"]

by this:

try:
           show_name = media_item["show_name"]
except:
          show_name = "default_name"

@paddatrapper
Copy link
Contributor Author

hmm... I think that is indicative of something deeper being a problem here.It looks like media_item isn't being populated correctly overall

@paddatrapper
Copy link
Contributor Author

Can you send me a track that causes this error? paddatrapper@debian.org

@matias-tecnosoul
Copy link

Can you send me a track that causes this error? paddatrapper@debian.org

sent...

@matias-tecnosoul
Copy link

More info. I had a couple of 2 hours long tracks scheduled side by side. The "now playing" track was playing offline for more that an hour and "suddenly" it went online. I checked the logs (pasted down here) and realized that it was 1 hour left for the next track.

Sorry for the length of the logs but dont want to miss smtg.
This are the key times:

  • 8:08 A 2 hours length track started playing. I'm not sure if it was playing alright or the time when it stopped outputting, but it wasn't working around 9:00
  • 9:07 the output went online. The track had 1 hour left and therefore the next scheduled track was supposed to start in 1 hour. At 10:06: The track played fine until the end.
  • 10:06 The next track didn't start playing. Offline again.

Jul 2 08:00:50 mantra airtime-playout[98]: 2021-07-02 08:00:50,434 [pypofetch] [INFO ] Queue timeout. Fetching schedule manually
Jul 2 08:00:50 mantra airtime-playout[98]: 2021-07-02 08:00:50,537 [pypofetch] [INFO ] Loop #78
Jul 2 08:00:50 mantra airtime-playout[98]: 2021-07-02 08:00:50,538 [pypoliqqueue] [INFO ] New schedule received: {}
Jul 2 08:00:50 mantra airtime-playout[98]: 2021-07-02 08:00:50,538 [pypoliqqueue] [INFO ] waiting indefinitely for schedule
Jul 2 08:00:50 mantra airtime-liquidsoap[79]: 2021/07/02 08:00:50 [server:3] New client: localhost.
Jul 2 08:00:50 mantra airtime-liquidsoap[79]: 2021/07/02 08:00:50 [lang:3] dynamic_source.get_id
Jul 2 08:00:50 mantra airtime-liquidsoap[79]: 2021/07/02 08:00:50 [server:3] Client localhost disconnected.
Jul 2 08:00:50 mantra uwsgi[77]: [pid: 563|app: 0|req: 17/212] 127.0.0.1 () {36 vars in 640 bytes} [Fri Jul 2 11:00:50 2021] GET /api/v2/schedule/?ends__range=2021-07-02T11%3A00%3A50Z%2C2021-07-02T12%3A00%3A50Z => generated 457 bytes in 28 msecs (HTTP/1.1 200) 7 headers in 213 bytes (1 switches on core 0)
Jul 2 08:00:50 mantra uwsgi[77]: [pid: 566|app: 0|req: 79/213] 127.0.0.1 () {36 vars in 535 bytes} [Fri Jul 2 11:00:50 2021] GET /api/v2/show-instances/1354/ => generated 414 bytes in 19 msecs (HTTP/1.1 200) 7 headers in 227 bytes (1 switches on core 0)
Jul 2 08:00:50 mantra uwsgi[77]: [pid: 564|app: 0|req: 31/214] 127.0.0.1 () {36 vars in 511 bytes} [Fri Jul 2 11:00:50 2021] GET /api/v2/shows/4/ => generated 310 bytes in 17 msecs (HTTP/1.1 200) 7 headers in 227 bytes (1 switches on core 0)
Jul 2 08:00:50 mantra uwsgi[77]: [pid: 561|app: 0|req: 7/215] 127.0.0.1 () {36 vars in 513 bytes} [Fri Jul 2 11:00:50 2021] GET /api/v2/files/82/ => generated 1479 bytes in 24 msecs (HTTP/1.1 200) 7 headers in 228 bytes (1 switches on core 0)
Jul 2 08:05:01 mantra CRON[17167]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jul 2 08:07:30 mantra airtime-playout[98]: 2021-07-02 08:07:30,537 [pypofetch] [INFO ] Queue timeout. Fetching schedule manually
Jul 2 08:07:31 mantra uwsgi[77]: [pid: 564|app: 0|req: 32/216] 127.0.0.1 () {36 vars in 640 bytes} [Fri Jul 2 11:07:30 2021] GET /api/v2/schedule/?ends__range=2021-07-02T11%3A07%3A30Z%2C2021-07-02T12%3A07%3A30Z => generated 457 bytes in 26 msecs (HTTP/1.1 200) 7 headers in 213 bytes (1 switches on core 0)
Jul 2 08:07:31 mantra uwsgi[77]: [pid: 564|app: 0|req: 33/217] 127.0.0.1 () {36 vars in 535 bytes} [Fri Jul 2 11:07:30 2021] GET /api/v2/show-instances/1354/ => generated 414 bytes in 18 msecs (HTTP/1.1 200) 7 headers in 227 bytes (1 switches on core 0)
Jul 2 08:07:31 mantra uwsgi[77]: [pid: 564|app: 0|req: 34/218] 127.0.0.1 () {36 vars in 511 bytes} [Fri Jul 2 11:07:30 2021] GET /api/v2/shows/4/ => generated 310 bytes in 16 msecs (HTTP/1.1 200) 7 headers in 227 bytes (1 switches on core 0)
Jul 2 08:07:31 mantra uwsgi[77]: [pid: 564|app: 0|req: 35/219] 127.0.0.1 () {36 vars in 513 bytes} [Fri Jul 2 11:07:30 2021] GET /api/v2/files/82/ => generated 1479 bytes in 21 msecs (HTTP/1.1 200) 7 headers in 228 bytes (1 switches on core 0)
Jul 2 08:07:31 mantra airtime-liquidsoap[79]: 2021/07/02 08:07:30 [server:3] New client: localhost.
Jul 2 08:07:31 mantra airtime-liquidsoap[79]: 2021/07/02 08:07:30 [lang:3] dynamic_source.get_id
Jul 2 08:07:31 mantra airtime-liquidsoap[79]: 2021/07/02 08:07:30 [server:3] Client localhost disconnected.
Jul 2 08:07:31 mantra airtime-playout[98]: 2021-07-02 08:07:30,634 [pypofetch] [INFO ] Loop #79
Jul 2 08:07:31 mantra airtime-playout[98]: 2021-07-02 08:07:30,635 [pypoliqqueue] [INFO ] New schedule received: {}
Jul 2 08:07:31 mantra airtime-playout[98]: 2021-07-02 08:07:30,636 [pypoliqqueue] [INFO ] waiting indefinitely for schedule
Jul 2 08:08:21 mantra airtime-liquidsoap[79]: 2021/07/02 08:08:21 [s4:3] Finished with "/var/tmp/airtime/pypo/cache/scheduler/82.mp3".
Jul 2 08:08:21 mantra airtime-liquidsoap[79]: 2021/07/02 08:08:21 [cue_cut_5777:3] End of track before cue-out point.
Jul 2 08:08:21 mantra airtime-liquidsoap[79]: 2021/07/02 08:08:21 [amplify_5781:3] End of the current overriding.
Jul 2 08:08:21 mantra airtime-liquidsoap[79]: 2021/07/02 08:08:21 [schedule_noise_switch:3] Switch to map_metadata_5859 with forgetful transition.
Jul 2 08:08:21 mantra airtime-liquidsoap[79]: 2021/07/02 08:08:21 [lang:3] transition called...
Jul 2 08:08:21 mantra airtime-liquidsoap[79]: 2021/07/02 08:08:21 [dummy(dot)4:3] Source failed (no more tracks) stopping output...
Jul 2 08:08:21 mantra airtime-liquidsoap[79]: 2021/07/02 08:08:21 [dummy(dot)3:3] Source failed (no more tracks) stopping output...
Jul 2 08:09:01 mantra CRON[17289]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Jul 2 08:09:33 mantra systemd[1]: phpsessionclean.service: Failed to reset devices.list: Operation not permitted
Jul 2 08:09:33 mantra systemd[1]: Starting Clean php session files...
Jul 2 08:09:33 mantra systemd[1]: Started Clean php session files.
Jul 2 08:09:40 mantra systemd-networkd[45]: eth0: Configured
Jul 2 08:14:10 mantra airtime-playout[98]: 2021-07-02 08:14:10,634 [pypofetch] [INFO ] Queue timeout. Fetching schedule manually
Jul 2 08:14:10 mantra airtime-playout[98]: 2021-07-02 08:14:10,659 [pypoliqqueue] [INFO ] New schedule received: {}
Jul 2 08:14:10 mantra airtime-playout[98]: 2021-07-02 08:14:10,660 [pypoliqqueue] [INFO ] waiting indefinitely for schedule
Jul 2 08:14:10 mantra airtime-liquidsoap[79]: 2021/07/02 08:14:10 [server:3] New client: localhost.
Jul 2 08:14:10 mantra airtime-liquidsoap[79]: 2021/07/02 08:14:10 [lang:3] dynamic_source.get_id
Jul 2 08:14:10 mantra airtime-liquidsoap[79]: 2021/07/02 08:14:10 [server:3] Client localhost disconnected.
Jul 2 08:14:10 mantra uwsgi[77]: [pid: 565|app: 0|req: 62/220] 127.0.0.1 () {36 vars in 640 bytes} [Fri Jul 2 11:14:10 2021] GET /api/v2/schedule/?ends__range=2021-07-02T11%3A14%3A10Z%2C2021-07-02T12%3A14%3A10Z => generated 2 bytes in 14 msecs (HTTP/1.1 200) 7 headers in 211 bytes (1 switches on core 0)
Jul 2 08:14:10 mantra airtime-playout[98]: 2021-07-02 08:14:10,827 [pypofetch] [INFO ] File '/var/tmp/airtime/pypo/cache/scheduler/82.mp3' removed
Jul 2 08:14:10 mantra airtime-playout[98]: 2021-07-02 08:14:10,827 [pypofetch] [INFO ] Loop #80
Jul 2 08:15:01 mantra CRON[17517]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jul 2 08:17:01 mantra CRON[17577]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jul 2 08:20:50 mantra airtime-playout[98]: 2021-07-02 08:20:50,828 [pypofetch] [INFO ] Queue timeout. Fetching schedule manually
Jul 2 08:20:50 mantra airtime-playout[98]: 2021-07-02 08:20:50,848 [pypofetch] [INFO ] Loop #81
Jul 2 08:20:50 mantra airtime-playout[98]: 2021-07-02 08:20:50,850 [pypoliqqueue] [INFO ] New schedule received: {}
Jul 2 08:20:50 mantra airtime-playout[98]: 2021-07-02 08:20:50,850 [pypoliqqueue] [INFO ] waiting indefinitely for schedule
Jul 2 08:20:50 mantra airtime-liquidsoap[79]: 2021/07/02 08:20:50 [server:3] New client: localhost.
Jul 2 08:20:50 mantra airtime-liquidsoap[79]: 2021/07/02 08:20:50 [lang:3] dynamic_source.get_id
Jul 2 08:20:50 mantra airtime-liquidsoap[79]: 2021/07/02 08:20:50 [server:3] Client localhost disconnected.
Jul 2 08:20:50 mantra uwsgi[77]: [pid: 564|app: 0|req: 36/221] 127.0.0.1 () {36 vars in 640 bytes} [Fri Jul 2 11:20:50 2021] GET /api/v2/schedule/?ends__range=2021-07-02T11%3A20%3A50Z%2C2021-07-02T12%3A20%3A50Z => generated 2 bytes in 16 msecs (HTTP/1.1 200) 7 headers in 211 bytes (1 switches on core 0)
Jul 2 08:25:01 mantra CRON[17810]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jul 2 08:27:30 mantra airtime-liquidsoap[79]: 2021/07/02 08:27:30 [server:3] Client localhost disconnected.
Jul 2 08:27:30 mantra uwsgi[77]: [pid: 565|app: 0|req: 63/222] 127.0.0.1 () {36 vars in 640 bytes} [Fri Jul 2 11:27:30 2021] GET /api/v2/schedule/?ends__range=2021-07-02T11%3A27%3A30Z%2C2021-07-02T12%3A27%3A30Z => generated 2 bytes in 12 msecs (HTTP/1.1 200) 7 headers in 211 bytes (1 switches on core 0)
Jul 2 08:28:04 mantra airtime-playout[98]: 2021-07-02 08:28:04,250 [recorder] [INFO ] Parsing recording show schedules...
Jul 2 08:28:04 mantra airtime-playout[98]: 2021-07-02 08:28:04,251 [recorder] [INFO ] updated recorder schedule received: {'shows': [], 'is_recording': False, 'server_timezone': 'America/Argentina/Buenos_Aires'}
Jul 2 08:34:10 mantra airtime-playout[98]: 2021-07-02 08:34:10,867 [pypofetch] [INFO ] Queue timeout. Fetching schedule manually
Jul 2 08:34:11 mantra airtime-playout[98]: 2021-07-02 08:34:10,884 [pypofetch] [INFO ] Loop #83
Jul 2 08:34:11 mantra airtime-playout[98]: 2021-07-02 08:34:10,886 [pypoliqqueue] [INFO ] New schedule received: {}
Jul 2 08:34:11 mantra airtime-playout[98]: 2021-07-02 08:34:10,887 [pypoliqqueue] [INFO ] waiting indefinitely for schedule
Jul 2 08:34:11 mantra airtime-liquidsoap[79]: 2021/07/02 08:34:10 [server:3] New client: localhost.
Jul 2 08:34:11 mantra airtime-liquidsoap[79]: 2021/07/02 08:34:10 [lang:3] dynamic_source.get_id
Jul 2 08:34:11 mantra airtime-liquidsoap[79]: 2021/07/02 08:34:10 [server:3] Client localhost disconnected.
Jul 2 08:34:11 mantra uwsgi[77]: [pid: 563|app: 0|req: 18/223] 127.0.0.1 () {36 vars in 640 bytes} [Fri Jul 2 11:34:10 2021] GET /api/v2/schedule/?ends__range=2021-07-02T11%3A34%3A10Z%2C2021-07-02T12%3A34%3A10Z => generated 2 bytes in 14 msecs (HTTP/1.1 200) 7 headers in 211 bytes (1 switches on core 0)
Jul 2 08:35:01 mantra CRON[18183]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jul 2 08:37:42 mantra systemd-networkd[45]: eth0: Configured
Jul 2 08:39:01 mantra CRON[18350]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Jul 2 08:39:33 mantra systemd[1]: phpsessionclean.service: Failed to reset devices.list: Operation not permitted
Jul 2 08:39:34 mantra systemd[1]: Starting Clean php session files...
Jul 2 08:39:34 mantra systemd[1]: Started Clean php session files.
Jul 2 08:40:50 mantra airtime-playout[98]: 2021-07-02 08:40:50,885 [pypofetch] [INFO ] Queue timeout. Fetching schedule manually
Jul 2 08:40:50 mantra uwsgi[77]: [pid: 565|app: 0|req: 64/224] 127.0.0.1 () {36 vars in 640 bytes} [Fri Jul 2 11:40:50 2021] GET /api/v2/schedule/?ends__range=2021-07-02T11%3A40%3A50Z%2C2021-07-02T12%3A40%3A50Z => generated 2 bytes in 14 msecs (HTTP/1.1 200) 7 headers in 211 bytes (1 switches on core 0)
Jul 2 08:40:50 mantra airtime-playout[98]: 2021-07-02 08:40:50,902 [pypofetch] [INFO ] Loop #84
Jul 2 08:40:50 mantra airtime-playout[98]: 2021-07-02 08:40:50,905 [pypoliqqueue] [INFO ] New schedule received: {}
Jul 2 08:40:50 mantra airtime-playout[98]: 2021-07-02 08:40:50,905 [pypoliqqueue] [INFO ] waiting indefinitely for schedule
Jul 2 08:40:50 mantra airtime-liquidsoap[79]: 2021/07/02 08:40:50 [server:3] New client: localhost.
Jul 2 08:40:50 mantra airtime-liquidsoap[79]: 2021/07/02 08:40:50 [lang:3] dynamic_source.get_id
Jul 2 08:40:50 mantra airtime-liquidsoap[79]: 2021/07/02 08:40:50 [server:3] Client localhost disconnected.
Jul 2 08:45:01 mantra CRON[18590]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jul 2 08:47:30 mantra airtime-playout[98]: 2021-07-02 08:47:30,903 [pypofetch] [INFO ] Queue timeout. Fetching schedule manually
Jul 2 08:47:30 mantra uwsgi[77]: [pid: 564|app: 0|req: 37/225] 127.0.0.1 () {36 vars in 640 bytes} [Fri Jul 2 11:47:30 2021] GET /api/v2/schedule/?ends__range=2021-07-02T11%3A47%3A30Z%2C2021-07-02T12%3A47%3A30Z => generated 2 bytes in 18 msecs (HTTP/1.1 200) 7 headers in 211 bytes (1 switches on core 0)
Jul 2 08:47:30 mantra airtime-playout[98]: 2021-07-02 08:47:30,926 [pypofetch] [INFO ] Loop #85
Jul 2 08:47:30 mantra airtime-liquidsoap[79]: 2021/07/02 08:47:30 [server:3] New client: localhost.
Jul 2 08:47:30 mantra airtime-liquidsoap[79]: 2021/07/02 08:47:30 [lang:3] dynamic_source.get_id
Jul 2 08:47:30 mantra airtime-liquidsoap[79]: 2021/07/02 08:47:30 [server:3] Client localhost disconnected.
Jul 2 08:47:30 mantra airtime-playout[98]: 2021-07-02 08:47:30,928 [pypoliqqueue] [INFO ] New schedule received: {}
Jul 2 08:47:30 mantra airtime-playout[98]: 2021-07-02 08:47:30,928 [pypoliqqueue] [INFO ] waiting indefinitely for schedule
Jul 2 08:54:10 mantra airtime-playout[98]: 2021-07-02 08:54:10,926 [pypofetch] [INFO ] Queue timeout. Fetching schedule manually
Jul 2 08:54:11 mantra airtime-playout[98]: 2021-07-02 08:54:10,944 [pypofetch] [INFO ] Loop #86
Jul 2 08:54:11 mantra airtime-playout[98]: 2021-07-02 08:54:10,946 [pypoliqqueue] [INFO ] New schedule received: {}
Jul 2 08:54:11 mantra airtime-playout[98]: 2021-07-02 08:54:10,946 [pypoliqqueue] [INFO ] waiting indefinitely for schedule
Jul 2 08:54:11 mantra airtime-liquidsoap[79]: 2021/07/02 08:54:10 [server:3] New client: localhost.
Jul 2 08:54:11 mantra airtime-liquidsoap[79]: 2021/07/02 08:54:10 [lang:3] dynamic_source.get_id
Jul 2 08:54:11 mantra airtime-liquidsoap[79]: 2021/07/02 08:54:10 [server:3] Client localhost disconnected.
Jul 2 08:54:11 mantra uwsgi[77]: [pid: 566|app: 0|req: 80/226] 127.0.0.1 () {36 vars in 640 bytes} [Fri Jul 2 11:54:10 2021] GET /api/v2/schedule/?ends__range=2021-07-02T11%3A54%3A10Z%2C2021-07-02T12%3A54%3A10Z => generated 2 bytes in 13 msecs (HTTP/1.1 200) 7 headers in 211 bytes (1 switches on core 0)
Jul 2 08:55:01 mantra CRON[18921]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jul 2 09:00:50 mantra airtime-playout[98]: 2021-07-02 09:00:50,945 [pypofetch] [INFO ] Queue timeout. Fetching schedule manually
Jul 2 09:00:50 mantra airtime-playout[98]: 2021-07-02 09:00:50,959 [pypofetch] [INFO ] Loop #87
Jul 2 09:00:50 mantra airtime-playout[98]: 2021-07-02 09:00:50,960 [pypoliqqueue] [INFO ] New schedule received: {}
Jul 2 09:00:50 mantra airtime-playout[98]: 2021-07-02 09:00:50,960 [pypoliqqueue] [INFO ] waiting indefinitely for schedule
Jul 2 09:00:50 mantra airtime-liquidsoap[79]: 2021/07/02 09:00:50 [server:3] New client: localhost.
Jul 2 09:00:50 mantra airtime-liquidsoap[79]: 2021/07/02 09:00:50 [lang:3] dynamic_source.get_id
Jul 2 09:00:50 mantra airtime-liquidsoap[79]: 2021/07/02 09:00:50 [server:3] Client localhost disconnected.
Jul 2 09:00:51 mantra uwsgi[77]: [pid: 566|app: 0|req: 81/227] 127.0.0.1 () {36 vars in 640 bytes} [Fri Jul 2 12:00:50 2021] GET /api/v2/schedule/?ends__range=2021-07-02T12%3A00%3A50Z%2C2021-07-02T13%3A00%3A50Z => generated 2 bytes in 10 msecs (HTTP/1.1 200) 7 headers in 211 bytes (1 switches on core 0)
Jul 2 09:05:01 mantra CRON[19217]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jul 2 09:05:04 mantra systemd-networkd[45]: eth0: Configured
Jul 2 09:07:30 mantra airtime-playout[98]: 2021-07-02 09:07:30,959 [pypofetch] [INFO ] Queue timeout. Fetching schedule manually
Jul 2 09:07:31 mantra uwsgi[77]: [pid: 566|app: 0|req: 82/228] 127.0.0.1 () {36 vars in 640 bytes} [Fri Jul 2 12:07:30 2021] GET /api/v2/schedule/?ends__range=2021-07-02T12%3A07%3A30Z%2C2021-07-02T13%3A07%3A30Z => generated 458 bytes in 28 msecs (HTTP/1.1 200) 7 headers in 213 bytes (1 switches on core 0)
Jul 2 09:07:31 mantra uwsgi[77]: [pid: 565|app: 0|req: 65/229] 127.0.0.1 () {36 vars in 535 bytes} [Fri Jul 2 12:07:30 2021] GET /api/v2/show-instances/1354/ => generated 414 bytes in 18 msecs (HTTP/1.1 200) 7 headers in 227 bytes (1 switches on core 0)
Jul 2 09:07:31 mantra uwsgi[77]: [pid: 566|app: 0|req: 83/230] 127.0.0.1 () {36 vars in 511 bytes} [Fri Jul 2 12:07:31 2021] GET /api/v2/shows/4/ => generated 310 bytes in 14 msecs (HTTP/1.1 200) 7 headers in 227 bytes (1 switches on core 0)
Jul 2 09:07:31 mantra uwsgi[77]: [pid: 566|app: 0|req: 84/231] 127.0.0.1 () {36 vars in 513 bytes} [Fri Jul 2 12:07:31 2021] GET /api/v2/files/84/ => generated 1461 bytes in 24 msecs (HTTP/1.1 200) 7 headers in 228 bytes (1 switches on core 0)
Jul 2 09:07:31 mantra airtime-playout[98]: 2021-07-02 09:07:31,060 [pypoliquidsoap] [INFO ] Need to add items to Liquidsoap now: {4732}
Jul 2 09:07:31 mantra airtime-playout[98]: 2021-07-02 09:07:31,060 [pypofetch] [INFO ] Loop #88
Jul 2 09:07:31 mantra airtime-playout[98]: 2021-07-02 09:07:31,060 [pypofile] [INFO ] copying from http://localhost/api/v2/files/84/ to local cache /var/tmp/airtime/pypo/cache/scheduler/84.mp3
Jul 2 09:07:31 mantra airtime-playout[98]: 2021-07-02 09:07:31,061 [pypofile] [INFO ] {'start': datetime.datetime(2021, 7, 2, 11, 8, 19), 'end': datetime.datetime(2021, 7, 2, 13, 6, 24), 'row_id': 4732, 'independent_event': False, 'type': 'file', 'id': 84, 'fade_in': 500.0, 'fade_out': 500.0, 'cue_in': 3552.202779, 'cue_out': 7084.463583, 'metadata': {'item_url': 'http://localhost/api/v2/files/84/', 'name': '', 'mime': 'audio/mp3', 'ftype': 'audioclip', 'filepath': 'imported/5/PG036 by Diego Welter.mp3', 'import_status': 0, 'currently_accessing': 0, 'mtime': '2021-07-01T23:13:43Z', 'utime': '2021-07-01T23:12:46Z', 'lptime': None, 'md5': '202ae33a642ce475bd8b265ddb11c139', 'track_title': 'PG036 by Diego Welter.mp3', 'artist_name': None, 'bit_rate': 320000, 'sample_rate': 44100, 'format': None, 'length': '01:58:04.463600', 'album_title': None, 'genre': 'Otro', 'comments': None, 'year': None, 'track_number': None, 'channels': 2, 'url': None, 'bpm': None, 'rating': None, 'encoded_by': None, 'disc_number': None, 'mood': None, 'label': None, 'composer': None, 'encoder': None, 'checksum': None, 'lyrics': None, 'orchestra': None, 'conductor': None, 'lyricist': None, 'original_lyricist': None, 'radio_station_name': None, 'info_url': None, 'artist_url': None, 'audio_source_url': None, 'radio_station_url': None, 'buy_this_url': None, 'isrc_number': None, 'catalog_number': None, 'original_artist': None, 'copyright': None, 'report_datetime': None, 'report_location': None, 'report_organization': None, 'subject': None, 'contributor': None, 'language': None, 'file_exists': True, 'replay_gain': '-5.68', 'cuein': '00:00:00.142404', 'cueout': '01:58:04.463583', 'silan_check': False, 'hidden': False, 'is_scheduled': True, 'is_playlist': False, 'filesize': 283379568, 'description': None, 'artwork': '', 'track_type': 'MUS', 'directory': 'http://localhost/api/v2/music-dirs/1/', 'edited_by': None, 'owner': 'http://localhost/api/v2/users/5/'}, 'uri': 'http://localhost/api/v2/files/84/', 'filesize': 283379568, 'file_ext': '.mp3', 'dst': '/var/tmp/airtime/pypo/cache/scheduler/84.mp3', 'file_ready': False}
Jul 2 09:07:33 mantra uwsgi[77]: [pid: 561|app: 0|req: 8/232] 127.0.0.1 () {36 vars in 531 bytes} [Fri Jul 2 12:07:31 2021] GET /api/v2/files/84/download/ => generated 283379568 bytes in 2878 msecs via sendfile() (HTTP/1.1 200) 8 headers in 273 bytes (0 switches on core 0)
Jul 2 09:07:34 mantra airtime-liquidsoap[79]: 2021/07/02 09:07:34 [server:3] New client: localhost.
Jul 2 09:07:34 mantra airtime-liquidsoap[79]: 2021/07/02 09:07:34 [decoder:3] Method "MAD" accepted "/var/tmp/airtime/pypo/cache/scheduler/84.mp3".
Jul 2 09:07:34 mantra airtime-liquidsoap[79]: 2021/07/02 09:07:34 [lang:3] vars.show_name
Jul 2 09:07:34 mantra airtime-liquidsoap[79]: 2021/07/02 09:07:34 [server:3] Client localhost disconnected.
Jul 2 09:07:34 mantra airtime-liquidsoap[79]: 2021/07/02 09:07:34 [server:3] New client: localhost.
Jul 2 09:07:34 mantra airtime-liquidsoap[79]: 2021/07/02 09:07:34 [lang:3] dynamic_source.get_id
Jul 2 09:07:34 mantra airtime-liquidsoap[79]: 2021/07/02 09:07:34 [server:3] Client localhost disconnected.
Jul 2 09:07:34 mantra airtime-playout[98]: 2021-07-02 09:07:34,848 [pypoliqqueue] [INFO ] New schedule received: {}
Jul 2 09:07:34 mantra airtime-playout[98]: 2021-07-02 09:07:34,848 [pypoliqqueue] [INFO ] waiting indefinitely for schedule
Jul 2 09:07:34 mantra airtime-liquidsoap[79]: 2021/07/02 09:07:34 [s4:3] Prepared "/var/tmp/airtime/pypo/cache/scheduler/84.mp3" (RID 0).
Jul 2 09:07:34 mantra airtime-liquidsoap[79]: 2021/07/02 09:07:34 [cue_cut_5777:3] Cueing in...
Jul 2 09:07:40 mantra airtime-liquidsoap[79]: 2021/07/02 09:07:40 [amplify_5781:3] Overriding amplification: 1.000000.
Jul 2 09:07:40 mantra airtime-liquidsoap[79]: 2021/07/02 09:07:40 [lang:3] timeout --signal=KILL 45 pyponotify --media-id=4732 &
Jul 2 09:07:40 mantra airtime-liquidsoap[79]: 2021/07/02 09:07:40 [switch_5850:3] Switch to insert_metadata_5836.
Jul 2 09:07:40 mantra airtime-liquidsoap[79]: 2021/07/02 09:07:40 [lang:3] Using stream_format 0
Jul 2 09:07:40 mantra airtime-liquidsoap[79]: 2021/07/02 09:07:40 [lang:3] Using stream_format 0
Jul 2 09:07:40 mantra airtime-liquidsoap[79]: 2021/07/02 09:07:40 [schedule_noise_switch:3] Switch to map_metadata_5852 with transition.
Jul 2 09:07:40 mantra airtime-liquidsoap[79]: 2021/07/02 09:07:40 [lang:3] transition called...
Jul 2 09:07:40 mantra airtime-liquidsoap[79]: 2021/07/02 09:07:40 [clock.wallclock_main:2] We must catchup 5.70 seconds!
Jul 2 09:07:40 mantra airtime-liquidsoap[79]: 2021/07/02 09:07:40 [lang:3] Using stream_format 0
Jul 2 09:07:43 mantra airtime-liquidsoap[79]: #########################################
Jul 2 09:07:43 mantra airtime-liquidsoap[79]: # *** pypo *** #
Jul 2 09:07:43 mantra airtime-liquidsoap[79]: # pypo notification gateway #
Jul 2 09:07:43 mantra airtime-liquidsoap[79]: #########################################
Jul 2 09:09:01 mantra CRON[19399]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Jul 2 09:09:33 mantra systemd[1]: phpsessionclean.service: Failed to reset devices.list: Operation not permitted
Jul 2 09:09:33 mantra kernel: [7079753.810144] audit: type=1400 audit(1625227773.124:8622): apparmor="DENIED" operation="mount" info="failed flags match" error=-13 profile="lxc-container-default-cgns" name="/" pid=14037 comm="(ionclean)" flags="rw, rslave"
Jul 2 09:09:33 mantra kernel: [7079753.811178] audit: type=1400 audit(1625227773.124:8623): apparmor="DENIED" operation="mount" info="failed flags match" error=-13 profile="lxc-container-default-cgns" name="/" pid=14034 comm="(ionclean)" flags="rw, rslave"
Jul 2 09:09:33 mantra systemd[1]: Starting Clean php session files...
Jul 2 09:09:33 mantra systemd[1]: Started Clean php session files.
root@mantra:/home/mat# tail /var/log/syslog -f
Jul 2 09:14:11 mantra airtime-playout[98]: 2021-07-02 09:14:11,172 [pypoliqqueue] [INFO ] waiting indefinitely for schedule
Jul 2 09:14:11 mantra airtime-liquidsoap[79]: 2021/07/02 09:14:11 [server:3] New client: localhost.
Jul 2 09:14:11 mantra airtime-liquidsoap[79]: 2021/07/02 09:14:11 [lang:3] dynamic_source.get_id
Jul 2 09:14:11 mantra airtime-liquidsoap[79]: 2021/07/02 09:14:11 [server:3] Client localhost disconnected.
Jul 2 09:14:11 mantra uwsgi[77]: [pid: 566|app: 0|req: 85/233] 127.0.0.1 () {36 vars in 640 bytes} [Fri Jul 2 12:14:11 2021] GET /api/v2/schedule/?ends__range=2021-07-02T12%3A14%3A11Z%2C2021-07-02T13%3A14%3A11Z => generated 457 bytes in 23 msecs (HTTP/1.1 200) 7 headers in 213 bytes (1 switches on core 0)
Jul 2 09:14:11 mantra uwsgi[77]: [pid: 566|app: 0|req: 86/234] 127.0.0.1 () {36 vars in 535 bytes} [Fri Jul 2 12:14:11 2021] GET /api/v2/show-instances/1354/ => generated 414 bytes in 16 msecs (HTTP/1.1 200) 7 headers in 227 bytes (1 switches on core 0)
Jul 2 09:14:11 mantra uwsgi[77]: [pid: 564|app: 0|req: 38/235] 127.0.0.1 () {36 vars in 511 bytes} [Fri Jul 2 12:14:11 2021] GET /api/v2/shows/4/ => generated 310 bytes in 11 msecs (HTTP/1.1 200) 7 headers in 227 bytes (1 switches on core 0)
Jul 2 09:14:11 mantra uwsgi[77]: [pid: 565|app: 0|req: 66/236] 127.0.0.1 () {36 vars in 513 bytes} [Fri Jul 2 12:14:11 2021] GET /api/v2/files/84/ => generated 1479 bytes in 20 msecs (HTTP/1.1 200) 7 headers in 228 bytes (1 switches on core 0)

Next track change

Jul 2 10:06:27 mantra airtime-liquidsoap[79]: 2021/07/02 10:06:27 [s4:3] Finished with "/var/tmp/airtime/pypo/cache/scheduler/84.mp3".
Jul 2 10:06:27 mantra airtime-liquidsoap[79]: 2021/07/02 10:06:27 [cue_cut_5777:3] End of track before cue-out point.
Jul 2 10:06:27 mantra airtime-liquidsoap[79]: 2021/07/02 10:06:27 [amplify_5781:3] End of the current overriding.
Jul 2 10:06:27 mantra airtime-liquidsoap[79]: 2021/07/02 10:06:27 [schedule_noise_switch:3] Switch to map_metadata_5859 with forgetful transition.
Jul 2 10:06:27 mantra airtime-liquidsoap[79]: 2021/07/02 10:06:27 [lang:3] transition called...
Jul 2 10:06:27 mantra airtime-liquidsoap[79]: 2021/07/02 10:06:27 [dummy(dot)4:3] Source failed (no more tracks) stopping output...
Jul 2 10:06:27 mantra airtime-liquidsoap[79]: 2021/07/02 10:06:27 [dummy(dot)3:3] Source failed (no more tracks) stopping output...

Jul 2 10:07:31 mantra airtime-playout[98]: 2021-07-02 10:07:31,824 [pypofetch] [INFO ] Queue timeout. Fetching schedule manually
Jul 2 10:07:31 mantra uwsgi[77]: [pid: 566|app: 0|req: 101/265] 127.0.0.1 () {36 vars in 640 bytes} [Fri Jul 2 13:07:31 2021] GET /api/v2/schedule/?ends__range=2021-07-02T13%3A07%3A31Z%2C2021-07-02T14%3A07%3A31Z => generated 2 bytes in 16 msecs (HTTP/1.1 200) 7 headers in 211 bytes (1 switches on core 0)
Jul 2 10:07:31 mantra airtime-liquidsoap[79]: 2021/07/02 10:07:31 [server:3] New client: localhost.
Jul 2 10:07:31 mantra airtime-liquidsoap[79]: 2021/07/02 10:07:31 [lang:3] dynamic_source.get_id
Jul 2 10:07:31 mantra airtime-liquidsoap[79]: 2021/07/02 10:07:31 [server:3] Client localhost disconnected.
Jul 2 10:07:31 mantra airtime-playout[98]: 2021-07-02 10:07:31,853 [pypoliqqueue] [INFO ] New schedule received: {}
Jul 2 10:07:31 mantra airtime-playout[98]: 2021-07-02 10:07:31,854 [pypoliqqueue] [INFO ] waiting indefinitely for schedule
Jul 2 10:07:32 mantra airtime-playout[98]: 2021-07-02 10:07:32,017 [pypofetch] [INFO ] File '/var/tmp/airtime/pypo/cache/scheduler/84.mp3' removed
Jul 2 10:07:32 mantra airtime-playout[98]: 2021-07-02 10:07:32,017 [pypofetch] [INFO ] Loop #97
Jul 2 10:09:01 mantra CRON[21423]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Jul 2 10:09:33 mantra systemd[1]: phpsessionclean.service: Failed to reset devices.list: Operation not permitted

@paddatrapper
Copy link
Contributor Author

@matias-tecnosoul this patch now creates what is expected by the playout engine. The issue was the new api way of getting the schedule missed those two fields. There are also now unit tests for testing against what is expected (pulled from the RabbitMQ message that notifies of ad-hoc schedule changes).

@paddatrapper paddatrapper merged commit cf75b14 into libretime:master Jul 9, 2021
@paddatrapper paddatrapper deleted the fix/replay-gain branch July 9, 2021 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set default for replay_gain key in airtime_playout
2 participants