radiofrance: Fix crash when there is no author
Triggered by FIP at night. Also force unicode when merging titles.
This commit is contained in:
parent
3a68fc615b
commit
0e0bf2ad37
2 changed files with 3 additions and 1 deletions
|
|
@ -161,7 +161,7 @@ class RadioFranceBackend(BaseBackend, ICapRadio, ICapCollection, ICapVideo):
|
|||
artist = dartist
|
||||
if dtitle:
|
||||
if title:
|
||||
title = "%s [%s]" % (dtitle, title)
|
||||
title = u"%s [%s]" % (dtitle, title)
|
||||
else:
|
||||
title = dtitle
|
||||
elif radio.id in self._LARGEDIRECTJSON_RADIOS:
|
||||
|
|
|
|||
|
|
@ -102,6 +102,8 @@ class DataPage(BasePage):
|
|||
artist = unicode(artist).strip()
|
||||
ftitle = document.findtext('//div[@class="subtitle"]')
|
||||
title = unicode(ftitle).strip() if ftitle else title
|
||||
else:
|
||||
artist = None
|
||||
|
||||
return (artist, title)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue