mirror of
https://github.com/csd4ni3l/music-player.git
synced 2026-01-01 04:03:42 +01:00
Remove FFmpeg Linux download which wouldnt work and add messageboxes, add a yes/no messagebox for yt-dlp, add acoustid music recognition, only support MP3, split online_metadata to multiple files, add missing metadata to files automatically, add synchronized lyrics pane
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import logging, sys, traceback, pyglet, arcade, arcade.gui, textwrap
|
||||
import logging, sys, traceback, pyglet, arcade, arcade.gui, textwrap, os, json
|
||||
|
||||
from utils.constants import menu_background_color
|
||||
|
||||
@@ -196,4 +196,19 @@ def get_wordwrapped_text(text, width=18):
|
||||
else:
|
||||
output_text = '\n'.join(textwrap.wrap(text, width=width))
|
||||
|
||||
return output_text
|
||||
return output_text
|
||||
|
||||
def ensure_metadata_file():
|
||||
if os.path.exists("metadata_cache.json") and os.path.isfile("metadata_cache.json"):
|
||||
with open("metadata_cache.json", "r") as file:
|
||||
metadata_cache = json.load(file)
|
||||
else:
|
||||
metadata_cache = {
|
||||
"query_results": {},
|
||||
"recording_by_id": {},
|
||||
"artist_by_id": {},
|
||||
"lyrics_by_artist_title": {},
|
||||
"album_by_id": {}
|
||||
}
|
||||
|
||||
return metadata_cache
|
||||
Reference in New Issue
Block a user