lowercase tags

This commit is contained in:
bkfox 2022-02-22 20:35:31 +01:00
parent e9e09104ad
commit 4e03abcac8
2 changed files with 6 additions and 2 deletions

View File

@ -23,6 +23,9 @@ from aircox.models import *
__doc__ = __doc__.format(settings=settings)
__all__ = ('PlaylistImport', 'Command')
logger = logging.getLogger('aircox.commands')
@ -89,11 +92,10 @@ class PlaylistImport:
**self.track_kwargs
)
track.timestamp = timestamp
print('track', track, timestamp)
track.info = line.get('info')
tags = line.get('tags')
if tags:
track.tags.add(*tags.split(','))
track.tags.add(*tags.lower().split(','))
except Exception as err:
logger.warning(
'an error occured for track {index}, it may not '

View File

@ -118,6 +118,8 @@ except:
)
pass
#-- django-taggit
TAGGIT_CASE_INSENSITIVE = True
#-- django-CKEditor
CKEDITOR_CONFIGS = {