巴西地区 推荐列表 默认值

This commit is contained in:
renhaoting 2025-11-18 17:45:12 +08:00
parent 162ad5288a
commit 5ce3547a71
2 changed files with 21 additions and 2 deletions

View File

@ -19,6 +19,7 @@ interface YoutubeApi {
@Query("part") part: String="snippet", @Query("part") part: String="snippet",
@Query("key") key: String="AIzaSyBm9k2lS_j7Fdd43NEPkcfikJRotup5DMY", @Query("key") key: String="AIzaSyBm9k2lS_j7Fdd43NEPkcfikJRotup5DMY",
@Query("channelId") channelId: String="UCbTLwN10NoCU4WDzLf1JMOA", @Query("channelId") channelId: String="UCbTLwN10NoCU4WDzLf1JMOA",
@Query("videoEmbeddable") videoEmbeddable: Boolean=true,
): ResYoutubeChannel ): ResYoutubeChannel
@ -34,15 +35,32 @@ interface YoutubeApi {
@GET("/youtube/v3/playlistItems") @GET("/youtube/v3/playlistItems")
suspend fun getVideoList( suspend fun getVideoList1(
@Query("part") part: String= URLEncoder.encode("id", "UTF-8"), @Query("part") part: String= URLEncoder.encode("id", "UTF-8"),
@Query("key") key: String="AIzaSyBm9k2lS_j7Fdd43NEPkcfikJRotup5DMY", @Query("key") key: String="AIzaSyBm9k2lS_j7Fdd43NEPkcfikJRotup5DMY",
@Query("playlistId") channelId: String="PLcVfz1-_0rj_KFKlQeW2ZJnWTSjgc-9Jp", @Query("playlistId") channelId: String="PLcVfz1-_0rj_KFKlQeW2ZJnWTSjgc-9Jp",
@Query("videoEmbeddable") videoEmbeddable: Boolean=true,
//@Query("pageToken") pageToken: String=""
): ResYoutubePlayList
@GET("/youtube/v3/videos")
suspend fun getVideoList(
@Query("part") part: String= URLEncoder.encode("id", "UTF-8"),
@Query("key") key: String="AIzaSyBm9k2lS_j7Fdd43NEPkcfikJRotup5DMY",
@Query("chart") chart: String="mostPopular",
@Query("regionCode") regionCode: String="BR",
@Query("maxResults") maxResults: Int=10,
@Query("videoEmbeddable") videoEmbeddable: Boolean=true,
//@Query("pageToken") pageToken: String="" //@Query("pageToken") pageToken: String=""
): ResYoutubePlayList ): ResYoutubePlayList
/*
https://www.googleapis.com/youtube/v3/videos?part=id&chart=mostPopular&regionCode=BR&maxResults=10&key=AIzaSyBm9k2lS_j7Fdd43NEPkcfikJRotup5DMY
https://www.googleapis.com/youtube/v3/videos?part=snippet,statistics&chart=mostPopular&regionCode=BR&maxResults=10&key=AIzaSyBm9k2lS_j7Fdd43NEPkcfikJRotup5DMY
*/
} }

View File

@ -182,7 +182,8 @@ class HomeItemFragment : AppViewsEmptyViewModelFragment<ViewBinding>() {
if (mVideoData != null && !mVideoData?.id.isNullOrEmpty()) { if (mVideoData != null && !mVideoData?.id.isNullOrEmpty()) {
youTubePlayer.loadOrCueVideo( youTubePlayer.loadOrCueVideo(
lifecycle, lifecycle,
mVideoData!!.id, 0f mVideoData!!.id,
0f
) )
} }
} }