mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-02 00:58:19 +08:00
@@ -6,7 +6,8 @@ enum UaType {
|
||||
),
|
||||
pc(
|
||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15',
|
||||
);
|
||||
)
|
||||
;
|
||||
|
||||
static UaType get platformUA => Utils.isMobile ? mob : pc;
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@ enum AccountType {
|
||||
main('主账号'),
|
||||
heartbeat('记录观看'),
|
||||
recommend('推荐'),
|
||||
video('视频取流');
|
||||
video('视频取流')
|
||||
;
|
||||
|
||||
final String title;
|
||||
const AccountType(this.title);
|
||||
|
||||
@@ -3,7 +3,8 @@ enum AudioNormalization {
|
||||
// ref https://github.com/KRTirtho/spotube/commit/da10ab2e291d4ba4d3082b9a6ae535639fb8f1b7
|
||||
dynaudnorm('预设 dynaudnorm', 'dynaudnorm=g=5:f=250:r=0.9:p=0.5'),
|
||||
loudnorm('预设 loudnorm', 'loudnorm=I=-16:LRA=11:TP=-1.5'),
|
||||
custom('自定义参数');
|
||||
custom('自定义参数')
|
||||
;
|
||||
|
||||
final String title;
|
||||
final String param;
|
||||
|
||||
@@ -4,7 +4,8 @@ enum BadgeType {
|
||||
none(),
|
||||
vip('大会员'),
|
||||
person('认证个人', Color(0xFFFFCC00)),
|
||||
institution('认证机构', Colors.lightBlueAccent);
|
||||
institution('认证机构', Colors.lightBlueAccent)
|
||||
;
|
||||
|
||||
final String? desc;
|
||||
final Color? color;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
enum DmBlockType {
|
||||
keyword('关键词'),
|
||||
regex('正则'),
|
||||
uid('用户');
|
||||
uid('用户')
|
||||
;
|
||||
|
||||
final String label;
|
||||
const DmBlockType(this.label);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
enum DynamicBadgeMode {
|
||||
hidden('隐藏'),
|
||||
point('红点'),
|
||||
number('数字');
|
||||
number('数字')
|
||||
;
|
||||
|
||||
final String desc;
|
||||
const DynamicBadgeMode(this.desc);
|
||||
|
||||
@@ -3,7 +3,8 @@ enum DynamicsTabType {
|
||||
video('投稿'),
|
||||
pgc('番剧'),
|
||||
article('专栏'),
|
||||
up('UP');
|
||||
up('UP')
|
||||
;
|
||||
|
||||
final String label;
|
||||
const DynamicsTabType(this.label);
|
||||
|
||||
@@ -3,7 +3,8 @@ enum UpPanelPosition {
|
||||
leftFixed('左侧常驻'),
|
||||
rightFixed('右侧常驻'),
|
||||
leftDrawer('左侧抽屉'),
|
||||
rightDrawer('右侧抽屉');
|
||||
rightDrawer('右侧抽屉')
|
||||
;
|
||||
|
||||
final String label;
|
||||
const UpPanelPosition(this.label);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
enum EpisodeType {
|
||||
part('分P'),
|
||||
season('合集'),
|
||||
pgc('剧集');
|
||||
pgc('剧集')
|
||||
;
|
||||
|
||||
final String title;
|
||||
const EpisodeType(this.title);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
enum FavOrderType {
|
||||
mtime('最近收藏'),
|
||||
view('最多播放'),
|
||||
pubtime('最近投稿');
|
||||
pubtime('最近投稿')
|
||||
;
|
||||
|
||||
final String label;
|
||||
|
||||
|
||||
@@ -13,7 +13,8 @@ enum FavTabType {
|
||||
article('专栏', FavArticlePage()),
|
||||
note('笔记', FavNotePage()),
|
||||
topic('话题', FavTopicPage()),
|
||||
cheese('课堂', FavCheesePage());
|
||||
cheese('课堂', FavCheesePage())
|
||||
;
|
||||
|
||||
final String title;
|
||||
final Widget page;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
enum FollowOrderType {
|
||||
def('', '最近关注'),
|
||||
attention('attention', '最常访问');
|
||||
attention('attention', '最常访问')
|
||||
;
|
||||
|
||||
final String type;
|
||||
final String title;
|
||||
|
||||
@@ -19,7 +19,8 @@ enum HomeTabType implements EnumWithLabel {
|
||||
hot('热门'),
|
||||
rank('分区'),
|
||||
bangumi('番剧'),
|
||||
cinema('影视');
|
||||
cinema('影视')
|
||||
;
|
||||
|
||||
@override
|
||||
final String label;
|
||||
|
||||
@@ -8,7 +8,8 @@ enum MemberTabType {
|
||||
favorite('收藏'),
|
||||
bangumi('番剧'),
|
||||
cheese('课堂'),
|
||||
shop('小店');
|
||||
shop('小店')
|
||||
;
|
||||
|
||||
static bool showMemberShop = Pref.showMemberShop;
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@ enum MsgUnReadType {
|
||||
reply('回复我的'),
|
||||
at('@我'),
|
||||
like('收到的赞'),
|
||||
sysMsg('系统通知');
|
||||
sysMsg('系统通知')
|
||||
;
|
||||
|
||||
final String title;
|
||||
const MsgUnReadType(this.title);
|
||||
|
||||
@@ -22,7 +22,8 @@ enum NavigationBarType implements EnumWithLabel {
|
||||
Icon(Icons.person_outline, size: 21),
|
||||
Icon(Icons.person, size: 21),
|
||||
MinePage(),
|
||||
);
|
||||
)
|
||||
;
|
||||
|
||||
@override
|
||||
final String label;
|
||||
|
||||
@@ -2,7 +2,8 @@ import 'package:PiliPlus/http/api.dart';
|
||||
|
||||
enum PgcReviewType {
|
||||
long(label: '长评', api: Api.pgcReviewL),
|
||||
short(label: '短评', api: Api.pgcReviewS);
|
||||
short(label: '短评', api: Api.pgcReviewS)
|
||||
;
|
||||
|
||||
final String label;
|
||||
final String api;
|
||||
@@ -14,7 +15,8 @@ enum PgcReviewType {
|
||||
|
||||
enum PgcReviewSortType {
|
||||
def('默认', 0),
|
||||
latest('最新', 1);
|
||||
latest('最新', 1)
|
||||
;
|
||||
|
||||
final int sort;
|
||||
final String label;
|
||||
|
||||
@@ -19,7 +19,8 @@ enum RankType {
|
||||
documentary('记录', seasonType: 3),
|
||||
movie('电影', seasonType: 2),
|
||||
tv('剧集', seasonType: 5),
|
||||
variety('综艺', seasonType: 7);
|
||||
variety('综艺', seasonType: 7)
|
||||
;
|
||||
|
||||
final String label;
|
||||
final int? rid;
|
||||
|
||||
@@ -4,7 +4,8 @@ import 'package:material_design_icons_flutter/material_design_icons_flutter.dart
|
||||
enum ReplyOptionType {
|
||||
allow('允许评论'),
|
||||
close('关闭评论'),
|
||||
choose('精选评论');
|
||||
choose('精选评论')
|
||||
;
|
||||
|
||||
final String title;
|
||||
const ReplyOptionType(this.title);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
enum ReplySortType {
|
||||
time('最新评论', '最新'),
|
||||
hot('最热评论', '最热');
|
||||
hot('最热评论', '最热')
|
||||
;
|
||||
|
||||
final String title;
|
||||
final String label;
|
||||
|
||||
@@ -3,7 +3,8 @@ enum ArticleOrderType {
|
||||
pubdate('最新发布'),
|
||||
click('最多点击'),
|
||||
attention('最多喜欢'),
|
||||
scores('最多评论');
|
||||
scores('最多评论')
|
||||
;
|
||||
|
||||
String get order => name;
|
||||
final String label;
|
||||
@@ -19,7 +20,8 @@ enum ArticleZoneType {
|
||||
interest('兴趣', 29),
|
||||
novel('轻小说', 16),
|
||||
tech('科技', 17),
|
||||
note('笔记', 41);
|
||||
note('笔记', 41)
|
||||
;
|
||||
|
||||
final String label;
|
||||
final int categoryId;
|
||||
|
||||
@@ -18,7 +18,8 @@ enum SearchType {
|
||||
// 用户:bili_user
|
||||
bili_user('用户'),
|
||||
// 专栏:article
|
||||
article('专栏');
|
||||
article('专栏')
|
||||
;
|
||||
// 相簿:photo
|
||||
// photo
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@ enum UserOrderType {
|
||||
fansDesc('粉丝数由高到低', 0, 'fans'),
|
||||
fansAsc('粉丝数由低到高', 1, 'fans'),
|
||||
levelDesc('Lv等级由高到低', 0, 'level'),
|
||||
levelAsc('Lv等级由低到高', 1, 'level');
|
||||
levelAsc('Lv等级由低到高', 1, 'level')
|
||||
;
|
||||
|
||||
final String label;
|
||||
final int orderSort;
|
||||
@@ -15,7 +16,8 @@ enum UserType {
|
||||
all('全部用户'),
|
||||
up('UP主'),
|
||||
common('普通用户'),
|
||||
verified('认证用户');
|
||||
verified('认证用户')
|
||||
;
|
||||
|
||||
final String label;
|
||||
const UserType(this.label);
|
||||
|
||||
@@ -2,7 +2,8 @@ enum VideoPubTimeType {
|
||||
all('不限'),
|
||||
day('最近一天'),
|
||||
week('最近一周'),
|
||||
halfYear('最近半年');
|
||||
halfYear('最近半年')
|
||||
;
|
||||
|
||||
final String label;
|
||||
const VideoPubTimeType(this.label);
|
||||
@@ -13,7 +14,8 @@ enum VideoDurationType {
|
||||
tenMins('0-10分钟'),
|
||||
halfHour('10-30分钟'),
|
||||
hour('30-60分钟'),
|
||||
hourPlus('60分钟+');
|
||||
hourPlus('60分钟+')
|
||||
;
|
||||
|
||||
final String label;
|
||||
const VideoDurationType(this.label);
|
||||
@@ -41,7 +43,8 @@ enum VideoZoneType {
|
||||
cinephile('影视', tids: 181),
|
||||
documentary('记录', tids: 177),
|
||||
movie('电影', tids: 23),
|
||||
tv('电视', tids: 11);
|
||||
tv('电视', tids: 11)
|
||||
;
|
||||
|
||||
final String label;
|
||||
final int? tids;
|
||||
@@ -55,7 +58,8 @@ enum ArchiveFilterType {
|
||||
pubdate('新发布'),
|
||||
dm('弹幕多'),
|
||||
stow('收藏多'),
|
||||
scores('评论多');
|
||||
scores('评论多')
|
||||
;
|
||||
// 专栏
|
||||
// attention('最多喜欢'),
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@ enum SettingType {
|
||||
styleSetting('外观设置'),
|
||||
extraSetting('其它设置'),
|
||||
webdavSetting('WebDAV 设置'),
|
||||
about('关于');
|
||||
about('关于')
|
||||
;
|
||||
|
||||
final String title;
|
||||
const SettingType(this.title);
|
||||
|
||||
@@ -2,7 +2,8 @@ enum ActionType {
|
||||
skip('跳过'),
|
||||
mute('静音'),
|
||||
full('整个视频'),
|
||||
poi('精彩时刻');
|
||||
poi('精彩时刻')
|
||||
;
|
||||
|
||||
final String title;
|
||||
const ActionType(this.title);
|
||||
|
||||
@@ -97,7 +97,8 @@ enum SegmentType {
|
||||
'仅用于对整个视频进行标记。适用于展示UP主免费或获得补贴后使用的产品、服务或场地的视频。',
|
||||
Color(0xFF008a5c),
|
||||
[ActionType.full],
|
||||
);
|
||||
)
|
||||
;
|
||||
|
||||
/// from https://github.com/hanydd/BilibiliSponsorBlock/blob/master/public/_locales/zh_CN/messages.json
|
||||
final String title;
|
||||
|
||||
@@ -3,7 +3,8 @@ enum SkipType {
|
||||
skipOnce('跳过一次'),
|
||||
skipManually('手动跳过'),
|
||||
showOnly('仅显示'),
|
||||
disable('禁用');
|
||||
disable('禁用')
|
||||
;
|
||||
|
||||
final String title;
|
||||
const SkipType(this.title);
|
||||
|
||||
@@ -7,7 +7,8 @@ enum StatType {
|
||||
reply(Icons.comment_outlined, '评论'),
|
||||
follow(Icons.favorite_border, '关注'),
|
||||
play(Icons.play_circle_outlined, '播放'),
|
||||
listen(Icons.headset_outlined, '播放');
|
||||
listen(Icons.headset_outlined, '播放')
|
||||
;
|
||||
|
||||
final IconData iconData;
|
||||
final String label;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
enum SuperResolutionType {
|
||||
disable('禁用'),
|
||||
efficiency('效率'),
|
||||
quality('画质');
|
||||
quality('画质')
|
||||
;
|
||||
|
||||
final String title;
|
||||
const SuperResolutionType(this.title);
|
||||
|
||||
@@ -4,7 +4,8 @@ import 'package:material_design_icons_flutter/material_design_icons_flutter.dart
|
||||
enum ThemeType {
|
||||
light('浅色'),
|
||||
dark('深色'),
|
||||
system('跟随系统');
|
||||
system('跟随系统')
|
||||
;
|
||||
|
||||
final String desc;
|
||||
const ThemeType(this.desc);
|
||||
|
||||
@@ -6,7 +6,8 @@ enum AudioQuality {
|
||||
dolby(30250, '杜比全景声'),
|
||||
k192(30280, '192K'),
|
||||
k132(30232, '132K'),
|
||||
k64(30216, '64K');
|
||||
k64(30216, '64K')
|
||||
;
|
||||
|
||||
final int code;
|
||||
final String desc;
|
||||
|
||||
@@ -24,7 +24,8 @@ enum CDNService {
|
||||
aliov('aliov(阿里云海外)', 'upos-sz-mirroraliov.bilivideo.com'),
|
||||
cosov('cosov(腾讯云海外)', 'upos-sz-mirrorcosov.bilivideo.com'),
|
||||
hwov('hwov(华为云海外)', 'upos-sz-mirrorhwov.bilivideo.com'),
|
||||
hk_bcache('hk_bcache(Bilibili海外)', 'cn-hk-eq-bcache-01.bilivideo.com');
|
||||
hk_bcache('hk_bcache(Bilibili海外)', 'cn-hk-eq-bcache-01.bilivideo.com')
|
||||
;
|
||||
|
||||
String get code => name;
|
||||
static final fromCode = values.byName;
|
||||
|
||||
@@ -6,7 +6,8 @@ enum LiveQuality {
|
||||
bluRay(400, '蓝光'),
|
||||
superHD(250, '超清'),
|
||||
smooth(150, '高清'),
|
||||
flunt(80, '流畅');
|
||||
flunt(80, '流畅')
|
||||
;
|
||||
|
||||
final int code;
|
||||
final String desc;
|
||||
|
||||
@@ -26,7 +26,8 @@ enum SourceType {
|
||||
extraId: 4,
|
||||
playlistSource: PlaylistSource.MEDIA_LIST,
|
||||
),
|
||||
file;
|
||||
file
|
||||
;
|
||||
|
||||
final int? mediaType;
|
||||
final int? extraId;
|
||||
|
||||
@@ -2,7 +2,8 @@ enum SubtitlePrefType {
|
||||
off('默认不显示字幕'),
|
||||
on('优先选择非自动生成(ai)字幕'),
|
||||
withoutAi('跳过自动生成(ai)字幕,选择第一个可用字幕'),
|
||||
auto('静音时等同第二项,非静音时等同第三项');
|
||||
auto('静音时等同第二项,非静音时等同第三项')
|
||||
;
|
||||
|
||||
final String desc;
|
||||
const SubtitlePrefType(this.desc);
|
||||
|
||||
@@ -4,7 +4,8 @@ enum VideoDecodeFormatType {
|
||||
DVH1(['dvh1']),
|
||||
AV1(['av01']),
|
||||
HEVC(['hev1', 'hvc1']),
|
||||
AVC(['avc1']);
|
||||
AVC(['avc1'])
|
||||
;
|
||||
|
||||
String get description => name;
|
||||
final List<String> codes;
|
||||
|
||||
@@ -11,7 +11,8 @@ enum VideoQuality {
|
||||
high720(64, '720P 准高清', '720P'),
|
||||
clear480(32, '480P 标清', '480P'),
|
||||
fluent360(16, '360P 流畅', '360P'),
|
||||
speed240(6, '240P 极速', '240P');
|
||||
speed240(6, '240P 极速', '240P')
|
||||
;
|
||||
|
||||
final int code;
|
||||
final String desc;
|
||||
|
||||
@@ -13,7 +13,8 @@ enum VideoType {
|
||||
type: 10,
|
||||
replyType: 33,
|
||||
api: Api.pugvUrl,
|
||||
);
|
||||
)
|
||||
;
|
||||
|
||||
final int type;
|
||||
final String api;
|
||||
|
||||
@@ -4,7 +4,8 @@ enum WebviewMenuItem {
|
||||
openInBrowser('浏览器中打开'),
|
||||
clearCache('清除缓存'),
|
||||
resetCookie('重新设置Cookie'),
|
||||
goBack('返回');
|
||||
goBack('返回')
|
||||
;
|
||||
|
||||
final String title;
|
||||
const WebviewMenuItem(this.title);
|
||||
|
||||
@@ -465,7 +465,8 @@ enum DownloadStatus {
|
||||
failDanmaku('获取弹幕失败'),
|
||||
failPlayUrl('获取播放地址失败'),
|
||||
pause('暂停中'),
|
||||
wait('等待中');
|
||||
wait('等待中')
|
||||
;
|
||||
|
||||
final String message;
|
||||
const DownloadStatus(this.message);
|
||||
|
||||
@@ -52,8 +52,8 @@ class ActionRowLineItem extends StatelessWidget {
|
||||
? theme.colorScheme.onSecondaryContainer
|
||||
: theme.colorScheme.outline,
|
||||
)
|
||||
else if (icon != null)
|
||||
icon!,
|
||||
else
|
||||
?icon,
|
||||
AnimatedOpacity(
|
||||
opacity: isLoading ? 0 : 1,
|
||||
duration: const Duration(milliseconds: 200),
|
||||
|
||||
@@ -2,7 +2,8 @@ enum BtmProgressBehavior {
|
||||
alwaysShow('始终展示'),
|
||||
alwaysHide('始终隐藏'),
|
||||
onlyShowFullScreen('仅全屏时展示'),
|
||||
onlyHideFullScreen('仅全屏时隐藏');
|
||||
onlyHideFullScreen('仅全屏时隐藏')
|
||||
;
|
||||
|
||||
final String desc;
|
||||
const BtmProgressBehavior(this.desc);
|
||||
|
||||
@@ -13,7 +13,8 @@ enum FullScreenMode {
|
||||
// 屏幕长宽比 < kScreenRatio 或为竖屏视频时竖屏,否则横屏
|
||||
ratio('屏幕长宽比<$kScreenRatio或为竖屏视频时竖屏,否则横屏'),
|
||||
// 强制重力转屏(仅安卓)
|
||||
gravity('忽略系统方向锁定,强制按重力转屏(仅安卓)');
|
||||
gravity('忽略系统方向锁定,强制按重力转屏(仅安卓)')
|
||||
;
|
||||
|
||||
final String desc;
|
||||
const FullScreenMode(this.desc);
|
||||
|
||||
@@ -31,7 +31,8 @@ enum HwDecType {
|
||||
amf('amf', 'AMF (AMD独占)'),
|
||||
amfCopy('amf-copy', 'AMF (AMD独占) (非直通)'),
|
||||
qsv('qsv', 'Quick Sync Video (Intel独占)'),
|
||||
qsvCopy('qsv-copy', 'Quick Sync Video (Intel独占) (非直通)');
|
||||
qsvCopy('qsv-copy', 'Quick Sync Video (Intel独占) (非直通)')
|
||||
;
|
||||
|
||||
final String hwdec;
|
||||
final String desc;
|
||||
|
||||
@@ -3,7 +3,8 @@ enum PlayRepeat {
|
||||
listOrder('顺序播放'),
|
||||
singleCycle('单个循环'),
|
||||
listCycle('列表循环'),
|
||||
autoPlayRelated('自动连播');
|
||||
autoPlayRelated('自动连播')
|
||||
;
|
||||
|
||||
final String desc;
|
||||
const PlayRepeat(this.desc);
|
||||
|
||||
@@ -8,7 +8,8 @@ enum PlaySpeed {
|
||||
onePointSevenFive(1.75),
|
||||
|
||||
two(2.0),
|
||||
three(3.0);
|
||||
three(3.0)
|
||||
;
|
||||
|
||||
final double value;
|
||||
const PlaySpeed(this.value);
|
||||
|
||||
@@ -9,7 +9,8 @@ enum VideoFitType {
|
||||
none('原始', boxFit: BoxFit.none),
|
||||
scaleDown('限制', boxFit: BoxFit.scaleDown),
|
||||
ratio_4x3('4:3', aspectRatio: 4 / 3),
|
||||
ratio_16x9('16:9', aspectRatio: 16 / 9);
|
||||
ratio_16x9('16:9', aspectRatio: 16 / 9)
|
||||
;
|
||||
|
||||
final String desc;
|
||||
final BoxFit boxFit;
|
||||
|
||||
@@ -150,7 +150,8 @@ enum WebpPreset {
|
||||
photo('photo', '照片', '户外摄影,自然光环境'),
|
||||
drawing('drawing', '绘图', '手绘或线稿,高对比度细节'),
|
||||
icon('icon', '图标', '小型彩色图像'),
|
||||
text('text', '文本', '文字类');
|
||||
text('text', '文本', '文字类')
|
||||
;
|
||||
|
||||
final String flag;
|
||||
final String name;
|
||||
|
||||
Reference in New Issue
Block a user