**Describe the bug**
After an upgrade to liquidsoap 1.3.4 (and switching to opam to manage the 
installation), our radio server is no longer able to switch between playlists 
based on time of the day.

**To Reproduce**
The following switch:

```
daystream = switch(
  [(
      {0h-1h}, list00
    ),
    (
      {1h-2h}, list01
    ),
    (
      {2h-3h}, list02
    ),
    (
      {3h-4h}, list03
    ),
    (
      {4h-5h}, list04
    ),
    (
      {5h-6h}, list05
    ),
    (
      {6h-7h}, list06
    ),
    (
      {7h-8h}, list07
    ),
    (
      {8h-9h}, list08
    ),
    (
      {9h-10h}, list09
    ),
    (
      {10h-11h}, list10
    ),
    (
      {11h-12h}, list11
    ),
    (
      {12h-13h}, list12
    ),
    (
      {13h-14h}, list13
    ),
    (
      {14h-15h}, list14
    ),
    (
      {15h-16h}, list15
    ),
    (
      {16h-17h}, list16
    ),
    (
      {17h-18h}, list17
    ),
    (
      {18h-19h}, list18
    ),
    (
      {19h-20h}, list19
    ),
    (
      {20h-21h}, list20
    ),
    (
      {21h-22h}, list21
    ),
    (
      {22h-23h}, list22
    ),
    (
      {23h-24h}, list23
    )])
```

... only selects the appropriate list on start of the liquidsoap server. So, 
for example, if I start the script at 17:37, it switches to `list17` and keeps 
playing it. After 18:00, it still continues playing `list17` and it does not 
switch to `list18` but instead will repeat all tracks over and over again from 
the `list17`.

Hourly playlists are defined as follows:

```
list17 = smart_crossfade(
  normalize(
    mksafe(
      playlist(
        reload=7200,
        reload_mode="seconds",
        mode="normal",
        "/path/to/playlists/17.m3u"
      ))))

list18 = smart_crossfade(
  normalize(
    mksafe(
      playlist(
        reload=7200,
        reload_mode="seconds",
        mode="normal",
        "/path/to/playlists/18.m3u"
      ))))
```

Here's the log that shows it keeps using the old playlist, even though the time 
progresses past 18:00h:

```
2019/01/12 17:31:08 [17(dot)m3u:3] Finished with 
"/path/to/music/bands/Throwing_Stuff/Fit_Fine_Well/Throwing_Stuff-How_Do_You_Sleep_At_Night.mp3".
2019/01/12 17:31:08 [17(dot)m3u:3] Prepared 
"/path/to/music/bands/Teen_Death/Drag_Dark_Life/Teen_Death-Dark_Life.mp3" (RID 
51).
2019/01/12 17:31:08 [smart_cross_7210:3] Analysis: -25.976982dB / -14.978836dB 
(5.04s / 5.04s)
2019/01/12 17:31:08 [smart_crossfade:3] No transition: using default.
2019/01/12 17:31:53 [decoder:3] Method "MAD" accepted 
"/path/to/music/bands/Pommes_oder_Pizza/Grossstadtdschungel/Pommes_oder_Pizza-Scheissegal.mp3".
2019/01/12 17:32:03 [17(dot)m3u:3] Finished with 
"/path/to/music/bands/Teen_Death/Drag_Dark_Life/Teen_Death-Dark_Life.mp3".
2019/01/12 17:32:03 [17(dot)m3u:3] Prepared 
"/path/to/music/bands/Pommes_oder_Pizza/Grossstadtdschungel/Pommes_oder_Pizza-Scheissegal.mp3"
 (RID 52).
2019/01/12 17:32:03 [smart_cross_7210:3] Analysis: -20.494587dB / -19.489200dB 
(5.02s / 5.06s)
2019/01/12 17:32:03 [smart_crossfade:3] No transition: using default.
2019/01/12 17:34:03 [decoder:3] Method "MAD" accepted 
"/path/to/music/bands/Milenrama/Corazon_Y_Actitud/Milenrama-Poble_Rebel.mp3".
2019/01/12 17:34:13 [17(dot)m3u:3] Finished with 
"/path/to/music/bands/Pommes_oder_Pizza/Grossstadtdschungel/Pommes_oder_Pizza-Scheissegal.mp3".
2019/01/12 17:34:13 [17(dot)m3u:3] Prepared 
"/path/to/music/bands/Milenrama/Corazon_Y_Actitud/Milenrama-Poble_Rebel.mp3" 
(RID 53).
2019/01/12 17:34:13 [smart_cross_7210:3] Analysis: -112.435403dB / -12.198251dB 
(5.03s / 5.05s)
2019/01/12 17:34:13 [smart_crossfade:3] No transition: using default.
2019/01/12 17:37:01 [decoder:3] Method "MAD" accepted 
"/path/to/music/bands/cut_my_skin/On_The_Age/cut_my_skin-rage.mp3".
2019/01/12 17:37:12 [17(dot)m3u:3] Finished with 
"/path/to/music/bands/Milenrama/Corazon_Y_Actitud/Milenrama-Poble_Rebel.mp3".
2019/01/12 17:37:12 [17(dot)m3u:3] Prepared 
"/path/to/music/bands/cut_my_skin/On_The_Age/cut_my_skin-rage.mp3" (RID 54).
2019/01/12 17:37:12 [smart_cross_7210:3] Analysis: -110.300951dB / -20.084834dB 
(5.00s / 5.04s)
2019/01/12 17:37:12 [smart_crossfade:3] new >= old + margin, old <= medium and 
new <= high.
2019/01/12 17:37:12 [smart_crossfade:3] Do not fade if it's already very low.
2019/01/12 17:37:12 [smart_crossfade:3] Transition: crossed, no fade.
2019/01/12 17:39:21 [decoder:3] Method "MAD" accepted 
"/path/to/music/bands/GBH/Punk_Singles_1981_1984/GBH-Big_Women.mp3".
2019/01/12 17:39:31 [17(dot)m3u:3] Finished with 
"/path/to/music/bands/cut_my_skin/On_The_Age/cut_my_skin-rage.mp3".
2019/01/12 17:39:31 [17(dot)m3u:3] Prepared 
"/path/to/music/bands/GBH/Punk_Singles_1981_1984/GBH-Big_Women.mp3" (RID 55).
2019/01/12 17:39:31 [smart_cross_7210:3] Analysis: -145.234505dB / -25.830559dB 
(5.04s / 5.04s)
2019/01/12 17:39:31 [smart_crossfade:3] new >= old + margin, old <= medium and 
new <= high.
2019/01/12 17:39:31 [smart_crossfade:3] Do not fade if it's already very low.
2019/01/12 17:39:31 [smart_crossfade:3] Transition: crossed, no fade.
2019/01/12 17:41:33 [decoder:3] Method "MAD" accepted 
"/path/to/music/bands/Nordwand/Das_Pinke_Album/Nordwand-VBB.mp3".
2019/01/12 17:41:44 [17(dot)m3u:3] Finished with 
"/path/to/music/bands/GBH/Punk_Singles_1981_1984/GBH-Big_Women.mp3".
2019/01/12 17:41:44 [17(dot)m3u:3] Prepared 
"/path/to/music/bands/Nordwand/Das_Pinke_Album/Nordwand-VBB.mp3" (RID 0).
2019/01/12 17:41:44 [smart_cross_7210:3] Analysis: -28.364651dB / -21.642038dB 
(5.01s / 5.03s)
2019/01/12 17:41:44 [smart_crossfade:3] new >= old + margin, old >= medium and 
new <= high.
2019/01/12 17:41:44 [smart_crossfade:3] New source is significantly louder than 
old one.
2019/01/12 17:41:44 [smart_crossfade:3] Transition: crossed, fade-out.
2019/01/12 17:44:41 [decoder:3] Method "MAD" accepted 
"/path/to/music/bands/Never_Been_Famous/Charged/Never_Been_Famous-Poison_Ivy.mp3".
2019/01/12 17:44:52 [17(dot)m3u:3] Finished with 
"/path/to/music/bands/Nordwand/Das_Pinke_Album/Nordwand-VBB.mp3".
2019/01/12 17:44:52 [17(dot)m3u:3] Prepared 
"/path/to/music/bands/Never_Been_Famous/Charged/Never_Been_Famous-Poison_Ivy.mp3"
 (RID 1).
2019/01/12 17:44:52 [smart_cross_7210:3] Analysis: -30.143289dB / -16.220777dB 
(5.04s / 5.04s)
2019/01/12 17:44:52 [smart_crossfade:3] new >= old + margin, old >= medium and 
new <= high.
2019/01/12 17:44:52 [smart_crossfade:3] New source is significantly louder than 
old one.
2019/01/12 17:44:52 [smart_crossfade:3] Transition: crossed, fade-out.
2019/01/12 17:47:22 [decoder:3] Method "MAD" accepted 
"/path/to/music/bands/Latte/Punkrocksuppe/Latte-Cindy.mp3".
2019/01/12 17:47:32 [17(dot)m3u:3] Finished with 
"/path/to/music/bands/Never_Been_Famous/Charged/Never_Been_Famous-Poison_Ivy.mp3".
2019/01/12 17:47:32 [17(dot)m3u:3] Prepared 
"/path/to/music/bands/Latte/Punkrocksuppe/Latte-Cindy.mp3" (RID 3).
2019/01/12 17:47:32 [smart_cross_7210:3] Analysis: -40.509570dB / -15.033151dB 
(5.04s / 5.04s)
2019/01/12 17:47:32 [smart_crossfade:3] new >= old + margin, old <= medium and 
new <= high.
2019/01/12 17:47:32 [smart_crossfade:3] Do not fade if it's already very low.
2019/01/12 17:47:32 [smart_crossfade:3] Transition: crossed, no fade.
2019/01/12 17:49:32 [decoder:3] Method "MAD" accepted 
"/path/to/music/bands/Manges/All_Is_Well/Manges-Secret_Agent_Super_Dragon.mp3".
2019/01/12 17:49:43 [17(dot)m3u:3] Finished with 
"/path/to/music/bands/Latte/Punkrocksuppe/Latte-Cindy.mp3".
2019/01/12 17:49:43 [17(dot)m3u:3] Prepared 
"/path/to/music/bands/Manges/All_Is_Well/Manges-Secret_Agent_Super_Dragon.mp3" 
(RID 5).
2019/01/12 17:49:43 [smart_cross_7210:3] Analysis: -55.969473dB / -12.423143dB 
(5.02s / 5.06s)
2019/01/12 17:49:43 [smart_crossfade:3] No transition: using default.
2019/01/12 17:51:04 [decoder:3] Method "MAD" accepted 
"/path/to/music/bands/TV_Smith/Live_At_The_NVA/TV_Smith-Useless.mp3".
2019/01/12 17:51:14 [17(dot)m3u:3] Finished with 
"/path/to/music/bands/Manges/All_Is_Well/Manges-Secret_Agent_Super_Dragon.mp3".
2019/01/12 17:51:14 [17(dot)m3u:3] Prepared 
"/path/to/music/bands/TV_Smith/Live_At_The_NVA/TV_Smith-Useless.mp3" (RID 7).
2019/01/12 17:51:14 [smart_cross_7210:3] Analysis: -18.495556dB / -13.709062dB 
(5.01s / 5.03s)
2019/01/12 17:51:14 [smart_crossfade:3] No transition: using default.
2019/01/12 17:54:25 [decoder:3] Method "MAD" accepted 
"/path/to/music/bands/A_Time_To_Stand/Torcher/A_Time_To_Stand-Steak.mp3".
2019/01/12 17:54:35 [17(dot)m3u:3] Finished with 
"/path/to/music/bands/TV_Smith/Live_At_The_NVA/TV_Smith-Useless.mp3".
2019/01/12 17:54:35 [17(dot)m3u:3] Prepared 
"/path/to/music/bands/A_Time_To_Stand/Torcher/A_Time_To_Stand-Steak.mp3" (RID 
9).
2019/01/12 17:54:35 [smart_cross_7210:3] Analysis: -15.875151dB / -60.379581dB 
(5.01s / 5.03s)
2019/01/12 17:54:35 [smart_crossfade:3] No transition: using default.
2019/01/12 17:57:19 [decoder:3] Method "MAD" accepted 
"/path/to/music/bands/Die_Kassierer/Physik/Die_Kassierer-Schoenes_Universum.mp3".
2019/01/12 17:57:29 [17(dot)m3u:3] Finished with 
"/path/to/music/bands/A_Time_To_Stand/Torcher/A_Time_To_Stand-Steak.mp3".
2019/01/12 17:57:29 [17(dot)m3u:3] Prepared 
"/path/to/music/bands/Die_Kassierer/Physik/Die_Kassierer-Schoenes_Universum.mp3"
 (RID 0).
2019/01/12 17:57:29 [smart_cross_7210:3] Analysis: -32.436979dB / -11.627290dB 
(5.02s / 5.06s)
2019/01/12 17:57:29 [smart_crossfade:3] No transition: using default.
2019/01/12 17:59:50 [decoder:3] Method "MAD" accepted 
"/path/to/music/bands/Bitter_Grounds/Two_Sides_Of_Hope/Bitter_Grounds-My_Time.mp3".
2019/01/12 18:00:01 [17(dot)m3u:3] Finished with 
"/path/to/music/bands/Die_Kassierer/Physik/Die_Kassierer-Schoenes_Universum.mp3".
2019/01/12 18:00:01 [17(dot)m3u:3] Prepared 
"/path/to/music/bands/Bitter_Grounds/Two_Sides_Of_Hope/Bitter_Grounds-My_Time.mp3"
 (RID 1).
2019/01/12 18:00:01 [smart_cross_7210:3] Analysis: -48.332139dB / -26.913870dB 
(5.03s / 5.05s)
2019/01/12 18:00:01 [smart_crossfade:3] new >= old + margin, old <= medium and 
new <= high.
2019/01/12 18:00:01 [smart_crossfade:3] Do not fade if it's already very low.
2019/01/12 18:00:01 [smart_crossfade:3] Transition: crossed, no fade.
2019/01/12 18:01:51 [decoder:3] Method "MAD" accepted 
"/path/to/music/bands/Turbostaat/Flamingo/Turbostaat-Drei_Ecken_Ein_Elvers.mp3".
2019/01/12 18:02:02 [17(dot)m3u:3] Finished with 
"/path/to/music/bands/Bitter_Grounds/Two_Sides_Of_Hope/Bitter_Grounds-My_Time.mp3".
2019/01/12 18:02:02 [17(dot)m3u:3] Prepared 
"/path/to/music/bands/Turbostaat/Flamingo/Turbostaat-Drei_Ecken_Ein_Elvers.mp3" 
(RID 3).
2019/01/12 18:02:02 [smart_cross_7210:3] Analysis: -20.276381dB / -21.692844dB 
(5.02s / 5.02s)
2019/01/12 18:02:02 [smart_crossfade:3] No transition: using default.
2019/01/12 18:04:57 [decoder:3] Method "MAD" accepted 
"/path/to/music/bands/Out_Of_Bounds/Eat_Sleep_and_Greed/Out_Of_Bounds-Together_As_One.mp3".
2019/01/12 18:05:07 [17(dot)m3u:3] Finished with 
"/path/to/music/bands/Turbostaat/Flamingo/Turbostaat-Drei_Ecken_Ein_Elvers.mp3".
2019/01/12 18:05:07 [17(dot)m3u:3] Prepared 
"/path/to/music/bands/Out_Of_Bounds/Eat_Sleep_and_Greed/Out_Of_Bounds-Together_As_One.mp3"
 (RID 5).
2019/01/12 18:05:07 [smart_cross_7210:3] Analysis: -27.505492dB / -13.596628dB 
(5.03s / 5.05s)
2019/01/12 18:05:07 [smart_crossfade:3] No transition: using default.
2019/01/12 18:08:04 [decoder:3] Method "MAD" accepted 
"/path/to/music/bands/White_Sparrows/Kein_Applaus/White_Sparrows-Saturday_Night.mp3".
2019/01/12 18:08:14 [17(dot)m3u:3] Finished with 
"/path/to/music/bands/Out_Of_Bounds/Eat_Sleep_and_Greed/Out_Of_Bounds-Together_As_One.mp3".
2019/01/12 18:08:14 [17(dot)m3u:3] Prepared 
"/path/to/music/bands/White_Sparrows/Kein_Applaus/White_Sparrows-Saturday_Night.mp3"
 (RID 7).
2019/01/12 18:08:14 [smart_cross_7210:3] Analysis: -48.397938dB / -20.640119dB 
(5.00s / 5.04s)
2019/01/12 18:08:14 [smart_crossfade:3] new >= old + margin, old <= medium and 
new <= high.
2019/01/12 18:08:14 [smart_crossfade:3] Do not fade if it's already very low.
2019/01/12 18:08:14 [smart_crossfade:3] Transition: crossed, no fade.
2019/01/12 18:11:36 [decoder:3] Method "MAD" accepted 
"/path/to/music/bands/Steakknife/One_Eyed_Bomb/Steakknife-The_Problem_With_The_Concept.mp3".
2019/01/12 18:11:47 [17(dot)m3u:3] Finished with 
"/path/to/music/bands/White_Sparrows/Kein_Applaus/White_Sparrows-Saturday_Night.mp3".
2019/01/12 18:11:47 [17(dot)m3u:3] Prepared 
"/path/to/music/bands/Steakknife/One_Eyed_Bomb/Steakknife-The_Problem_With_The_Concept.mp3"
 (RID 0).
2019/01/12 18:11:47 [smart_cross_7210:3] Analysis: -102.268088dB / -49.076654dB 
(5.04s / 5.04s)
2019/01/12 18:11:47 [smart_crossfade:3] new >= old + margin, old <= medium and 
new <= high.
2019/01/12 18:11:47 [smart_crossfade:3] Do not fade if it's already very low.
2019/01/12 18:11:47 [smart_crossfade:3] Transition: crossed, no fade.
2019/01/12 18:14:17 [decoder:3] Method "MAD" accepted 
"/path/to/music/bands/Leto/Vor_die_Hunde/Leto-Wueste.mp3".
2019/01/12 18:14:28 [17(dot)m3u:3] Finished with 
"/path/to/music/bands/Steakknife/One_Eyed_Bomb/Steakknife-The_Problem_With_The_Concept.mp3".
2019/01/12 18:14:28 [17(dot)m3u:3] Prepared 
"/path/to/music/bands/Leto/Vor_die_Hunde/Leto-Wueste.mp3" (RID 1).
2019/01/12 18:14:28 [smart_cross_7210:3] Analysis: -29.347859dB / -27.705087dB 
(5.01s / 5.03s)
2019/01/12 18:14:28 [smart_crossfade:3] No transition: using default.
```

**Expected behavior**
It should switch to a new playlist every hour. As it used to do with previous 
versions (1.3.3).

**Version details**
 - _OS:_ Arch Linux 4.14.87-1-lts #1 SMP Sun Dec 9 11:37:14 CET 2018 x86_64 
GNU/Linux
 - _Version:_ [NOTE] Package liquidsoap is already installed (current version 
is 1.3.4).

**Install method**
_Did you install via `opam`?_ Yes.

```
#!/bin/bash
echo "eval opam config env"
eval `opam config env`
echo "opam update"
opam update
echo "opam upgrade"
opam upgrade
echo "opam depext"
OPAMVAR_os_family=arch opam depext taglib mad lame vorbis cry samplerate opus 
lastfm gstreamer flac liquidsoap
echo "opam install"
opam install taglib mad lame vorbis cry samplerate opus lastfm gstreamer flac 
liquidsoap
echo "liquidsoap --version"
liquidsoap --version
```

It's also reproducible on the 1.3.5 version of the fix-684 branch of 
https://github.com/savonet/liquidsoap/issues/684#issuecomment-453759032


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/savonet/liquidsoap/issues/690
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to