mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-24 14:06:36 +00:00
Add _nfo_element
function
This commit is contained in:
parent
6278087b12
commit
3bb19861cd
@ -8,6 +8,13 @@ media_file_storage = FileSystemStorage(location=str(settings.DOWNLOAD_ROOT), bas
|
||||
_srctype_dict = lambda n: dict(zip( YouTube_SourceType.values, (n,) * len(YouTube_SourceType.values) ))
|
||||
|
||||
|
||||
def _nfo_element(nfo, label, text, /, *, attrs={}, tail='\n', char=' ', indent=2):
|
||||
element = nfo.makeelement(label, attrs)
|
||||
element.text = text
|
||||
element.tail = tail + (char * indent)
|
||||
return element
|
||||
|
||||
|
||||
def get_media_file_path(instance, filename):
|
||||
return instance.filepath
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user