feat: add intro-skipper

This commit is contained in:
Prayag Prajapati committed 2024-07-18 21:30:02 +05:30
1 parent a240ec7452
commit d077860fbc
10 files changed
+166 -45

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
import { Store } from "@tauri-apps/plugin-store";
const SettingsStore = new Store(".settings.dat");
/**
* settingKey should be of type:
* 'settingDomain.settingKeyName'
*/
export const setSetting = async (settingKey: string, value: boolean) => {
await SettingsStore.set(settingKey, value);
await SettingsStore.save();
};
export const getSetting = async (settingKey: string) => {
const value = await SettingsStore.get(settingKey);
console.log(`${settingKey} - ${value}`);
if (value) return value;
return false;
};
export const allSettings = {
general: [
{
key: "general.enable_skip_intro_outro",
name: "Enable Intro-Skipper plugin",
description:
"Shows a skip button for Intros and End Credit scenes in an episode. Note: this requires jumoog/intro-skipper plugin to be installed on server",
},
],
};