Skip to content

Commit

Permalink
fix/remove unused cache leftovers
Browse files Browse the repository at this point in the history
the json dicts being saved are not used anywhere, just leftovers from the earlier experiment caching results
  • Loading branch information
JarbasAl authored Aug 26, 2024
1 parent c6f19f9 commit ec5fa77
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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",
Expand Down Expand Up @@ -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,
Expand All @@ -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__":
Expand Down

0 comments on commit ec5fa77

Please sign in to comment.