music-kraken-core/src/create_custom_objects.py

64 lines
1.9 KiB
Python
Raw Normal View History

2023-03-14 10:03:54 +00:00
from music_kraken import objects, recurse
2023-01-23 23:16:10 +00:00
import pycountry
2023-03-10 09:13:35 +00:00
song = objects.Song(
2023-01-23 23:16:10 +00:00
genre="HS Core",
title="Vein Deep in the Solution",
length=666,
isrc="US-S1Z-99-00001",
tracksort=2,
2023-03-10 09:13:35 +00:00
target=[
objects.Target(file="song.mp3", path="example")
],
lyrics_list=[
objects.Lyrics(text="these are some depressive lyrics", language="en"),
objects.Lyrics(text="Dies sind depressive Lyrics", language="de")
2023-01-23 23:16:10 +00:00
],
2023-01-30 13:41:02 +00:00
source_list=[
2023-03-10 09:13:35 +00:00
objects.Source(objects.SourcePages.YOUTUBE, "https://youtu.be/dfnsdajlhkjhsd"),
objects.Source(objects.SourcePages.MUSIFY, "https://ln.topdf.de/Music-Kraken/")
2023-01-23 23:16:10 +00:00
],
2023-03-10 09:13:35 +00:00
album_list=[
objects.Album(
2023-03-10 09:54:15 +00:00
title="One Final Action",
date=objects.ID3Timestamp(year=1986, month=3, day=1),
language=pycountry.languages.get(alpha_2="en"),
label_list=[
objects.Label(name="an album label")
],
source_list=[
objects.Source(objects.SourcePages.ENCYCLOPAEDIA_METALLUM, "https://www.metal-archives.com/albums/I%27m_in_a_Coffin/One_Final_Action/207614")
]
2023-03-10 09:13:35 +00:00
),
],
2023-01-30 13:41:02 +00:00
main_artist_list=[
2023-03-10 09:13:35 +00:00
objects.Artist(
2023-01-30 13:41:02 +00:00
name="I'm in a coffin",
source_list=[
2023-03-10 09:13:35 +00:00
objects.Source(
objects.SourcePages.ENCYCLOPAEDIA_METALLUM,
"https://www.metal-archives.com/bands/I%27m_in_a_Coffin/127727"
)
2023-03-14 10:03:54 +00:00
],
label_list=[
objects.Label(name="Depressive records")
2023-01-30 13:41:02 +00:00
]
),
2023-03-10 09:13:35 +00:00
objects.Artist(name="some_split_artist")
2023-01-30 13:41:02 +00:00
],
2023-03-10 09:54:15 +00:00
feature_artist_list=[
objects.Artist(
name="Ruffiction",
label_list=[
objects.Label(name="Ruffiction Productions")
]
)
],
2023-01-23 23:16:10 +00:00
)
2023-03-14 10:03:54 +00:00
song.compile()
2023-03-14 11:02:58 +00:00
print(song.options)