feature/sponsorblock #17

Merged
Hazel merged 20 commits from feature/sponsorblock into experimental 2024-04-27 09:41:36 +00:00
2 changed files with 4 additions and 1 deletions
Showing only changes of commit d7348b9111 - Show all commits

View File

@ -148,6 +148,9 @@ class Cache:
return None
# check if it is outdated
if f"{self.module}_{name}" not in self._id_to_attribute:
path.unlink()
return
existing_attribute: CacheAttribute = self._id_to_attribute[f"{self.module}_{name}"]
if not existing_attribute.is_valid:
return

View File

@ -376,7 +376,7 @@ class Musify(Page):
def general_search(self, search_query: str) -> List[DatabaseObject]:
search_results = []
r = self.connection.get(f"https://musify.club/search?searchText={search_query}")
r = self.connection.get(f"https://musify.club/search?searchText={search_query}", name="search_" + search_query)
if r is None:
return []
search_soup: BeautifulSoup = self.get_soup_from_response(r)