Compare commits
No commits in common. "2af577c0cdf79756a710543ff702d487eddeec1a" and "e3d7ed883767f55980da4577e08a61e9f30d3283" have entirely different histories.
2af577c0cd
...
e3d7ed8837
22
.vscode/launch.json
vendored
22
.vscode/launch.json
vendored
@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
// Use IntelliSense to learn about possible attributes.
|
|
||||||
// Hover to view descriptions of existing attributes.
|
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
||||||
"version": "0.2.0",
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"name": "Python Debugger: Current File",
|
|
||||||
"type": "debugpy",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${file}",
|
|
||||||
"console": "integratedTerminal"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Python Debugger: Download script",
|
|
||||||
"type": "debugpy",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "development/actual_donwload.py",
|
|
||||||
"console": "integratedTerminal"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -6,8 +6,9 @@ logging.getLogger().setLevel(logging.DEBUG)
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
commands = [
|
commands = [
|
||||||
"s: #a Happy Days",
|
"s: #a Crystal F",
|
||||||
"d: 7",
|
"10",
|
||||||
|
"2",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -153,8 +153,6 @@ class Collection(Generic[T]):
|
|||||||
|
|
||||||
if other is None:
|
if other is None:
|
||||||
return
|
return
|
||||||
if not other._inner._has_data:
|
|
||||||
return
|
|
||||||
if other.id in self._indexed_from_id:
|
if other.id in self._indexed_from_id:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ class FormattedText:
|
|||||||
if self.is_empty and other.is_empty:
|
if self.is_empty and other.is_empty:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return self.html == other.html
|
return self.doc == other.doc
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def markdown(self) -> str:
|
def markdown(self) -> str:
|
||||||
|
@ -30,8 +30,6 @@ class InnerData:
|
|||||||
|
|
||||||
_refers_to_instances: set = None
|
_refers_to_instances: set = None
|
||||||
_is_in_collection: set = None
|
_is_in_collection: set = None
|
||||||
|
|
||||||
_has_data: bool = False
|
|
||||||
"""
|
"""
|
||||||
Attribute versions keep track, of if the attribute has been changed.
|
Attribute versions keep track, of if the attribute has been changed.
|
||||||
"""
|
"""
|
||||||
@ -50,19 +48,9 @@ class InnerData:
|
|||||||
for key, value in kwargs.items():
|
for key, value in kwargs.items():
|
||||||
if hasattr(value, "__is_collection__"):
|
if hasattr(value, "__is_collection__"):
|
||||||
value._collection_for[self] = key
|
value._collection_for[self] = key
|
||||||
|
|
||||||
self.__setattr__(key, value)
|
self.__setattr__(key, value)
|
||||||
|
|
||||||
if self._has_data:
|
|
||||||
continue
|
|
||||||
|
|
||||||
def __setattr__(self, key: str, value):
|
|
||||||
if self._has_data or not hasattr(self, "_default_values"):
|
|
||||||
return super().__setattr__(key, value)
|
|
||||||
|
|
||||||
super().__setattr__("_has_data", not (key in self._default_values and self._default_values[key] == value))
|
|
||||||
return super().__setattr__(key, value)
|
|
||||||
|
|
||||||
def __hash__(self):
|
def __hash__(self):
|
||||||
return self.id
|
return self.id
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ class Song(Base):
|
|||||||
"album_collection": Collection,
|
"album_collection": Collection,
|
||||||
"feature_artist_collection": Collection,
|
"feature_artist_collection": Collection,
|
||||||
|
|
||||||
"title": lambda: None,
|
"title": lambda: "",
|
||||||
"unified_title": lambda: None,
|
"unified_title": lambda: None,
|
||||||
"isrc": lambda: None,
|
"isrc": lambda: None,
|
||||||
"genre": lambda: None,
|
"genre": lambda: None,
|
||||||
|
@ -681,20 +681,17 @@ class Musify(Page):
|
|||||||
anchor: BeautifulSoup = artist_crumb.find("a")
|
anchor: BeautifulSoup = artist_crumb.find("a")
|
||||||
if anchor is not None:
|
if anchor is not None:
|
||||||
href = anchor.get("href")
|
href = anchor.get("href")
|
||||||
|
artist_source_list: List[Source] = []
|
||||||
|
|
||||||
href_parts = href.split("/")
|
if href is not None:
|
||||||
if not(len(href_parts) <= 1 or href_parts[-2] != "artist"):
|
artist_source_list.append(Source(self.SOURCE_TYPE, self.HOST + href.strip()))
|
||||||
artist_source_list: List[Source] = []
|
|
||||||
|
|
||||||
if href is not None:
|
span: BeautifulSoup = anchor.find("span")
|
||||||
artist_source_list.append(Source(self.SOURCE_TYPE, self.HOST + href.strip()))
|
if span is not None:
|
||||||
|
artist_list.append(Artist(
|
||||||
span: BeautifulSoup = anchor.find("span")
|
name=span.get_text(strip=True),
|
||||||
if span is not None:
|
source_list=artist_source_list
|
||||||
artist_list.append(Artist(
|
))
|
||||||
name=span.get_text(strip=True),
|
|
||||||
source_list=artist_source_list
|
|
||||||
))
|
|
||||||
else:
|
else:
|
||||||
self.LOGGER.debug("there are not 4 breadcrumb items, which shouldn't be the case")
|
self.LOGGER.debug("there are not 4 breadcrumb items, which shouldn't be the case")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user