Fine tuning

This commit is contained in:
2024-04-25 15:00:51 +02:00
parent 3b232ac3d7
commit 5967aefda7
+7 -7
View File
@@ -9,12 +9,12 @@ let json.parse credentials = file.contents("/home/pi/Conjurer/icecast_credentia
enable_replaygain_metadata()
# Set up a playlog for tracking played tracks
l = playlog(duration = 14400.0, persistency="/home/pi/Conjurer/persistence.log")
l = playlog(duration = 72000.0, persistency="/home/pi/Conjurer/persistence.log")
# Function to check if a track can be played based on its metadata
def check(r)
m = request.metadata(r)
if l.last(m) < 3600. then
if l.last(m) < 36000. then
log.info("Rejecting #{m['filename']} (played #{l.last(m)}s ago).")
false
else
@@ -51,7 +51,7 @@ s4 = random(id="randomizer", weights=[1, 3, 2], [s1, s2, s3])
jingles = (playlist(reload_mode="watch", "/home/pi/Conjurer/jingles.playlist"))
# Create the main stream with random playlist and jingles
s = rotate(id="randomizer", weights=[20, 1], [s4, jingles])
s = rotate(id="randomizer", weights=[10, 1], [s4, jingles])
s = crossfade(fade_out=3., fade_in=3., duration=5., fallback(id="switcher", track_sensitive=false, [requests_queue, s]))
@@ -72,6 +72,10 @@ s = compress.multiband.interactive(bands=7, s)
s = nrj(normalize(s))
s = amplify(a, s)
#w = interactive.float("wetness", min=0., max=1., 1.)
#s = dry_wet(w,s,s2)
# Skip blank sections in the stream
s = blank.skip(max_blank=2., s)
@@ -87,10 +91,6 @@ set("log.level", loglevel)
set("log.file", log_to_file)
set("log.file.path", logpath)
# Set up emergency fallback track
emergency = single("/home/pi/RetroPie/mp3/Youtube/Dr. Peacock - Trip to Ireland [GvrvQTUbUcA].mp3")
radio = fallback(id="switcher2", track_sensitive=false, [s, emergency])