mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-22 13:06:34 +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,7 +1426,8 @@ class Media(models.Model):
|
||||
rating.tail = '\n '
|
||||
ratings = nfo.makeelement('ratings', {})
|
||||
ratings.text = '\n '
|
||||
ratings.append(rating)
|
||||
if self.rating is not None:
|
||||
ratings.append(rating)
|
||||
ratings.tail = '\n '
|
||||
nfo.append(ratings)
|
||||
# plot = media metadata description
|
||||
|
Loading…
Reference in New Issue
Block a user