music-kraken-core/src/goof.py

41 lines
987 B
Python
Raw Normal View History

2022-11-30 15:15:38 +00:00
import music_kraken
2022-12-06 16:55:07 +00:00
from music_kraken import (
Song,
Lyrics,
Target,
Source
)
2022-11-24 13:13:55 +00:00
import music_kraken.database.new_database as db
2022-12-06 22:44:42 +00:00
cache = music_kraken.database.new_database.Database("test.db")
cache.reset()
2022-12-06 16:55:07 +00:00
song = Song(
title="Vein Deep in the Solution",
2022-12-06 16:55:07 +00:00
release_name="One Final Action",
2022-12-06 22:44:42 +00:00
length=666,
2022-12-06 16:55:07 +00:00
target=Target(file="~/Music/genre/artist/album/song.mp3", path="~/Music/genre/artist/album"),
metadata={
"album": "One Final Action"
},
lyrics=[
2022-12-06 22:44:42 +00:00
Lyrics(text="these are some depressive lyrics", language="en"),
Lyrics(text="test", language="en")
2022-12-06 16:55:07 +00:00
],
sources=[
2022-12-06 22:44:42 +00:00
Source(src="youtube", url="https://youtu.be/dfnsdajlhkjhsd"),
Source(src="musify", url="https://ln.topdf.de/Music-Kraken/")
2022-12-06 16:55:07 +00:00
]
)
2022-12-06 22:44:42 +00:00
song_ref = song.reference
print(song_ref)
2022-12-06 22:44:42 +00:00
lyrics = Lyrics(text="these are some Lyrics that don't belong to any Song", language="en")
2022-12-06 13:45:18 +00:00
2022-12-06 22:44:42 +00:00
cache.push([song, lyrics])
2022-12-06 22:44:42 +00:00
cache.pull_single_song(song_ref=song_ref)