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:
tcely 2025-01-16 01:18:20 -05:00 committed by GitHub
parent a340d4f85e
commit af0aae3de4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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