mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-25 14:36:34 +00:00
Merge pull request #626 from tcely/patch-4
Don't write 'None' in default rating
This commit is contained in:
commit
1979b66055
@ -1418,7 +1418,7 @@ class Media(models.Model):
|
|||||||
rating_attrs = OrderedDict()
|
rating_attrs = OrderedDict()
|
||||||
rating_attrs['name'] = 'youtube'
|
rating_attrs['name'] = 'youtube'
|
||||||
rating_attrs['max'] = '5'
|
rating_attrs['max'] = '5'
|
||||||
rating_attrs['default'] = 'True'
|
rating_attrs['default'] = 'true'
|
||||||
rating = nfo.makeelement('rating', rating_attrs)
|
rating = nfo.makeelement('rating', rating_attrs)
|
||||||
rating.text = '\n '
|
rating.text = '\n '
|
||||||
rating.append(value)
|
rating.append(value)
|
||||||
@ -1426,7 +1426,8 @@ class Media(models.Model):
|
|||||||
rating.tail = '\n '
|
rating.tail = '\n '
|
||||||
ratings = nfo.makeelement('ratings', {})
|
ratings = nfo.makeelement('ratings', {})
|
||||||
ratings.text = '\n '
|
ratings.text = '\n '
|
||||||
ratings.append(rating)
|
if self.rating is not None:
|
||||||
|
ratings.append(rating)
|
||||||
ratings.tail = '\n '
|
ratings.tail = '\n '
|
||||||
nfo.append(ratings)
|
nfo.append(ratings)
|
||||||
# plot = media metadata description
|
# plot = media metadata description
|
||||||
|
Loading…
Reference in New Issue
Block a user