From 3ddddf2f5f1fccacb936530bde30cf74450d3304 Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Mon, 30 Jan 2023 17:07:26 +0100 Subject: [PATCH] hs --- src/music_kraken/database/objects/song.py | 8 ++++++++ test.db | Bin 65536 -> 65536 bytes 2 files changed, 8 insertions(+) diff --git a/src/music_kraken/database/objects/song.py b/src/music_kraken/database/objects/song.py index f534ce4..e63596a 100644 --- a/src/music_kraken/database/objects/song.py +++ b/src/music_kraken/database/objects/song.py @@ -147,6 +147,7 @@ class Song(DatabaseObject, SourceAttribute, MetadataAttribute): if lyrics is not None: self.lyrics = lyrics + self._album = None self.album = album self.main_artist_list = [] @@ -214,7 +215,14 @@ class Song(DatabaseObject, SourceAttribute, MetadataAttribute): metadata.merge_many([l.metadata for l in self.lyrics]) return metadata + def set_album(self, album): + self._album = album + if self not in self._album.tracklist: + self._album.tracklist.append(self) + + tracksort_str = property(fget=get_tracksort_str) + album = property(fget=lambda self: self._album, fset=set_album) diff --git a/test.db b/test.db index 516b94cb48b7b6f8206c2d995336e0b935b2018a..5d1897045b6fd09e211a857b7b0412db085650c1 100644 GIT binary patch delta 1815 zcma)6O^aMb6n(Ehv`3k)G%|}gLV8pXom5g^@71e?4(KYG_A90!C_2{1D`;`1gEJ#C z4fafCkwtHO^v3lp6m%r$?EDAnEG0WdaBs3ySKilwK!T9k6g*zlx#ymH&fVW{?eDj~ zc)GDPsGfNh&hJ0`3bpnUw0F|$Uq|GiaX9Mewbe$ttV58z77M*+3b!J^l5k8{rjYMW_PjG{Wtlis>UfCpIzLWu6Oj(@_J`M2SP<)!edWZz=BJT zl`TBZEfDvG$cW2kKdimYn2pXeB`_XagDXmThG1`)89uoKWOXMdfF)B!E*$A zOTghd%fN?$1F|xlQB|7R;MO@316eoTK*tF>uEX9Rqx4EuJ#Xv&A6-Sb=I`~*m?oRQ z&36O3mY{3sbgtDBO1G;@Op58HroO0L?sEre;+A_*s)VK(lh|-4EoTJmDYr+P<;M2) zkB2)O=98V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