mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-26 02:58:39 +00:00
committed by
GitHub
parent
84f7f14a29
commit
08a33d9ce5
272
lib/models_new/music/bgm_detail.dart
Normal file
272
lib/models_new/music/bgm_detail.dart
Normal file
@@ -0,0 +1,272 @@
|
||||
import 'package:PiliPlus/models/model_owner.dart';
|
||||
import 'package:PiliPlus/utils/extension.dart';
|
||||
|
||||
class MusicDetail {
|
||||
MusicDetail({
|
||||
required this.musicTitle,
|
||||
required this.originArtist,
|
||||
required this.originArtistList,
|
||||
required this.mvAid,
|
||||
required this.mvCid,
|
||||
required this.mvBvid,
|
||||
required this.mvIndexOrder,
|
||||
required this.mvFav,
|
||||
required this.mvLikes,
|
||||
required this.mvShares,
|
||||
required this.mvCover,
|
||||
required this.bgColor,
|
||||
required this.mvLyric,
|
||||
required this.supportListen,
|
||||
required this.wishListen,
|
||||
required this.wishCount,
|
||||
required this.musicShares,
|
||||
required this.musicSource,
|
||||
required this.album,
|
||||
required this.artists,
|
||||
required this.artistsList,
|
||||
required this.listenPv,
|
||||
required this.achievement,
|
||||
required this.musicRank,
|
||||
required this.maxListId,
|
||||
required this.showChosen,
|
||||
required this.hotSongHeat,
|
||||
required this.hotSongRank,
|
||||
required this.creationRank,
|
||||
required this.musicOutUrl,
|
||||
// required this.abTest,
|
||||
required this.musicComment,
|
||||
// required this.musicMaterial,
|
||||
required this.isNextgenActivity,
|
||||
required this.isOriginal,
|
||||
required this.musicHot,
|
||||
required this.musicRelation,
|
||||
required this.musicPublish,
|
||||
// required this.musicAchievementTimeline,
|
||||
required this.flowAttr,
|
||||
});
|
||||
|
||||
final String? musicTitle;
|
||||
final String? originArtist;
|
||||
final String? originArtistList;
|
||||
final int? mvAid;
|
||||
final int? mvCid;
|
||||
final String? mvBvid;
|
||||
final int? mvIndexOrder;
|
||||
final int? mvFav;
|
||||
final int? mvLikes;
|
||||
final int? mvShares;
|
||||
final String? mvCover;
|
||||
final String? bgColor;
|
||||
final String? mvLyric;
|
||||
final bool? supportListen;
|
||||
bool? wishListen;
|
||||
int? wishCount;
|
||||
final int? musicShares;
|
||||
final String? musicSource;
|
||||
final String? album;
|
||||
final List<Artist>? artists;
|
||||
final List<Artist>? artistsList;
|
||||
final int? listenPv;
|
||||
final List<String>? achievement;
|
||||
final String? musicRank;
|
||||
final int? maxListId;
|
||||
final bool? showChosen;
|
||||
final HotSongHeat? hotSongHeat;
|
||||
final Rank? hotSongRank;
|
||||
final Rank? creationRank;
|
||||
final String? musicOutUrl;
|
||||
// final dynamic abTest;
|
||||
final MusicComment? musicComment;
|
||||
// final dynamic musicMaterial;
|
||||
final int? isNextgenActivity;
|
||||
final int? isOriginal;
|
||||
final int? musicHot;
|
||||
final int? musicRelation;
|
||||
final String? musicPublish;
|
||||
// final List<dynamic>? musicAchievementTimeline;
|
||||
final FlowAttr? flowAttr;
|
||||
|
||||
factory MusicDetail.fromJson(Map<String, dynamic> json) {
|
||||
return MusicDetail(
|
||||
musicTitle: json["music_title"],
|
||||
originArtist: json["origin_artist"],
|
||||
originArtistList: json["origin_artist_list"],
|
||||
mvAid: json["mv_aid"],
|
||||
mvCid: json["mv_cid"],
|
||||
mvBvid: json["mv_bvid"],
|
||||
mvIndexOrder: json["mv_index_order"],
|
||||
mvFav: json["mv_fav"],
|
||||
mvLikes: json["mv_likes"],
|
||||
mvShares: json["mv_shares"],
|
||||
mvCover: json["mv_cover"],
|
||||
bgColor: json["bg_color"],
|
||||
mvLyric: json["mv_lyric"],
|
||||
supportListen: json["support_listen"],
|
||||
wishListen: json["wish_listen"],
|
||||
wishCount: json["wish_count"],
|
||||
musicShares: json["music_shares"],
|
||||
musicSource: json["music_source"],
|
||||
album: json["album"],
|
||||
artists: (json["artists"] as List?)
|
||||
?.map((x) => Artist.fromJson(x))
|
||||
.toList(),
|
||||
artistsList: (json["artists_list"] as List?)
|
||||
?.map((x) => Artist.fromJson(x))
|
||||
.toList(),
|
||||
listenPv: json["listen_pv"],
|
||||
achievement: (json["achievement"] as List?)?.fromCast(),
|
||||
musicRank: json["music_rank"],
|
||||
maxListId: json["max_list_id"],
|
||||
showChosen: json["show_chosen"],
|
||||
hotSongHeat: json["hot_song_heat"] == null
|
||||
? null
|
||||
: HotSongHeat.fromJson(json["hot_song_heat"]),
|
||||
hotSongRank: json["hot_song_rank"] == null
|
||||
? null
|
||||
: Rank.fromJson(json["hot_song_rank"]),
|
||||
creationRank: json["creation_rank"] == null
|
||||
? null
|
||||
: Rank.fromJson(json["creation_rank"]),
|
||||
musicOutUrl: json["music_out_url"],
|
||||
musicComment: json["music_comment"] == null
|
||||
? null
|
||||
: MusicComment.fromJson(json["music_comment"]),
|
||||
isNextgenActivity: json["is_nextgen_activity"],
|
||||
isOriginal: json["is_original"],
|
||||
musicHot: json["music_hot"],
|
||||
musicRelation: json["music_relation"],
|
||||
musicPublish: json["music_publish"],
|
||||
flowAttr: json["flow_attr"] == null
|
||||
? null
|
||||
: FlowAttr.fromJson(json["flow_attr"]),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class Artist extends Owner {
|
||||
String? identity;
|
||||
int? identifyType;
|
||||
|
||||
Artist.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
|
||||
identity = json["identity"];
|
||||
identifyType = json["identify_type"];
|
||||
}
|
||||
}
|
||||
|
||||
class Rank {
|
||||
Rank({
|
||||
required this.lastUpdate,
|
||||
required this.highestRank,
|
||||
required this.onListTimes,
|
||||
required this.listDetail,
|
||||
});
|
||||
|
||||
final int? lastUpdate;
|
||||
final int? highestRank;
|
||||
final int? onListTimes;
|
||||
final List<ListDetail>? listDetail;
|
||||
|
||||
factory Rank.fromJson(Map<String, dynamic> json) {
|
||||
return Rank(
|
||||
lastUpdate: json["last_update"],
|
||||
highestRank: json["highest_rank"],
|
||||
onListTimes: json["on_list_times"],
|
||||
listDetail: (json["list_detail"] as List?)
|
||||
?.map((x) => ListDetail.fromJson(x))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ListDetail {
|
||||
ListDetail({
|
||||
required this.date,
|
||||
required this.rank,
|
||||
});
|
||||
|
||||
final int? date;
|
||||
final int? rank;
|
||||
|
||||
factory ListDetail.fromJson(Map<String, dynamic> json) {
|
||||
return ListDetail(
|
||||
date: json["date"],
|
||||
rank: json["rank"],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class FlowAttr {
|
||||
FlowAttr({
|
||||
required this.noShare,
|
||||
required this.noComment,
|
||||
});
|
||||
|
||||
final bool? noShare;
|
||||
final bool? noComment;
|
||||
|
||||
factory FlowAttr.fromJson(Map<String, dynamic> json) {
|
||||
return FlowAttr(
|
||||
noShare: json["no_share"],
|
||||
noComment: json["no_comment"],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class HotSongHeat {
|
||||
HotSongHeat({
|
||||
required this.lastHeat,
|
||||
required this.songHeat,
|
||||
});
|
||||
|
||||
final int? lastHeat;
|
||||
final List<SongHeat>? songHeat;
|
||||
|
||||
factory HotSongHeat.fromJson(Map<String, dynamic> json) {
|
||||
return HotSongHeat(
|
||||
lastHeat: json["last_heat"],
|
||||
songHeat: (json["song_heat"] as List?)?.reversed
|
||||
.map((x) => SongHeat.fromJson(x))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class SongHeat {
|
||||
SongHeat({
|
||||
required this.date,
|
||||
required this.heat,
|
||||
});
|
||||
|
||||
final int date;
|
||||
final int heat;
|
||||
|
||||
factory SongHeat.fromJson(Map<String, dynamic> json) {
|
||||
return SongHeat(
|
||||
date: json["date"],
|
||||
heat: json["heat"],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MusicComment {
|
||||
MusicComment({
|
||||
required this.state,
|
||||
required this.nums,
|
||||
required this.oid,
|
||||
required this.pageType,
|
||||
});
|
||||
|
||||
final int? state;
|
||||
final int? nums;
|
||||
final int? oid;
|
||||
final int? pageType;
|
||||
|
||||
factory MusicComment.fromJson(Map<String, dynamic> json) {
|
||||
return MusicComment(
|
||||
state: json["state"],
|
||||
nums: json["nums"],
|
||||
oid: json["oid"],
|
||||
pageType: json["page_type"],
|
||||
);
|
||||
}
|
||||
}
|
||||
126
lib/models_new/music/bgm_recommend_list.dart
Normal file
126
lib/models_new/music/bgm_recommend_list.dart
Normal file
@@ -0,0 +1,126 @@
|
||||
class BgmRecommend {
|
||||
BgmRecommend({
|
||||
required this.aid,
|
||||
required this.bvid,
|
||||
required this.indexOrder,
|
||||
required this.cid,
|
||||
required this.cover,
|
||||
required this.title,
|
||||
required this.mid,
|
||||
required this.upNickName,
|
||||
required this.play,
|
||||
required this.vt,
|
||||
required this.isVt,
|
||||
required this.danmu,
|
||||
required this.duration,
|
||||
required this.label,
|
||||
required this.labelList,
|
||||
required this.isTop,
|
||||
required this.showType,
|
||||
required this.clickType,
|
||||
required this.jumpUrl,
|
||||
required this.vtDisplay,
|
||||
required this.aidSource,
|
||||
required this.tid,
|
||||
required this.subTid,
|
||||
required this.subTagName,
|
||||
required this.coverMark,
|
||||
// required this.districtLabel,
|
||||
});
|
||||
|
||||
final int? aid;
|
||||
final String? bvid;
|
||||
final int? indexOrder;
|
||||
final int? cid;
|
||||
final String? cover;
|
||||
final String? title;
|
||||
final int? mid;
|
||||
final String? upNickName;
|
||||
final int? play;
|
||||
final int? vt;
|
||||
final int? isVt;
|
||||
final int? danmu;
|
||||
final int? duration;
|
||||
final String? label;
|
||||
final List<LabelList>? labelList;
|
||||
final bool? isTop;
|
||||
final int? showType;
|
||||
final int? clickType;
|
||||
final String? jumpUrl;
|
||||
final String? vtDisplay;
|
||||
final int? aidSource;
|
||||
final int? tid;
|
||||
final int? subTid;
|
||||
final String? subTagName;
|
||||
final CoverMark? coverMark;
|
||||
// final dynamic districtLabel;
|
||||
|
||||
factory BgmRecommend.fromJson(Map<String, dynamic> json) {
|
||||
return BgmRecommend(
|
||||
aid: json["aid"],
|
||||
bvid: json["bvid"],
|
||||
indexOrder: json["index_order"],
|
||||
cid: json["cid"],
|
||||
cover: json["cover"],
|
||||
title: json["title"],
|
||||
mid: json["mid"],
|
||||
upNickName: json["up_nick_name"],
|
||||
play: json["play"],
|
||||
vt: json["vt"],
|
||||
isVt: json["is_vt"],
|
||||
danmu: json["danmu"],
|
||||
duration: json["duration"],
|
||||
label: json["label"],
|
||||
labelList: (json["label_list"] as List?)
|
||||
?.map((x) => LabelList.fromJson(x))
|
||||
.toList(),
|
||||
isTop: json["is_top"],
|
||||
showType: json["show_type"],
|
||||
clickType: json["click_type"],
|
||||
jumpUrl: json["jump_url"],
|
||||
vtDisplay: json["vt_display"],
|
||||
aidSource: json["aid_source"],
|
||||
tid: json["tid"],
|
||||
subTid: json["sub_tid"],
|
||||
subTagName: json["sub_tag_name"],
|
||||
coverMark: json["cover_mark"] == null
|
||||
? null
|
||||
: CoverMark.fromJson(json["cover_mark"]),
|
||||
// districtLabel: json["district_label"],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CoverMark {
|
||||
CoverMark({
|
||||
required this.name,
|
||||
required this.value,
|
||||
});
|
||||
|
||||
final String? name;
|
||||
final String? value;
|
||||
|
||||
factory CoverMark.fromJson(Map<String, dynamic> json) {
|
||||
return CoverMark(
|
||||
name: json["name"],
|
||||
value: json["value"],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class LabelList {
|
||||
LabelList({
|
||||
required this.name,
|
||||
required this.value,
|
||||
});
|
||||
|
||||
final String? name;
|
||||
final int? value;
|
||||
|
||||
factory LabelList.fromJson(Map<String, dynamic> json) {
|
||||
return LabelList(
|
||||
name: json["name"],
|
||||
value: json["value"],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,14 @@
|
||||
class VideoTagItem {
|
||||
int? tagId;
|
||||
String? tagName;
|
||||
String? tagType;
|
||||
String? musicId;
|
||||
String? jumpUrl;
|
||||
|
||||
VideoTagItem({
|
||||
this.tagId,
|
||||
this.tagName,
|
||||
this.tagType,
|
||||
this.musicId,
|
||||
this.jumpUrl,
|
||||
});
|
||||
@@ -14,6 +16,7 @@ class VideoTagItem {
|
||||
factory VideoTagItem.fromJson(Map<String, dynamic> json) => VideoTagItem(
|
||||
tagId: json["tag_id"],
|
||||
tagName: json["tag_name"],
|
||||
tagType: json["tag_type"],
|
||||
musicId: json["music_id"],
|
||||
jumpUrl: json["jump_url"],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user