|
@@ -1,4 +1,4 @@
|
|
|
-import { AppUtil, DeviceUtil, DisplayUtil, LogUtil, PreferencesUtil, ToastUtil } from '@pura/harmony-utils';
|
|
|
|
|
|
|
+import { AppUtil, ArrayUtil, DeviceUtil, DisplayUtil, LogUtil, PreferencesUtil, ToastUtil } from '@pura/harmony-utils';
|
|
|
import TitleBar from '../view/TitleBar';
|
|
import TitleBar from '../view/TitleBar';
|
|
|
import { curves, LengthMetrics, router, SegmentButton, SegmentButtonOptions, SymbolGlyphModifier } from '@kit.ArkUI';
|
|
import { curves, LengthMetrics, router, SegmentButton, SegmentButtonOptions, SymbolGlyphModifier } from '@kit.ArkUI';
|
|
|
import mainViewModel, { MainViewModel } from '../viewmodel/MainViewModel';
|
|
import mainViewModel, { MainViewModel } from '../viewmodel/MainViewModel';
|
|
@@ -1246,6 +1246,13 @@ struct NewIndex {
|
|
|
const playlists = await this.playlistTable.queryAllPlaylists()
|
|
const playlists = await this.playlistTable.queryAllPlaylists()
|
|
|
this.playlistList = playlists
|
|
this.playlistList = playlists
|
|
|
console.info(`成功加载 ${playlists.length} 个歌单`)
|
|
console.info(`成功加载 ${playlists.length} 个歌单`)
|
|
|
|
|
+ if(ArrayUtil.isNotEmpty(this.playlistList)){
|
|
|
|
|
+ const playlistSongs = await this.playlistTable.queryPlaylistSongs(this.playlistList[0].id)
|
|
|
|
|
+ this.currentSongList = await convertPlaylistSongsToVideoItems(this.context,playlistSongs)
|
|
|
|
|
+ this.currentSongListName= this.playlistList[0].name
|
|
|
|
|
+ this.currentSongListID = this.playlistList[0].id
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
} else {
|
|
} else {
|
|
|
console.warn('歌单表未初始化')
|
|
console.warn('歌单表未初始化')
|
|
|
}
|
|
}
|