played around with cover image + deleted old files
This commit is contained in:
15
testfile.py
15
testfile.py
@@ -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')
|
||||
Reference in New Issue
Block a user