fixup: end with a line separator

This commit is contained in:
tcely 2025-06-12 10:05:56 -04:00 committed by GitHub
parent c7d9a0b58e
commit 6c39e6d3aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,6 @@
import base64 import base64
import binascii import binascii
import os
from common.logger import log from common.logger import log
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from sync.models import Source from sync.models import Source
@ -38,7 +39,7 @@ class Command(BaseCommand):
def handle(self, *args, **options): def handle(self, *args, **options):
channel_id = options['channel_id'] channel_id = options['channel_id']
channel_name = ' '.join(options['name']]).strip() channel_name = ' '.join(options['name']).strip()
key = options['id'] key = options['id']
try: try:
key = validYoutubeID(key) key = validYoutubeID(key)
@ -77,14 +78,14 @@ class Command(BaseCommand):
<tag>{channel_id or ''}</tag> <tag>{channel_id or ''}</tag>
</tvshow> </tvshow>
''' '''
content = '\n'.join(filter( content = os.linesep.join(filter(
lambda s: s.replace( lambda s: s.replace(
'<studio></studio>', '', '<studio></studio>', '',
).replace( ).replace(
'<tag></tag>', '', '<tag></tag>', '',
).lstrip(' '), ).lstrip(' '),
content.splitlines(), content.splitlines(),
)) )) + os.linesep
log.debug( log.debug(
f'Writing new content to: {nfo_path}', f'Writing new content to: {nfo_path}',
) )