mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-29 20:48:40 +00:00
feat: video download
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -25,14 +25,15 @@ enum SourceType {
|
||||
mediaType: 3,
|
||||
extraId: 4,
|
||||
playlistSource: PlaylistSource.MEDIA_LIST,
|
||||
);
|
||||
),
|
||||
file;
|
||||
|
||||
final int mediaType;
|
||||
final int? mediaType;
|
||||
final int? extraId;
|
||||
final PlaylistSource playlistSource;
|
||||
final PlaylistSource? playlistSource;
|
||||
const SourceType({
|
||||
required this.mediaType,
|
||||
this.mediaType,
|
||||
this.extraId,
|
||||
required this.playlistSource,
|
||||
this.playlistSource,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
enum VideoQuality {
|
||||
hdrVivid(129, 'HDR Vivid', 'HDR Vivid'),
|
||||
super8k(127, '8K 超高清', '8K'),
|
||||
dolbyVision(126, '杜比视界', '杜比'),
|
||||
hdr(125, 'HDR 真彩色', 'HDR'),
|
||||
super4K(120, '4K 超清', '4K'),
|
||||
high108060(116, '1080P60 高帧率', '1080P60'),
|
||||
high1080plus(112, '1080P+ 高码率', '1080P+'),
|
||||
hdr(125, 'HDR 真彩', 'HDR'),
|
||||
super4K(120, '4K 超高清', '4K'),
|
||||
high108060(116, '1080P 60帧', '1080P60'),
|
||||
high1080plus(112, '1080P 高码率', '1080P+'),
|
||||
high1080(80, '1080P 高清', '1080P'),
|
||||
high72060(74, '720P60 高帧率', '720P60'),
|
||||
high720(64, '720P 高清', '720P'),
|
||||
clear480(32, '480P 清晰', '480P'),
|
||||
high72060(74, '720P 60帧', '720P60'),
|
||||
high720(64, '720P 准高清', '720P'),
|
||||
clear480(32, '480P 标清', '480P'),
|
||||
fluent360(16, '360P 流畅', '360P'),
|
||||
speed240(6, '240P 极速', '240P');
|
||||
|
||||
|
||||
@@ -25,4 +25,10 @@ class Owner implements BaseOwner {
|
||||
name = json["name"];
|
||||
face = json['face'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'mid': mid,
|
||||
'name': name,
|
||||
'face': face,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -199,9 +199,7 @@ class Durl {
|
||||
ahead: json['ahead'],
|
||||
vhead: json['vhead'],
|
||||
url: json['url'],
|
||||
backupUrl: json['backup_url'] != null
|
||||
? List<String>.from(json['backup_url'])
|
||||
: [],
|
||||
backupUrl: (json['backup_url'] as List?)?.fromCast<String>(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -248,11 +246,9 @@ abstract class BaseItem {
|
||||
BaseItem.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
baseUrl = json['baseUrl'] ?? json['base_url'];
|
||||
final backupUrls =
|
||||
((json['backupUrl'] ?? json['backup_url']) as List?)
|
||||
?.fromCast<String>() ??
|
||||
<String>[];
|
||||
backupUrl = backupUrls.isNotEmpty
|
||||
final backupUrls = ((json['backupUrl'] ?? json['backup_url']) as List?)
|
||||
?.fromCast<String>();
|
||||
backupUrl = backupUrls != null && backupUrls.isNotEmpty
|
||||
? backupUrls.firstWhere(
|
||||
(i) => !_isMCDNorPCDN(i),
|
||||
orElse: () => backupUrls.first,
|
||||
|
||||
Reference in New Issue
Block a user