forked from Moriafly/DsoMusic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
407 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
3.7.0 2021年6月12日 | ||
|
||
适配耳机线控 | ||
播放界面调整 | ||
歌词动画优化 | ||
修复我喜欢音乐无法获取 | ||
|
||
3.6.0 2021年6月6日 | ||
播放界面 UI 更新~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
package com.dirror.music | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
app/src/main/java/com/dirror/music/music/netease/data/PlaylistDetail.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
package com.dirror.music.music.netease.data | ||
|
||
import com.dirror.music.music.standard.data.SOURCE_NETEASE | ||
import com.dirror.music.music.standard.data.StandardSongData | ||
|
||
data class PlaylistDetail( | ||
var playlist: Playlist?, | ||
var privileges: ArrayList<Privilege>? | ||
) { | ||
data class Playlist( | ||
var name: String?, | ||
var coverImgUrl: String?, | ||
var creator: Creator?, | ||
var tracks: ArrayList<Track>? | ||
) { | ||
data class Creator( | ||
var nickname: String?, | ||
var avatarUrl: String? | ||
) | ||
|
||
data class Track( | ||
var name: String?, | ||
var id: Long?, | ||
var ar: ArrayList<Artist>, | ||
var al: Album?, | ||
|
||
) { | ||
|
||
data class Artist( | ||
var id: Long?, | ||
var name: String? | ||
) { | ||
fun toCompat(): StandardSongData.StandardArtistData { | ||
return StandardSongData.StandardArtistData( | ||
this.id, | ||
this.name | ||
) | ||
} | ||
} | ||
|
||
/** 专辑 */ | ||
data class Album( | ||
var id: Long?, | ||
var name: String?, | ||
var picUrl: String? | ||
) | ||
|
||
} | ||
} | ||
|
||
data class Privilege( | ||
var fee: Int?, | ||
var id: Long?, | ||
var pl: Int?, | ||
var maxbr: Int?, | ||
var flag: Int? | ||
) | ||
|
||
fun getSongArrayList(): ArrayList<StandardSongData> { | ||
val standardPlaylistData = ArrayList<StandardSongData>() | ||
// 防止遍历空集合 | ||
if (this.playlist?.tracks?.isNotEmpty() == true) { | ||
for ((index, song) in this.playlist?.tracks!!.withIndex()) { | ||
val standardArtistDataList = ArrayList<StandardSongData.StandardArtistData>() | ||
// song.artists | ||
for (i in 0..song.ar.lastIndex) { | ||
val standardArtistData = StandardSongData.StandardArtistData( | ||
song.ar[i].id, | ||
song.ar[i].name | ||
) | ||
standardArtistDataList.add(standardArtistData) | ||
} | ||
|
||
val privileges = this.privileges?.get(index) | ||
|
||
val standardSongData = StandardSongData( | ||
SOURCE_NETEASE, | ||
song.id.toString(), | ||
song.name, | ||
song.al?.picUrl, | ||
standardArtistDataList, | ||
StandardSongData.NeteaseInfo( | ||
privileges?.fee ?: 0, | ||
privileges?.pl, | ||
privileges?.flag, | ||
privileges?.maxbr | ||
), | ||
null, | ||
null | ||
) | ||
standardPlaylistData.add(standardSongData) | ||
} | ||
} | ||
return standardPlaylistData | ||
} | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
app/src/main/java/com/dirror/music/ui/activity/LocalMusicActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.dirror.music.ui.activity | ||
|
||
import com.dirror.music.ui.base.BaseActivity | ||
|
||
class LocalMusicActivity : BaseActivity() { | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.