def get_mp3_path(instance, filename): """ Description: Determine a unique upload path for a given Song mp3 file Arguments: - instance: Song model instance where file is being attached - filename: filename that was originally given to the file Return: Unique filepath for given file, that's a subpath of `audio/` Author: Nnoduka Eruchalu """ return get_upload_path(instance, filename, 'audio/')
def get_albumart_path(instance, filename): """ Description: Determine a unique upload path for a given Album art file Arguments: - instance: Album model instance where file is being attached - filename: filename that was originally given to the file Return: Unique filepath for given file, that's a subpath of `img/art/` Author: Nnoduka Eruchalu """ return get_upload_path(instance, filename, 'img/art/')
def get_cover_path(instance, filename): return get_upload_path(instance, filename, 'img/c/')
def get_avatar_path(instance, filename): return get_upload_path(instance, filename, 'img/a/')