fixed exceptions
This commit is contained in:
@@ -1,14 +1,5 @@
|
||||
import music_kraken
|
||||
from music_kraken import objects
|
||||
|
||||
from music_kraken.tagging import (
|
||||
AudioMetadata,
|
||||
write_metadata,
|
||||
write_many_metadata
|
||||
)
|
||||
|
||||
import music_kraken.database.old_database as db
|
||||
|
||||
import pycountry
|
||||
import logging
|
||||
|
||||
@@ -19,10 +10,7 @@ def div(msg: str = ""):
|
||||
print("-" * 50 + msg + "-" * 50)
|
||||
|
||||
|
||||
cache.reset()
|
||||
|
||||
|
||||
def print_song(song_: Song):
|
||||
def print_song(song_: objects.Song):
|
||||
print(str(song_.metadata))
|
||||
print("----album--")
|
||||
print(song_.album)
|
||||
@@ -34,49 +22,56 @@ def print_song(song_: Song):
|
||||
print("\n")
|
||||
|
||||
|
||||
song = Song(
|
||||
song = objects.Song(
|
||||
genre="HS Core",
|
||||
title="Vein Deep in the Solution",
|
||||
length=666,
|
||||
isrc="US-S1Z-99-00001",
|
||||
tracksort=2,
|
||||
target=Target(file="song.mp3", path="~/Music"),
|
||||
lyrics=[
|
||||
Lyrics(text="these are some depressive lyrics", language="en"),
|
||||
Lyrics(text="Dies sind depressive Lyrics", language="de")
|
||||
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")
|
||||
],
|
||||
source_list=[
|
||||
Source(SourcePages.YOUTUBE, "https://youtu.be/dfnsdajlhkjhsd"),
|
||||
Source(SourcePages.MUSIFY, "https://ln.topdf.de/Music-Kraken/")
|
||||
objects.Source(objects.SourcePages.YOUTUBE, "https://youtu.be/dfnsdajlhkjhsd"),
|
||||
objects.Source(objects.SourcePages.MUSIFY, "https://ln.topdf.de/Music-Kraken/")
|
||||
],
|
||||
album=Album(
|
||||
album_list=[
|
||||
objects.Album(
|
||||
title="One Final Action",
|
||||
date=ID3Timestamp(year=1986, month=3, day=1),
|
||||
date=objects.ID3Timestamp(year=1986, month=3, day=1),
|
||||
language=pycountry.languages.get(alpha_2="en"),
|
||||
label="cum productions",
|
||||
source_list=[
|
||||
Source(SourcePages.ENCYCLOPAEDIA_METALLUM,
|
||||
"https://www.metal-archives.com/albums/I%27m_in_a_Coffin/One_Final_Action/207614")
|
||||
]
|
||||
),
|
||||
main_artist_list=[
|
||||
Artist(
|
||||
name="I'm in a coffin",
|
||||
source_list=[
|
||||
Source(SourcePages.ENCYCLOPAEDIA_METALLUM,
|
||||
"https://www.metal-archives.com/bands/I%27m_in_a_Coffin/127727")
|
||||
objects.Source(objects.SourcePages.ENCYCLOPAEDIA_METALLUM, "https://www.metal-archives.com/albums/I%27m_in_a_Coffin/One_Final_Action/207614")
|
||||
]
|
||||
),
|
||||
Artist(name="some_split_artist")
|
||||
],
|
||||
feature_artist_list=[Artist(name="Ruffiction")],
|
||||
main_artist_list=[
|
||||
objects.Artist(
|
||||
name="I'm in a coffin",
|
||||
source_list=[
|
||||
objects.Source(
|
||||
objects.SourcePages.ENCYCLOPAEDIA_METALLUM,
|
||||
"https://www.metal-archives.com/bands/I%27m_in_a_Coffin/127727"
|
||||
)
|
||||
]
|
||||
),
|
||||
objects.Artist(name="some_split_artist")
|
||||
],
|
||||
feature_artist_list=[objects.Artist(name="Ruffiction")],
|
||||
)
|
||||
|
||||
print_song(song)
|
||||
print(song)
|
||||
|
||||
exit()
|
||||
|
||||
div()
|
||||
song_ref = song.reference
|
||||
cache.push([song])
|
||||
|
||||
|
||||
# getting song by song ref
|
||||
song_list = cache.pull_songs(song_ref=song_ref)
|
||||
|
||||
Reference in New Issue
Block a user