* revert: plugin host

* fix: totalPages for legacy backup
This commit is contained in:
nyagami
2024-02-25 16:47:45 +07:00
committed by GitHub
parent 9c05266c3c
commit a2220cf3b8
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -193,7 +193,7 @@ export const deleteCachedNovels = async () => {
};
const restoreFromBackupQuery =
'INSERT OR REPLACE INTO Novel (path, name, pluginId, cover, summary, author, artist, status, genres) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)';
'INSERT OR REPLACE INTO Novel (path, name, pluginId, cover, summary, author, artist, status, genres, totalPages) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
export const restoreLibrary = async (novel: NovelInfo) => {
const sourceNovel = await fetchNovel(novel.pluginId, novel.path).catch(e => {
@@ -213,6 +213,7 @@ export const restoreLibrary = async (novel: NovelInfo) => {
novel.artist || '',
novel.status || '',
novel.genres || '',
sourceNovel.totalPages || 0,
],
async (txObj, { insertId }) => resolve(insertId),
),
+1 -1
View File
@@ -129,7 +129,7 @@ const fetchPlugins = (): Promise<Record<Language, Array<PluginItem>>> => {
const githubRepository = 'lnreader-sources';
return fetch(
`https://raw.githubusercontent.com/${githubUsername}/${githubRepository}/beta-dist/.dist/plugins.min.json`,
`https://raw.githubusercontent.com/${githubUsername}/${githubRepository}/dist/.dist/plugins.min.json`,
).then(res => res.json());
};