music-kraken-core/development/objects_collection.py
Lars Noack a998e52cd9
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix: syncing
2024-04-19 17:45:49 +02:00

31 lines
837 B
Python

import music_kraken
from music_kraken.objects import Song, Album, Artist, Collection
if __name__ == "__main__":
album_1 = Album(
title="album",
song_list=[
Song(title="song", main_artist_list=[Artist(name="artist")]),
],
artist_list=[
Artist(name="artist 3"),
]
)
album_2 = Album(
title="album",
song_list=[
Song(title="song", main_artist_list=[Artist(name="artist 2")]),
],
artist_list=[
Artist(name="artist"),
]
)
album_1.merge(album_2)
print()
print(album_1.artist_collection.data)
print(id(album_1.artist_collection), id(album_2.artist_collection))
print(id(album_1.song_collection[0].main_artist_collection), id(album_2.song_collection[0].main_artist_collection))