|
|
@@ -56,8 +56,10 @@ export function FindViewBuilder() {
|
|
|
}
|
|
|
|
|
|
const TAG = 'FindView'
|
|
|
-const SWIPER_MAX_COUNT = 5
|
|
|
-const HOT_SECTION_COUNT = 10
|
|
|
+const SWIPER_MAX_COUNT = 6
|
|
|
+// “今日乐曲”和“云卷云舒”拆开计数,避免一个区块调数量时影响另一个区块。
|
|
|
+const LOCAL_RANDOM_SECTION_COUNT = 20
|
|
|
+const CLOUD_MOOD_SECTION_COUNT = 10
|
|
|
const REMOTE_POOL_COUNT = 32
|
|
|
const REMOTE_VISIBLE_COVER_RESOLVE_LIMIT = 24
|
|
|
const CLOUD_SECTION_COUNT = 18
|
|
|
@@ -375,7 +377,7 @@ export struct FindView {
|
|
|
this.featuredAlbumsPool = this.buildAlbumGroups(this.localSongsPool, false)
|
|
|
this.searchRemoteSongsPool = []
|
|
|
this.swiperSongs = this.pickRandomSongs(this.coveredSongsPool, SWIPER_MAX_COUNT)
|
|
|
- this.hotSongs = this.pickPreferredSongs(this.localSongsPool, HOT_SECTION_COUNT)
|
|
|
+ this.hotSongs = this.pickPreferredSongs(this.localSongsPool, LOCAL_RANDOM_SECTION_COUNT)
|
|
|
this.recentSongs = this.recentSongsPool.slice(0, Math.min(RECENT_SECTION_COUNT, this.recentSongsPool.length))
|
|
|
this.popularSongs = this.pickPreferredSongs(this.topPlayedSongsPool, POPULAR_SECTION_COUNT)
|
|
|
this.favoriteSongs = this.favoriteSongsPool.slice(0, Math.min(FAVORITE_SECTION_COUNT, this.favoriteSongsPool.length))
|
|
|
@@ -452,7 +454,7 @@ export struct FindView {
|
|
|
private applyRemoteDiscoverySongs(items: VideoItem[], refreshSections: boolean = false): void {
|
|
|
this.remoteSongsPool = items
|
|
|
this.cloudAlbumsPool = this.buildAlbumGroups(this.remoteSongsPool, true)
|
|
|
- this.cloudMoodSongs = this.pickPreferredSongs(this.remoteSongsPool, HOT_SECTION_COUNT)
|
|
|
+ this.cloudMoodSongs = this.pickPreferredSongs(this.remoteSongsPool, CLOUD_MOOD_SECTION_COUNT)
|
|
|
this.remoteSongs = this.pickPreferredSongs(this.remoteSongsPool, CLOUD_SECTION_COUNT)
|
|
|
this.cloudAlbums = this.pickAlbumGroups(this.cloudAlbumsPool, CLOUD_ALBUM_COUNT)
|
|
|
this.logRemoteDiscoveryCoverState('remoteSongsPool', this.remoteSongsPool)
|
|
|
@@ -1474,11 +1476,12 @@ export struct FindView {
|
|
|
}
|
|
|
|
|
|
private refreshLocalRandomSongs(): void {
|
|
|
- this.hotSongs = this.pickDifferentPreferredSongs(this.localSongsPool, HOT_SECTION_COUNT, this.hotSongs)
|
|
|
+ this.hotSongs = this.pickDifferentPreferredSongs(this.localSongsPool, LOCAL_RANDOM_SECTION_COUNT, this.hotSongs)
|
|
|
}
|
|
|
|
|
|
private refreshCloudMoodSongs(): void {
|
|
|
- this.cloudMoodSongs = this.pickDifferentPreferredSongs(this.remoteSongsPool, HOT_SECTION_COUNT, this.cloudMoodSongs)
|
|
|
+ this.cloudMoodSongs = this.pickDifferentPreferredSongs(this.remoteSongsPool, CLOUD_MOOD_SECTION_COUNT,
|
|
|
+ this.cloudMoodSongs)
|
|
|
}
|
|
|
|
|
|
private refreshCloudSongs(): void {
|