diff --git a/tubesync/sync/management/commands/create-tvshow-nfo.py b/tubesync/sync/management/commands/create-tvshow-nfo.py index 3691b259..0295b66d 100644 --- a/tubesync/sync/management/commands/create-tvshow-nfo.py +++ b/tubesync/sync/management/commands/create-tvshow-nfo.py @@ -1,6 +1,5 @@ import base64 import binascii -import os from common.logger import log from django.utils.translation import gettext_lazy as _ from sync.models import Source @@ -81,14 +80,15 @@ class Command(BaseCommand): {channel_id or ''} ''' - content = os.linesep.join(filter( + tfmt = '<{t}>' + content = ''.join(filter( lambda s: s.replace( - '', '', + tfmt.format(t='studio'), '', 1, ).replace( - '', '', - ).lstrip(' '), - content.splitlines(), - )) + os.linesep + tfmt.format(t='tag'), '', 1, + ).lstrip(), + content.splitlines(keepends=True), + )) log.debug( f'Writing new content to: {nfo_path}', )