afsdfd
This commit is contained in:
parent
46f01032f5
commit
be44d35fab
@ -42,10 +42,12 @@ class Source(DatabaseObject, SongAttribute, ID3Metadata):
|
|||||||
```
|
```
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self,type_str: str, id_: str = None, src: str = None, url: str = None) -> None:
|
def __init__(self, id_: str = None, src: str = None, url: str = None, type_str: str = None) -> None:
|
||||||
DatabaseObject.__init__(self, id_=id_)
|
DatabaseObject.__init__(self, id_=id_)
|
||||||
SongAttribute.__init__(self)
|
SongAttribute.__init__(self)
|
||||||
|
|
||||||
|
self.type_enum = None
|
||||||
|
if type_str is not None:
|
||||||
self.type_enum = source_types(type_str)
|
self.type_enum = source_types(type_str)
|
||||||
self.src = sources(src)
|
self.src = sources(src)
|
||||||
self.url = url
|
self.url = url
|
||||||
|
@ -14,6 +14,7 @@ CREATE TABLE Song
|
|||||||
CREATE TABLE Source
|
CREATE TABLE Source
|
||||||
(
|
(
|
||||||
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
type TEXT NOT NULL
|
||||||
src TEXT NOT NULL,
|
src TEXT NOT NULL,
|
||||||
url TEXT NOT NULL,
|
url TEXT NOT NULL,
|
||||||
certainty INT NOT NULL DEFAULT 0, -- certainty=0 -> it is definitely a valid source
|
certainty INT NOT NULL DEFAULT 0, -- certainty=0 -> it is definitely a valid source
|
||||||
|
Loading…
Reference in New Issue
Block a user