added src
This commit is contained in:
parent
ca8a3970a6
commit
c587db730a
@ -315,11 +315,20 @@ WHERE '{track_id}' == id;
|
|||||||
for artist in artist_list:
|
for artist in artist_list:
|
||||||
self.write_artist(song_id=song_id, artist=artist)
|
self.write_artist(song_id=song_id, artist=artist)
|
||||||
|
|
||||||
|
def write_source(self, song_id: str, source: Source):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def write_many_sources(self, song_id: str, source_list: List[Source]):
|
||||||
|
for source in source_list:
|
||||||
|
self.write_source(song_id=song_id, source=source)
|
||||||
|
|
||||||
def write_song(self, song: Song):
|
def write_song(self, song: Song):
|
||||||
song_id = song.id
|
song_id = song.id
|
||||||
|
|
||||||
# write artists
|
# write artists
|
||||||
self.write_many_artists(song_id=song_id, artist_list=song.artists)
|
self.write_many_artists(song_id=song_id, artist_list=song.artists)
|
||||||
|
# write sources
|
||||||
|
self.write_many_sources(song_id=song_id, source_list=song.sources)
|
||||||
# write target
|
# write target
|
||||||
self.write_target(song_id=song_id, target=song.target)
|
self.write_target(song_id=song_id, target=song.target)
|
||||||
|
|
||||||
|
@ -81,3 +81,6 @@ CREATE TABLE source (
|
|||||||
certainty INT NOT NULL DEFAULT 0, -- certainty=0 -> it is definitly a valid source
|
certainty INT NOT NULL DEFAULT 0, -- certainty=0 -> it is definitly a valid source
|
||||||
valid BOOLEAN NOT NULL DEFAULT 1
|
valid BOOLEAN NOT NULL DEFAULT 1
|
||||||
);
|
);
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS easy_id3;
|
||||||
|
CREATE TABLE easy_id3 ();
|
||||||
|
Loading…
Reference in New Issue
Block a user