Merge pull request #627 from tcely/patch-5

Don't write zero into MPAA in .nfo
This commit is contained in:
meeb 2025-01-17 16:55:25 +11:00 committed by GitHub
commit aa820821d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1444,7 +1444,8 @@ class Media(models.Model):
mpaa = nfo.makeelement('mpaa', {})
mpaa.text = str(self.age_limit)
mpaa.tail = '\n '
nfo.append(mpaa)
if self.age_limit and self.age_limit > 0:
nfo.append(mpaa)
# runtime = media metadata duration in seconds
runtime = nfo.makeelement('runtime', {})
runtime.text = str(self.duration)