This file is indexed.

/usr/share/doc/liquidsoap/html/scripts/dolebrai.html is in liquidsoap 1.0.0-4build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" \
                    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  <title>Liquidsoap :: Audio Stream Generation</title>
  <link href="../style.css" type="text/css" rel="stylesheet" />
  <link href="../homepage.css" type="text/css" rel="stylesheet" />
</head>
<body>
  <div id="wrapper">
    <div id="header">
      <div id="logo">
        <h1>Liquidsoap</h1>
        <h2>Audio Stream Generation</h2>
      </div>
      <div>
      <ul id="menu">
          <li id="menu-about">
            <a href="../index.html">about</a></li>
          <li id="menu-download">
            <a href="../download.html">download</a></li>
          <li id="menu-support">
            <a href="../documentation.html">documentation</a></li>
          <li id="menu-developers">
            <a href="http://savonet.rastageeks.org/">developers</a></li>
      </ul>
     </div>
    </div>
    <div id="content">
      <h3>dolebrai.liq</h3>
      <pre>#!/home/dbaelde/bin/liquidsoap -v

set("root.max_latency",30.)
set("server.telnet",true)
set("server.socket.permissions",0o660)
set("tag.encodings",["UTF-8","ISO-8859-1"])

%include "dolutils.liq"

root     = "/var/cache/dolebrai/"
scripts  = "/home/dbaelde/scripts/"
last_xml = "/home/dbaelde/dolebrai_public_html/last.xml"
default  = "/var/cache/dolebrai/local/gelnior/jazz/07-patamouchto.mp3"

add_protocol("dolebrai",
  fun (arg,delay) ->
    get_process_lines("#{scripts}dolebrai-filename #{quote(arg)}"))

# === MAIN SOURCE ===

# play explicit requests (from admins) or the playlist

default = single(id="default",default)

s =
  request.dynamic(id="scheduler",default_duration=30.,length=1.,
    fun () ->
      request(get_process_output("#{scripts}/scheduler.pl 2>> #{scripts}/log")))

s = fallback([ request.queue(id="q"), s, default ])

# Feedback is provided for any file played, be it from scheduler.pl, user 
# request via the queue or the default file.
# By the way we refresh the XML describing the latest tracks.
def feedback(m)
  system("#{scripts}/feedback.pl #{quote(m['filename'])} 2>> #{scripts}/logf")
  system("#{scripts}/last.rb > #{last_xml}")
end
# Add a telnet control to get info before metadata rewriting, used by last.rb
s = store_metadata(size=20,id="history",s)
s = on_metadata(feedback,s)

# Prepend introductory tracks if necessary
intro_mix = single("/var/cache/dolebrai/local/jingles/in_vitro/DJLEmb2.mp3")
def choose_prepend(m)
  if m["prepend_track"] != "" then
    request.queue(interactive=false,queue=[request(m["prepend_track"])])
  elsif m["track_type"] == "mix" then
    # This is more reliable than prepend_track as intro_mix is always ready
    intro_mix
  else
    fallback([])
  end
end
s = prepend(s, choose_prepend)

# === TWEAKS (blanks & metadata) ===

# Cut blanks (bonus-tracks)
s = skip_blank(length=7.,s)

# Rewrite metadata
s = rewrite_metadata([("title","$(title) (Dolebrai)"),
                      ("comment","http://dolebrai.net")],s)

# === JINGLES ===

# Metadata rewriting wrapper for jingle sources
def jingle_meta(j)
  rewrite_metadata([("artist", "Dolebrai"),
                    ("title","Jingle (Dolebrai)"),
                    ("comment","http://dolebrai.net")],j)
end

# One source for static jingles, added between tracks
jingles_stat = jingle_meta(playlist.safe(reload=3600,root^"jingles.static"))

# Add cross-fading, inserting "static" jingles during the fade..
def fade(jingles,s)
  fade_in = 2.
  fade_out = 2.
  start_next = 2.
  j = random(id="jrand",
             strict=true,weights=[1,5],
             [jingles, blank(id="bbb",duration=1.)])
  def fader(from,to)
    from = fade.out(duration=fade_out,from)
    to = fade.in(duration=fade_in,to)
    add(normalize=false,
        [ to,
          sequence([ j, fallback([]) ]),
          from ])
  end
  cross(duration=start_next,fader,s)
end
# s = fade(jingles_stat,s)
# Use the fader defined in dolutils.liq
# The smart fade tends to loose some metadata because there is no handling of 
# them in the generators...
s = dole_fade(jingles=jingles_stat,s)

# One for dynamic jingles, mixed on top of the stream with smooth starts/ends.
jingles_dyn = jingle_meta(playlist(reload=3600,root^"jingles.dynamic"))
jingles_dyn = fallback([request.queue(id="dynq"),jingles_dyn])
s = smooth_add(normal=s,special=switch([({ 0m0s or 30m0s }, jingles_dyn)]))

# === ADMIN INTERACTION ===
# More interactivity to come, included live show hooks & co
# s = mix([s,request.equeue(id="eq")])

# === OUTPUT ===
out_mp3 = output.icecast(%mp3, 
    password="XXX", bitrate=64, samplerate=22050, quality=2,
    genre="Musique Libre",
    url="http://dolebrai.net",
    description="La radio des musiques libres")
out_vorbis = output.icecast(%vorbis, 
    password="XXX",
    genre="Musique Libre",
    description="La radio des musiques libres")

# s = normalize(s)
s = audio_process(s)

out_vorbis(port=8000,mount="dolebrai.ogg",s)
out_mp3(port=8000,mount="dolebrai.mp3",s)

# out(port=7144,s) # One for peercast

# Start a watchdog to tell us if liquidsoap crashes
system("#{scripts}watchdog-dolebrai &")
</pre>      <a href="dolebrai.liq">Download</a>
    </div>
    <div>
      <div id="footer"> 2003-2011 Savonet team</div>
    </div>
  </div>
</body>
</html>