music-kraken-core/development/objects_collection.py

26 lines
557 B
Python
Raw Permalink Normal View History

2024-04-12 12:14:10 +00:00
import music_kraken
from music_kraken.objects import Song, Album, Artist, Collection
if __name__ == "__main__":
2024-05-03 12:52:12 +00:00
song_1 = Song(
title="song",
feature_artist_list=[Artist(
name="main_artist"
)]
2024-04-12 12:14:10 +00:00
)
2024-05-03 12:52:12 +00:00
other_artist = Artist(name="other_artist")
song_2 = Song(
title = "song",
2024-05-16 12:29:50 +00:00
artist_list=[other_artist]
)
2024-05-03 12:52:12 +00:00
other_artist.name = "main_artist"
2024-04-12 15:23:44 +00:00
2024-05-03 12:52:12 +00:00
song_1.merge(song_2)
2024-04-12 15:23:44 +00:00
2024-05-03 12:52:12 +00:00
print("#" * 120)
print("main", *song_1.artist_collection)
2024-05-03 12:52:12 +00:00
print("feat", *song_1.feature_artist_collection)