From ec5fa77496e9358a0ef608acdb070a21493ecca6 Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Mon, 26 Aug 2024 21:16:56 +0100 Subject: [PATCH] fix/remove unused cache leftovers the json dicts being saved are not used anywhere, just leftovers from the earlier experiment caching results --- __init__.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/__init__.py b/__init__.py index 312ddb6..c20867f 100755 --- a/__init__.py +++ b/__init__.py @@ -1,7 +1,6 @@ from os.path import join, dirname from typing import Iterable, Union, List -from json_database import JsonStorageXDG from ovos_utils import classproperty, timed_lru_cache from ovos_workshop.backwards_compat import MediaType, PlaybackType, Playlist, PluginStream from ovos_utils.parse import fuzzy_match, MatchStrategy @@ -13,8 +12,6 @@ class YoutubeMusicSkill(OVOSCommonPlaybackSkill): def __init__(self, *args, **kwargs): - self.archive = JsonStorageXDG("Youtube", subfolder="OCP") - self.playlists = JsonStorageXDG("YoutubePlaylists", subfolder="OCP") super().__init__(supported_media=[MediaType.MUSIC, MediaType.GENERIC], skill_icon=join(dirname(__file__), "res", "ytmus.png"), skill_voc_filename="youtube_music_skill", @@ -106,10 +103,6 @@ def search_youtube_music(self, phrase, media_type) -> Iterable[Union[PluginStrea )) if pl: yield pl - self.playlists[pl.title] = pl.as_dict - for entry in pl: - self.archive[entry.stream] = entry.as_dict - else: # videos / songs score = self.calc_score(phrase, v, idx, @@ -131,8 +124,6 @@ def search_youtube_music(self, phrase, media_type) -> Iterable[Union[PluginStrea ) yield entry idx += 1 - self.archive[entry.stream] = entry.as_dict - self.archive.store() if __name__ == "__main__":