From ef6ea1e38665763d1454bd0920f785eb185c2e04 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Sun, 7 Dec 2014 16:17:33 +0100 Subject: [PATCH] [tv/radio] Mise en place d'une authentifications pour la radio hors zone crans --- tv/radio/icecast.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tv/radio/icecast.py b/tv/radio/icecast.py index 969c4692..3f23eae4 100755 --- a/tv/radio/icecast.py +++ b/tv/radio/icecast.py @@ -1,9 +1,22 @@ #!/usr/bin/python # -*- coding: utf8 -*- +# Utilisé pour générer le contenu du fichier /etc/icecast2/radio.xml + import urlparse import urllib from config import * +auth_template = """ + /%s + + +""" i=0 for group in multicast.keys(): for (title, (name,dst,port,sources)) in multicast[group].items(): @@ -23,3 +36,4 @@ for group in multicast.keys(): 1 1 """ % (host, port, p.path, name) + print auth_template % name