Esempio n. 1
0
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/')
Esempio n. 2
0
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/')
Esempio n. 3
0
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/')
Esempio n. 4
0
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/')
Esempio n. 5
0
def get_cover_path(instance, filename):
    return get_upload_path(instance, filename, 'img/c/')
Esempio n. 6
0
def get_avatar_path(instance, filename):
    return get_upload_path(instance, filename, 'img/a/')
Esempio n. 7
0
def get_cover_path(instance, filename):
    return get_upload_path(instance, filename, 'img/c/')
Esempio n. 8
0
def get_avatar_path(instance, filename):
    return get_upload_path(instance, filename, 'img/a/')