update
This commit is contained in:
parent
a5f6d1045b
commit
70972c51d8
@ -406,12 +406,18 @@ class MoListDetailsActivity : MoBaseActivity(), DetailsListAdapter.OnItemMoreCli
|
||||
val namesArray = localData.getJSONArray("fixed_songs")
|
||||
for (myContent in mapList) {
|
||||
val videoId = myContent.videoId
|
||||
// 确定是否在名称数组中找到 videoId 的标志
|
||||
var found = false
|
||||
for (i in 0 until namesArray.length()) {
|
||||
if (videoId != (namesArray.getString(i))) {
|
||||
//ID不相等添加这条数据
|
||||
myList.add(myContent)
|
||||
if (videoId == (namesArray.getString(i))) {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
// 如果在namesArray中找不到videoId,则将myContent添加到列表中
|
||||
if (!found) {
|
||||
myList.add(myContent)
|
||||
}
|
||||
}
|
||||
adapter?.notifyDataSetChanged()
|
||||
} else {
|
||||
|
||||
@ -539,12 +539,19 @@ class MoPlayDetailsActivity : MoBaseActivity(), Player.Listener {
|
||||
val namesArray = localData.getJSONArray("fixed_songs")
|
||||
for (myContent in allMediaItems) {
|
||||
val videoId = myContent.mediaId
|
||||
// 确定是否在名称数组中找到 videoId 的标志
|
||||
var found = false
|
||||
for (i in 0 until namesArray.length()) {
|
||||
if (videoId != (namesArray.getString(i))) {
|
||||
if (videoId == (namesArray.getString(i))) {
|
||||
//ID不相等添加这条数据
|
||||
playList.add(myContent)
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
// 如果在namesArray中找不到videoId,则将myContent添加到列表中
|
||||
if (!found) {
|
||||
playList.add(myContent)
|
||||
}
|
||||
}
|
||||
detailsPlayListAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
@ -137,12 +137,18 @@ class MoSearchMoreActivity : MoBaseActivity() {
|
||||
val namesArray = localData.getJSONArray("fixed_songs")
|
||||
for (myContent in myResult.searchResultList) {
|
||||
val videoId = myContent.videoId
|
||||
// 确定是否在名称数组中找到 videoId 的标志
|
||||
var found = false
|
||||
for (i in 0 until namesArray.length()) {
|
||||
if (videoId != (namesArray.getString(i))) {
|
||||
//ID不相等添加这条数据
|
||||
list.add(myContent)
|
||||
if (videoId == (namesArray.getString(i))) {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
// 如果在namesArray中找不到videoId,则将myContent添加到列表中
|
||||
if (!found) {
|
||||
list.add(myContent)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
showNoContentUi()
|
||||
|
||||
@ -43,12 +43,18 @@ class MusicResponsiveListView(context: Context, homePage: Innertube.HomePage) :
|
||||
?.watchEndpoint
|
||||
val videoId = watchEndpoint?.videoId
|
||||
|
||||
// 确定是否在名称数组中找到 videoId 的标志
|
||||
var found = false
|
||||
for (i in 0 until namesArray.length()) {
|
||||
if (videoId != (namesArray.getString(i))) {
|
||||
//ID不相等添加这条数据
|
||||
myContentList.add(myContent)
|
||||
if (videoId == (namesArray.getString(i))) {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
// 如果在namesArray中找不到videoId,则将myContent添加到列表中
|
||||
if (!found) {
|
||||
myContentList.add(myContent)
|
||||
}
|
||||
}
|
||||
|
||||
adapter = ResponsiveListAdapter(context, myContentList)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user