xref: /MusicFree/src/constants/commonConst.ts (revision 0412c91b103b497291ff162b4bed18ff932b9f03)
121f1ca13S猫头猫export const internalSymbolKey = Symbol.for('$');
20e4173cdS猫头猫export const internalSerializeKey = '$';
3c99a59f8S猫头猫export const localMusicSheetId = 'local-music-sheet';
4*0412c91bS猫头猫export const musicHistorySheetId = 'history-music-sheet';
57993f90eS猫头猫
67993f90eS猫头猫export const localPluginPlatform = '本地';
77993f90eS猫头猫export const localPluginHash = 'local-plugin-hash';
8ebadf528S猫头猫
9ebadf528S猫头猫export const internalFakeSoundKey = 'fake-key';
10e08d37a3S猫头猫
11e08d37a3S猫头猫const emptyFunction = () => {};
12e08d37a3S猫头猫Object.freeze(emptyFunction);
13e08d37a3S猫头猫export {emptyFunction};
14e08d37a3S猫头猫
1520e2869eS猫头猫export enum RequestStateCode {
162d0ec5c1S猫头猫    /** 空闲 */
1720e2869eS猫头猫    IDLE = 0,
182d0ec5c1S猫头猫    /** 检索首页 */
1920e2869eS猫头猫    PENDING_FP = 1,
2020e2869eS猫头猫    /** 检索中 */
2120e2869eS猫头猫    PENDING = 2,
2220e2869eS猫头猫    /** 部分结束 */
2320e2869eS猫头猫    PARTLY_DONE = 4,
2420e2869eS猫头猫    /** 全部结束 */
2520e2869eS猫头猫    FINISHED = 5,
26be474dd8S猫头猫}
272d0ec5c1S猫头猫
282d0ec5c1S猫头猫export const StorageKeys = {
2924e5e74aS猫头猫    MediaMetaKeys: 'media-meta-keys',
30e08d37a3S猫头猫    PluginMetaKey: 'plugin-meta',
314060c00aS猫头猫    MediaCache: 'media-cache',
32afb5c234S猫头猫    LocalMusicSheet: 'local-music-sheet',
332d0ec5c1S猫头猫};
34cfa0fc07S猫头猫
35cfa0fc07S猫头猫export const CacheControl = {
36cfa0fc07S猫头猫    Cache: 'cache',
37cfa0fc07S猫头猫    NoCache: 'no-cache',
38cfa0fc07S猫头猫    NoStore: 'no-store',
39cfa0fc07S猫头猫};
408fc75cb2S猫头猫
418fc75cb2S猫头猫export const supportLocalMediaType = [
428fc75cb2S猫头猫    '.mp3',
438fc75cb2S猫头猫    '.flac',
448fc75cb2S猫头猫    '.wma',
458fc75cb2S猫头猫    '.wav',
468fc75cb2S猫头猫    '.m4a',
478fc75cb2S猫头猫    '.ogg',
488fc75cb2S猫头猫    '.acc',
498fc75cb2S猫头猫    '.aac',
508fc75cb2S猫头猫    '.ape',
518fc75cb2S猫头猫    '.opus',
528fc75cb2S猫头猫];
53