radiofrance: Fix fetching FIP current, support replay

FIP now uses the same website as most Radio France radios.
As a consequence, it is able to support CapVideo.

There are a few differences between FIP and the other radios, but this
still allowed for less code, and the code should be more robust for
every radio.
This commit is contained in:
Laurent Bachelier 2012-03-14 16:25:02 +01:00
commit 184cabf345
3 changed files with 69 additions and 52 deletions

View file

@ -50,3 +50,14 @@ class RadioFranceTest(BackendTest):
assert vid.id
self.backend.fillobj(vid, ['url'])
assert vid.url.lower().endswith('.mp3')
# fip (no expiration known)
# getting the proper ID is hard, hence the tests with many urls for the same content
urls = ('http://www.fipradio.fr/diffusion-club-jazzafip-du-13-mars',
'http://www.fipradio.fr/player/reecouter?play=20686',
'fip-20686')
for url in urls:
vid = self.backend.get_video(url)
assert vid.id == urls[-1]
self.backend.fillobj(vid, ['url'])
assert vid.url.lower().endswith('.mp3')