From 9df95234764959aae9eec79bd08b8df44a040f22 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Fri, 19 Dec 2014 16:21:05 +0100 Subject: [PATCH] [icecast.py] Mis dans bcfg2 --- tv/radio/icecast.py | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100755 tv/radio/icecast.py diff --git a/tv/radio/icecast.py b/tv/radio/icecast.py deleted file mode 100755 index 3f23eae4..00000000 --- a/tv/radio/icecast.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/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(): - p=urlparse.urlparse(sources[0]) - if ':' in p.netloc: - host=p.netloc.split(':')[0] - port=p.netloc.split(':')[1] - else: - host=p.netloc - port = 80 - print """ - - %s - %s - %s - /%s - 1 - 1 -""" % (host, port, p.path, name) - print auth_template % name