xref: /MusicFree/src/constants/commonConst.ts (revision e08d37a33b6e5f38f39dcb49b2eb1095f0d66a1c)
121f1ca13S猫头猫export const internalSymbolKey = Symbol.for('$');
20e4173cdS猫头猫export const internalSerializeKey = '$';
3c99a59f8S猫头猫export const localMusicSheetId = 'local-music-sheet';
47993f90eS猫头猫
57993f90eS猫头猫export const localPluginPlatform = '本地';
67993f90eS猫头猫export const localPluginHash = 'local-plugin-hash';
7ebadf528S猫头猫
8ebadf528S猫头猫export const internalFakeSoundKey = 'fake-key';
9*e08d37a3S猫头猫
10*e08d37a3S猫头猫const emptyFunction = () => {};
11*e08d37a3S猫头猫Object.freeze(emptyFunction);
12*e08d37a3S猫头猫export {emptyFunction};
13*e08d37a3S猫头猫
14*e08d37a3S猫头猫/** 音质 */
15*e08d37a3S猫头猫export enum Quality {
16*e08d37a3S猫头猫    /** 标准 */
17*e08d37a3S猫头猫    Standard,
18*e08d37a3S猫头猫    /** 高音质 */
19*e08d37a3S猫头猫    HighQuality,
20*e08d37a3S猫头猫    /** 超高音质 */
21*e08d37a3S猫头猫    SuperQuality,
22*e08d37a3S猫头猫}
2320e2869eS猫头猫
2420e2869eS猫头猫export enum RequestStateCode {
252d0ec5c1S猫头猫    /** 空闲 */
2620e2869eS猫头猫    IDLE = 0,
272d0ec5c1S猫头猫    /** 检索首页 */
2820e2869eS猫头猫    PENDING_FP = 1,
2920e2869eS猫头猫    /** 检索中 */
3020e2869eS猫头猫    PENDING = 2,
3120e2869eS猫头猫    /** 部分结束 */
3220e2869eS猫头猫    PARTLY_DONE = 4,
3320e2869eS猫头猫    /** 全部结束 */
3420e2869eS猫头猫    FINISHED = 5,
35be474dd8S猫头猫}
362d0ec5c1S猫头猫
372d0ec5c1S猫头猫export const StorageKeys = {
3824e5e74aS猫头猫    MediaMetaKeys: 'media-meta-keys',
39*e08d37a3S猫头猫    PluginMetaKey: 'plugin-meta',
404060c00aS猫头猫    MediaCache: 'media-cache',
41afb5c234S猫头猫    LocalMusicSheet: 'local-music-sheet',
422d0ec5c1S猫头猫};
43cfa0fc07S猫头猫
44cfa0fc07S猫头猫export const CacheControl = {
45cfa0fc07S猫头猫    Cache: 'cache',
46cfa0fc07S猫头猫    NoCache: 'no-cache',
47cfa0fc07S猫头猫    NoStore: 'no-store',
48cfa0fc07S猫头猫};
49