From e7e315ed42f691a0a59cc6bcdbac2d494c05ed8f Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Tue, 22 Nov 2022 12:46:45 +0100 Subject: [PATCH] refactored using the song and src object instead of dict --- src/music_kraken/database/song.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/music_kraken/database/song.py b/src/music_kraken/database/song.py index ab77df9..b737362 100644 --- a/src/music_kraken/database/song.py +++ b/src/music_kraken/database/song.py @@ -77,5 +77,11 @@ class Song: return self.json_data[item] def __setitem__(self, item, value): + if item == "file": + self.target.file = value + return + if item == "path": + self.target.path = value + return print(item, value) self.json_data[item] = value