From f932e790aab114505271e2349d58d258f02d8d99 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Wed, 3 Feb 2010 14:29:10 +0000 Subject: [PATCH] icecast is only remcommended, fix M3U tags --- INSTALL | 8 +++++--- deefuzzer.py | 4 +--- tools/station.py | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/INSTALL b/INSTALL index a335190..3341d55 100644 --- a/INSTALL +++ b/INSTALL @@ -10,12 +10,14 @@ # Author: Guillaume Pellerin depends: python, python-dev, python-xml, python-shout | shout-python, libshout3, - libshout3-dev, icecast2, python-mutagen - - recommends: python-twitter, python-tinyurl, python-liblo | pyliblo (>= 0.26) + libshout3-dev, python-mutagen provides: shout-python + optional: python-twitter, python-tinyurl, python-liblo | pyliblo (>= 0.26) + + recommends: icecast2 + python-shout is included in the DeeFuzzer but needs to be compiled and installed if you don't install deefuzzer from its debian package with aptitude. As explained in shout-python/INSTALL, you just have to run this command : diff --git a/deefuzzer.py b/deefuzzer.py index 96576a5..9ca0802 100755 --- a/deefuzzer.py +++ b/deefuzzer.py @@ -120,14 +120,12 @@ class DeeFuzzer(Thread): if not os.path.exists(m3u_dir): os.makedirs(m3u_dir) m3u = open(self.m3u, 'w') - i = 1 m3u.write('#EXTM3U\n') for s in self.stations: - info = '#EXTINF:%s,%s' % (str(i), s.channel.name + ' (' + s.short_name + ')\n') + info = '#EXTINF:%s,%s - %s\n' % ('-1',s.short_name, s.channel.name) url = s.channel.protocol + '://' + s.channel.host + ':' + str(s.channel.port) + s.channel.mount + '\n' m3u.write(info) m3u.write(url) - i += 1 m3u.close() self.logger.write('Writing M3U file to : ' + self.m3u) diff --git a/tools/station.py b/tools/station.py index eb7862e..5d2e598 100644 --- a/tools/station.py +++ b/tools/station.py @@ -76,7 +76,7 @@ class Station(Thread): # Infos self.channel.url = self.station['infos']['url'] self.short_name = self.station['infos']['short_name'] - self.channel.name = self.station['infos']['name'] + ' ' + self.channel.url + self.channel.name = self.station['infos']['name'] + ' : ' + self.channel.url self.channel.genre = self.station['infos']['genre'] self.channel.description = self.station['infos']['description'] self.base_name = self.rss_dir + os.sep + self.short_name + '_' + self.channel.format @@ -235,7 +235,7 @@ class Station(Thread): self.player_mode = value message = "Received OSC message '%s' with arguments '%d'" % (path, value) self.logger.write(message) - + def get_playlist(self): file_list = [] for root, dirs, files in os.walk(self.media_dir): @@ -449,7 +449,7 @@ class Station(Thread): break self.set_read_mode() self.q.task_done() - + self.q.get(1) if (not (self.jingles_mode == 1 and (self.counter % 2) == 1) or self.relay_mode == 1) and self.twitter_mode == 1: self.update_twitter() -- 2.39.5