pluginManager.ts (985f8e752d5aba035b2d386208af8f9605ba2712) | pluginManager.ts (74acbfc0a731ea2e5d2d6a4b6ce74ace2726ec29) |
---|---|
1import { 2 copyFile, 3 exists, 4 readDir, 5 readFile, 6 unlink, 7 writeFile, 8} from 'react-native-fs'; --- 274 unchanged lines hidden (view full) --- 283 } 284 try { 285 return ( 286 this.plugin.instance.getMusicInfo( 287 resetMediaItem(musicItem, undefined, true), 288 ) ?? {} 289 ); 290 } catch (e) { | 1import { 2 copyFile, 3 exists, 4 readDir, 5 readFile, 6 unlink, 7 writeFile, 8} from 'react-native-fs'; --- 274 unchanged lines hidden (view full) --- 283 } 284 try { 285 return ( 286 this.plugin.instance.getMusicInfo( 287 resetMediaItem(musicItem, undefined, true), 288 ) ?? {} 289 ); 290 } catch (e) { |
291 console.log(e); | |
292 return {}; 293 } 294 } 295 296 /** 获取歌词 */ 297 async getLyric( 298 musicItem: IMusic.IMusicItemBase, 299 from?: IMusic.IMusicItemBase, --- 345 unchanged lines hidden (view full) --- 645 ); 646 try { 647 await unlink(oldVersionPlugin.path); 648 } catch {} 649 } 650 pluginStateMapper.notify(); 651 return; 652 } | 291 return {}; 292 } 293 } 294 295 /** 获取歌词 */ 296 async getLyric( 297 musicItem: IMusic.IMusicItemBase, 298 from?: IMusic.IMusicItemBase, --- 345 unchanged lines hidden (view full) --- 644 ); 645 try { 646 await unlink(oldVersionPlugin.path); 647 } catch {} 648 } 649 pluginStateMapper.notify(); 650 return; 651 } |
653 throw new Error('插件无法解析'); | 652 throw new Error('插件无法解析!'); |
654 } 655 } catch (e: any) { 656 errorLog('URL安装插件失败', e); 657 throw new Error(e?.message ?? ''); 658 } 659} 660 661/** 卸载插件 */ --- 85 unchanged lines hidden --- | 653 } 654 } catch (e: any) { 655 errorLog('URL安装插件失败', e); 656 throw new Error(e?.message ?? ''); 657 } 658} 659 660/** 卸载插件 */ --- 85 unchanged lines hidden --- |