mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 05:26:37 +00:00
Don't write 'None' in default rating
It's better to not have a rating than to create parsing problems. An example of what is avoided: ``` <ratings> <rating name="youtube" max="5" default="True"> <value>None</value> <votes>16781</votes> </rating> </ratings> ```
This commit is contained in:
parent
a340d4f85e
commit
af0aae3de4
@ -1426,6 +1426,7 @@ class Media(models.Model):
|
|||||||
rating.tail = '\n '
|
rating.tail = '\n '
|
||||||
ratings = nfo.makeelement('ratings', {})
|
ratings = nfo.makeelement('ratings', {})
|
||||||
ratings.text = '\n '
|
ratings.text = '\n '
|
||||||
|
if self.rating is not None:
|
||||||
ratings.append(rating)
|
ratings.append(rating)
|
||||||
ratings.tail = '\n '
|
ratings.tail = '\n '
|
||||||
nfo.append(ratings)
|
nfo.append(ratings)
|
||||||
|
Loading…
Reference in New Issue
Block a user