Add all France Bleu stations
This commit is contained in:
parent
caf4bbc44a
commit
e0e8149bc8
1 changed files with 53 additions and 14 deletions
|
|
@ -77,14 +77,55 @@ class RadioFranceBackend(BaseBackend, ICapRadio, ICapCollection):
|
||||||
|
|
||||||
_MP3_URL = u'http://mp3.live.tv-radio.com/%s/all/%s.mp3'
|
_MP3_URL = u'http://mp3.live.tv-radio.com/%s/all/%s.mp3'
|
||||||
_MP3_HD_URL = u'http://mp3.live.tv-radio.com/%s/all/%shautdebit.mp3'
|
_MP3_HD_URL = u'http://mp3.live.tv-radio.com/%s/all/%shautdebit.mp3'
|
||||||
_RADIOS = {'franceinter': u'France Inter',
|
_RADIOS = {'franceinter': (u'France Inter', True),
|
||||||
'franceculture': u'France Culture',
|
'franceculture': (u'France Culture', True),
|
||||||
'franceinfo': u'France Info',
|
'franceinfo': (u'France Info', False),
|
||||||
'fbidf': u'France Bleu Ile-de-France',
|
'fbidf': (u'France Bleu Île-de-France (Paris)', True),
|
||||||
'fip': u'FIP',
|
'fip': (u'FIP', True),
|
||||||
'francemusique': u'France Musique',
|
'francemusique': (u'France Musique', True),
|
||||||
'lemouv': u'Le Mouv\'',
|
'lemouv': (u'Le Mouv\'', True),
|
||||||
}
|
'fbalsace': (u'France Bleu Alsace (Strasbourg)', False),
|
||||||
|
'fbarmorique': (u'France Bleu Armorique (Rennes)', False),
|
||||||
|
'fbauxerre': (u'France Bleu Auxerre', False),
|
||||||
|
'fbazur': (u'France Bleu Azur (Nice)', False),
|
||||||
|
'fbbassenormandie': (u'France Bleu Basse Normandie (Caen)', False),
|
||||||
|
'fbbearn': (u'France Bleu Bearn (Pau)', False),
|
||||||
|
'fbbelfort': (u'France Bleu Belfort', False),
|
||||||
|
'fbberry': (u'France Bleu Berry (Châteauroux)', False),
|
||||||
|
'fbbesancon': (u'France Bleu Besancon', False),
|
||||||
|
'fbbourgogne': (u'France Bleu Bourgogne (Dijon)', False),
|
||||||
|
'fbbreizizel': (u'France Bleu Breiz Izel (Quimper)', False),
|
||||||
|
'fbchampagne': (u'France Bleu Champagne (Reims)', False),
|
||||||
|
'fbcotentin': (u'France Bleu Cotentin (Cherbourg)', False),
|
||||||
|
'fbcreuse': (u'France Bleu Creuse (Gueret)', False),
|
||||||
|
'fbdromeardeche': (u'France Bleu Drome Ardeche (Valence)', False),
|
||||||
|
'fbfrequenzamora': (u'France Bleu Frequenza Mora (Bastia - Corse)', False),
|
||||||
|
'fbgardlozere': (u'France Bleu Gard Lozère (Nîmes)', False),
|
||||||
|
'fbgascogne': (u'France Bleu Gascogne (Mont-de-Marsan)', False),
|
||||||
|
'fbgironde': (u'France Bleu Gironde (Bordeaux)', False),
|
||||||
|
'fbhautenormandie': (u'France Bleu Haute Normandie (Rouen)', False),
|
||||||
|
'fbherault': (u'France Bleu Hérault (Montpellier)', False),
|
||||||
|
'fbisere': (u'France Bleu Isère (Grenoble)', False),
|
||||||
|
'fblarochelle': (u'France Bleu La Rochelle', False),
|
||||||
|
'fblimousin': (u'France Bleu Limousin (Limoges)', False),
|
||||||
|
'fbloireocean': (u'France Bleu Loire Océan (Nantes)', False),
|
||||||
|
'fblorrainenord': (u'France Bleu Lorraine Nord (Metz)', False),
|
||||||
|
'fbmayenne': (u'France Bleu Mayenne (Laval)', False),
|
||||||
|
'fbnord': (u'France Bleu Nord (Lille)', False),
|
||||||
|
'fborleans': (u'France Bleu Orléans', False),
|
||||||
|
'fbpaysbasque': (u'France Bleu Pays Basque (Bayonne)', False),
|
||||||
|
'fbpaysdauvergne': (u'France Bleu Pays d\'Auvergne (Clermont-Ferrand)', False),
|
||||||
|
'fbpaysdesavoie': (u'France Bleu Pays de Savoie (Chambery)', False),
|
||||||
|
'fbperigord': (u'France Bleu Périgord (Périgueux)', False),
|
||||||
|
'fbpicardie': (u'France Bleu Picardie (Amiens)', False),
|
||||||
|
'fbpoitou': (u'France Bleu Poitou (Poitiers)', False),
|
||||||
|
'fbprovence': (u'France Bleu Provence (Aix-en-Provence)', False),
|
||||||
|
'fbroussillon': (u'France Bleu Roussillon (Perpigan)', False),
|
||||||
|
'fbsudlorraine': (u'France Bleu Sud Lorraine (Nancy)', False),
|
||||||
|
'fbtoulouse': (u'France Bleu Toulouse', False),
|
||||||
|
'fbtouraine': (u'France Bleu Touraine (Tours)', False),
|
||||||
|
'fbvaucluse': (u'France Bleu Vaucluse (Avignon)', False),
|
||||||
|
}
|
||||||
|
|
||||||
_PLAYERJS_RADIOS = ('franceinter',
|
_PLAYERJS_RADIOS = ('franceinter',
|
||||||
'franceculture',
|
'franceculture',
|
||||||
|
|
@ -94,8 +135,6 @@ class RadioFranceBackend(BaseBackend, ICapRadio, ICapCollection):
|
||||||
|
|
||||||
_DIRECTJSON_RADIOS = ('lemouv', 'franceinter', )
|
_DIRECTJSON_RADIOS = ('lemouv', 'franceinter', )
|
||||||
|
|
||||||
_SD_RADIOS = ('franceinfo', )
|
|
||||||
|
|
||||||
def iter_resources(self, splited_path):
|
def iter_resources(self, splited_path):
|
||||||
if len(splited_path) > 0:
|
if len(splited_path) > 0:
|
||||||
raise CollectionNotFound()
|
raise CollectionNotFound()
|
||||||
|
|
@ -115,14 +154,14 @@ class RadioFranceBackend(BaseBackend, ICapRadio, ICapCollection):
|
||||||
if not radio.id in self._RADIOS:
|
if not radio.id in self._RADIOS:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
title = self._RADIOS[radio.id]
|
title, hd = self._RADIOS[radio.id]
|
||||||
radio.title = title
|
radio.title = title
|
||||||
radio.description = title
|
radio.description = title
|
||||||
|
|
||||||
if radio.id in self._SD_RADIOS:
|
if hd:
|
||||||
url = self._MP3_URL % (radio.id, radio.id)
|
|
||||||
else:
|
|
||||||
url = self._MP3_HD_URL % (radio.id, radio.id)
|
url = self._MP3_HD_URL % (radio.id, radio.id)
|
||||||
|
else:
|
||||||
|
url = self._MP3_URL % (radio.id, radio.id)
|
||||||
|
|
||||||
self.fillobj(radio, ('current', ))
|
self.fillobj(radio, ('current', ))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue