From af0aae3de4ef85513de39201a0e6d94310a92f5f Mon Sep 17 00:00:00 2001 From: tcely Date: Thu, 16 Jan 2025 01:18:20 -0500 Subject: [PATCH] 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: ``` None 16781 ``` --- tubesync/sync/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tubesync/sync/models.py b/tubesync/sync/models.py index 14ce4cf0..59d9e6d8 100644 --- a/tubesync/sync/models.py +++ b/tubesync/sync/models.py @@ -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