remove default images and memoji implementation

This commit is contained in:
geoffrey45 2022-06-20 13:16:21 +03:00
parent 84880f8cad
commit 61f9af86aa
23 changed files with 1 additions and 21 deletions

View File

@ -103,7 +103,7 @@ def get_albumartists():
for artist in artists: for artist in artists:
artist_obj = { artist_obj = {
"name": artist, "name": artist,
"image": helpers.check_artist_image(helpers.create_safe_name(artist)), "image": helpers.create_safe_name(artist) + ".webp",
} }
final_artists.append(artist_obj) final_artists.append(artist_obj)

View File

@ -85,26 +85,6 @@ def is_valid_file(filename: str) -> bool:
return False return False
def use_memoji():
"""
Returns a path to a random memoji image.
"""
path = str(random.randint(0, 20)) + ".svg"
return "defaults/" + path
def check_artist_image(image: str) -> str:
"""
Checks if the artist image is valid.
"""
img_name = image.replace("/", "::") + ".webp"
app_dir = settings.APP_DIR
if not os.path.exists(os.path.join(app_dir, "images", "artists", img_name)):
return use_memoji()
else:
return img_name
def create_album_hash(title: str, artist: str) -> str: def create_album_hash(title: str, artist: str) -> str:
""" """
Creates a simple hash for an album Creates a simple hash for an album

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB