Fix search cache
This commit is contained in:
Generated
+12
-2
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"name": "Materialious",
|
||||
"version": "1.10.5",
|
||||
"version": "1.10.6",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "Materialious",
|
||||
"version": "1.10.5",
|
||||
"version": "1.10.6",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@capacitor-community/electron": "^5.0.0",
|
||||
"bgutils-js": "^3.2.0",
|
||||
"capacitor-nodejs": "https://github.com/hampoelz/capacitor-nodejs/releases/download/v1.0.0-beta.9/capacitor-nodejs.tgz",
|
||||
"chokidar": "~4.0.3",
|
||||
"electron-is-dev": "~2.0.0",
|
||||
"electron-serve": "~1.1.0",
|
||||
@@ -1797,6 +1798,15 @@
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/capacitor-nodejs": {
|
||||
"version": "1.0.0-beta.9",
|
||||
"resolved": "https://github.com/hampoelz/capacitor-nodejs/releases/download/v1.0.0-beta.9/capacitor-nodejs.tgz",
|
||||
"integrity": "sha512-4EU/QBolfuyHiMtwd1nxZ4wsK243tGE4VttKvVBG+x1yQuK9EIlEf3lbRjFXfjrJMTZNCqaP6glmdfj9Zo7KVg==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@capacitor/core": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/chalk": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
"dependencies": {
|
||||
"@capacitor-community/electron": "^5.0.0",
|
||||
"bgutils-js": "^3.2.0",
|
||||
"capacitor-nodejs": "https://github.com/hampoelz/capacitor-nodejs/releases/download/v1.0.0-beta.9/capacitor-nodejs.tgz",
|
||||
"chokidar": "~4.0.3",
|
||||
"electron-is-dev": "~2.0.0",
|
||||
"electron-serve": "~1.1.0",
|
||||
@@ -43,4 +44,4 @@
|
||||
"capacitor",
|
||||
"electron"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const CapacitorNodejs = require('../../../node_modules/capacitor-nodejs/electron/dist/plugin.js');
|
||||
|
||||
module.exports = {
|
||||
CapacitorNodejs,
|
||||
}
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "materialious",
|
||||
"version": "1.10.5",
|
||||
"version": "1.10.6",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "materialious",
|
||||
"version": "1.10.5",
|
||||
"version": "1.10.6",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@capacitor-community/electron": "^5.0.1",
|
||||
|
||||
@@ -121,8 +121,6 @@ export async function patchYoutubeJs(videoId: string): Promise<VideoPlay> {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(recommended);
|
||||
|
||||
recommendedVideos.push({
|
||||
videoThumbnails: (recommended?.content_image?.image as Thumbnail[]) || [],
|
||||
videoId: recommended?.content_id || '',
|
||||
|
||||
@@ -8,7 +8,6 @@ export async function loadEntirePlaylist(
|
||||
): Promise<{ videos: PlaylistPageVideo[]; info: PlaylistPage }> {
|
||||
const cachedPlaylists = get(playlistCacheStore);
|
||||
if (playlistId in cachedPlaylists) {
|
||||
console.log('Using cache');
|
||||
return cachedPlaylists[playlistId];
|
||||
}
|
||||
|
||||
|
||||
@@ -30,13 +30,13 @@ export async function load({ params, url }) {
|
||||
} else {
|
||||
getSearch(params.slug, { type: type }).then((newSearch) => {
|
||||
searchCacheStore.set({
|
||||
...get(searchCacheStore),
|
||||
[searchStoreId]: excludeDuplicateFeeds(search, newSearch) as (
|
||||
| Channel
|
||||
| Video
|
||||
| Playlist
|
||||
| HashTag
|
||||
)[]
|
||||
)[],
|
||||
...get(searchCacheStore)
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user