played around with cover image + deleted old files

This commit is contained in:
janis
2022-11-05 15:41:15 +01:00
parent 3eda98c78c
commit 2d0b3d6cb1
5 changed files with 13 additions and 113 deletions

View File

@@ -1,5 +1,12 @@
import requests
from mutagen.mp3 import MP3
from mutagen.id3 import ID3, APIC, error
from PIL import Image
from io import BytesIO
x = requests.post('http://localhost:8000/testrequest', {"Test":"test"})
print(x.text)
songpath = '/mnt/storage/SORTED/Music/KB/01 Tennessee Waltz.mp3'
audio = MP3(songpath)
tags = ID3(songpath)
print(tags.pprint())
pic = tags.get("APIC:").data
img = Image.open(BytesIO(pic))
img.save('./coverart.png')