Compare commits

..

1136 Commits

Author SHA1 Message Date
33b012de4c mod: v1.0.26 更新日志 2024-12-14 22:43:06 +08:00
cd23257076 Merge branch 'fix' 2024-12-14 21:52:36 +08:00
58b679ee6b mod: moveDistance calc 2024-12-14 21:50:52 +08:00
b1dfb64196 Merge branch 'fix' 2024-12-14 20:25:01 +08:00
38387c96fd Merge branch 'design' 2024-12-14 20:24:55 +08:00
f593185760 fix: dynamic loop push 2024-12-14 20:09:48 +08:00
a9206074e9 opt: search TextField suffix 2024-12-14 19:24:57 +08:00
778a8e290a Merge branch 'fix' 2024-12-14 18:35:09 +08:00
797d001e3b Merge branch 'design' 2024-12-14 18:35:03 +08:00
1481888e5b Merge branch 'opt-memberSearch' 2024-12-14 18:33:28 +08:00
a21b87ab5a feat: member search dynamic 2024-12-14 18:32:20 +08:00
a8677e094a mod: whisper senderUid 2024-12-13 22:45:30 +08:00
f8c9688833 Merge branch 'main' into fix 2024-12-13 22:16:55 +08:00
088cb08d99 Merge branch 'design' 2024-12-11 23:54:20 +08:00
9a20f246d3 mod 2024-12-11 23:08:04 +08:00
470e70be2b mod: like message type 2024-12-11 14:10:58 +08:00
a99e64f475 Merge branch 'design' 2024-12-10 23:33:08 +08:00
ca17d74eee mod: rcmd snapshot.data null 2024-12-10 22:49:16 +08:00
c9ebd9e352 Merge branch 'opt-followUp' 2024-12-10 22:30:15 +08:00
fc861715dc Merge branch 'fix' 2024-12-10 22:29:45 +08:00
26c5d01e07 mod: mid 2024-12-10 22:29:26 +08:00
defa27b4b8 Merge branch 'main' into opt-followUp 2024-12-10 22:23:45 +08:00
55dbd9d5e5 fix: system notify null error 2024-12-10 20:10:53 +08:00
8ffc74db7a Merge branch 'main' into fix 2024-12-10 19:35:53 +08:00
43446b395f Merge branch 'design' 2024-12-09 23:39:06 +08:00
43bc545363 opt: live follow 2024-12-09 23:38:39 +08:00
bded48afa0 Merge branch 'opt-videoPlayerControl' 2024-12-09 22:55:00 +08:00
a86a578844 Merge branch 'fix' 2024-12-09 22:54:51 +08:00
a77b7233c9 Merge branch 'design' 2024-12-09 22:54:45 +08:00
51e963c52c opt: player fullScreenCb 2024-12-09 22:54:17 +08:00
d55ffd8ec9 fix: PBadge stack error 2024-12-09 22:42:26 +08:00
54efb91621 fix: reply snapshot data null 2024-12-09 22:41:35 +08:00
2fc6d918d0 Merge branch 'main' into fix 2024-12-09 09:51:02 +08:00
aae64dd6be opt: player control textStyle 2024-12-09 09:50:00 +08:00
03ac8bdd69 Merge branch 'main' into opt-videoPlayerControl 2024-12-09 09:42:17 +08:00
cb04519148 Merge branch 'main' into design 2024-12-09 09:40:56 +08:00
49e252a544 Merge branch 'feature-liveRoomRender' 2024-12-09 00:33:10 +08:00
e24ac4fbfb fix: live fullScreen pip error 2024-12-09 00:32:53 +08:00
bbc122142c Merge branch 'main' into feature-liveRoomRender 2024-12-09 00:22:03 +08:00
e7a3bc8811 Merge branch 'fix' 2024-12-08 21:03:56 +08:00
ef7d84409d fix: repeated reply logic 2024-12-08 21:03:18 +08:00
d91d4ab62e fix: forward dynamics reply 2024-12-08 20:48:11 +08:00
5e62cccd16 Merge branch 'main' into fix 2024-12-08 18:45:03 +08:00
ee6c29f75d Merge branch 'opt-videoPlayerControl' 2024-12-08 18:19:19 +08:00
4538844a96 Merge branch 'main' into opt-videoPlayerControl 2024-12-08 18:17:15 +08:00
378b2098df Merge branch 'feature-pureBlackMode' 2024-12-08 18:05:09 +08:00
3be4f9d6f0 Merge branch 'design' 2024-12-08 17:58:52 +08:00
3fca7938dd opt: SystemNotice 2024-12-08 17:57:58 +08:00
b0d0a4ec8f Merge branch 'design' 2024-12-08 16:52:48 +08:00
a25826251e Merge branch 'main' into design 2024-12-08 14:45:12 +08:00
4742ec3dca Merge branch 'opt-followUp' 2024-12-08 14:22:36 +08:00
f7fda95696 opt: relation modify 2024-12-08 14:22:08 +08:00
f6264767c1 Merge branch 'feature-cookies' 2024-12-07 22:27:04 +08:00
92f8f33829 Merge branch 'design' of github.com:guozhigq/pilipala_app into design 2024-12-07 22:02:59 +08:00
b3674be2e5 opt: whisper exception handle 2024-12-07 22:00:50 +08:00
30c1a5037d opt: control bar height 2024-12-07 20:45:05 +08:00
6624cc6a22 opt: reply sheetHeight 2024-12-07 20:01:51 +08:00
52b0034023 Merge branch 'design' 2024-12-07 14:03:44 +08:00
7b57ef17ec opt: http interceptor 2024-12-07 00:34:03 +08:00
d3302c8e5a Merge branch 'design' 2024-12-06 23:55:09 +08:00
9d1bba8a34 opt: fullScreen logic 2024-12-06 23:54:18 +08:00
16088df3a3 mod: member search loading status 2024-12-06 23:30:21 +08:00
e48ab793cc Update README.md 2024-12-05 23:55:22 +08:00
5da67ce5e7 Merge branch 'main' into design 2024-12-05 00:22:56 +08:00
417c225b27 mod: pureBlack theme config 2024-12-04 23:35:59 +08:00
9069a43835 Merge branch 'fix-seasonChange' 2024-12-03 23:48:46 +08:00
536249b7be Merge branch 'fix' 2024-12-03 23:48:33 +08:00
d72d8a78b2 Merge branch 'design' 2024-12-03 23:48:27 +08:00
58746adbe4 Merge branch 'main' into fix-seasonChange 2024-12-03 23:41:35 +08:00
c9883fc10f opt: ugcSeason intro scrollable 2024-12-03 23:41:24 +08:00
7a1d540408 opt: 转载视频标识 2024-12-03 23:29:41 +08:00
498cba0ac6 fix: search suggest richText color 2024-12-03 23:12:57 +08:00
5693c9beda fix: dynamic push & style 2024-12-03 23:07:44 +08:00
0d5237c619 Merge branch 'main' into fix 2024-12-02 23:56:37 +08:00
c590859834 Merge branch 'main' into feature-pureBlackMode 2024-12-02 23:16:20 +08:00
78361192c6 Merge branch 'opt-videoPlayerControl' 2024-12-02 22:51:03 +08:00
2744fb78f8 Merge branch 'design' 2024-12-02 22:50:43 +08:00
1cdddb3c0f Merge branch 'fix' 2024-12-02 22:50:36 +08:00
1dcd385907 Merge branch 'main' into fix 2024-12-02 22:50:18 +08:00
7e8f7cf68e Merge branch 'main' into design 2024-12-02 22:49:55 +08:00
84cf540911 Merge branch 'main' into opt-videoPlayerControl 2024-12-02 22:47:27 +08:00
436fcdb27e Merge branch 'feature-watchLater' 2024-12-02 22:46:39 +08:00
15e5eec5b1 upgrade: AGP from 7.2.0 to 8.7.2 and Gradle from 7.5 to 8.10.2 2024-12-02 22:35:53 +08:00
1395f7ebf3 opt: watchLater visible logic 2024-12-02 21:01:33 +08:00
387e556bcb Merge branch 'main' into opt-videoPlayerControl 2024-12-02 00:13:54 +08:00
17f4c84740 Merge branch 'fix' 2024-12-02 00:13:47 +08:00
4a72513ccb Merge branch 'main' into opt-videoPlayerControl 2024-12-02 00:12:45 +08:00
759bb8a635 Merge branch 'design' 2024-12-02 00:11:45 +08:00
8f2d9e08d5 Merge branch 'feature-watchLater' 2024-12-02 00:11:36 +08:00
97d20b1145 opt: nextPlay logic & style 2024-12-02 00:04:04 +08:00
38b7a4bf91 Merge branch 'main' into feature-watchLater 2024-12-01 23:43:13 +08:00
3d3a306e19 typo: getSubtitleContent 2024-12-01 23:26:09 +08:00
d0d5d12fe1 Merge branch 'feature-opusRender' 2024-12-01 23:22:05 +08:00
fbd0dd1d8f mod: _futureBuilderFuture init 2024-12-01 23:21:33 +08:00
da8ffb027d Merge branch 'main' into feature-opusRender 2024-12-01 23:13:21 +08:00
a84efecb3a fix: PlPlayerController videoType 2024-12-01 22:49:38 +08:00
3315d1107a Merge branch 'main' into fix 2024-12-01 22:39:54 +08:00
cea5c6dcaa Merge branch 'main' into feature-cookies 2024-12-01 21:13:49 +08:00
b4cf28f670 Merge branch 'fix-seasonChange' 2024-12-01 20:56:43 +08:00
94f80eef70 Merge branch 'feature-opusRender' 2024-12-01 20:29:14 +08:00
c6cad2898c Merge branch 'design' 2024-12-01 20:28:58 +08:00
fc921cdcb5 fix: vertical video fullScreen 2024-12-01 20:14:22 +08:00
32043bae05 Merge branch 'main' into fix 2024-12-01 20:12:21 +08:00
a6e3a7c27b Merge branch 'main' into design 2024-12-01 14:12:52 +08:00
4ac0f291ce Merge branch 'opt-videoPlayerControl' 2024-12-01 13:01:32 +08:00
684a5920ef Merge branch 'fix' 2024-12-01 13:01:14 +08:00
038f6c00d7 opt: article render 2024-12-01 00:30:56 +08:00
5441734220 Merge branch 'main' into feature-opusRender 2024-11-30 22:44:01 +08:00
1127ef7437 fix: _futureBuilderFuture init 2024-11-30 14:18:26 +08:00
b79a664e94 refactor: progressBar 2024-11-29 23:51:58 +08:00
65c9027ef3 feat: marquee title 2024-11-28 23:05:02 +08:00
fbee18755d Merge branch 'main' into opt-videoPlayerControl 2024-11-28 22:17:58 +08:00
594d2aed7b Merge branch 'design' 2024-11-28 22:17:45 +08:00
973a61c54a refactor: currentEpisodeIndex calc 2024-11-28 00:07:18 +08:00
9f16296b0a fix:currentEpisodeIndex null 2024-11-27 23:55:13 +08:00
518f49973c mod: fav folder edit 2024-11-27 00:05:10 +08:00
bae1550593 mod: enableCDN default false 2024-11-26 23:35:48 +08:00
97d9bd4547 Merge branch 'opt-videoPlayerControl' into design 2024-11-26 23:31:45 +08:00
6ba022828c opt: videoDetail SliverAppBar height change 2024-11-26 23:31:20 +08:00
388bdc89d8 Merge branch 'main' into design 2024-11-26 00:02:44 +08:00
859ee82367 opt: bottomSheet DragHandle 2024-11-25 23:40:48 +08:00
0ae6238d0e opt: pl_gallery layout 2024-11-25 22:39:04 +08:00
ce49e23904 Merge branch 'fix-seasonChange' 2024-11-24 22:54:21 +08:00
ea900ffe4e opt: jumpTo rebound 2024-11-24 22:53:48 +08:00
6972e76e4e Merge branch 'feature-liveRoomRender' 2024-11-24 22:09:11 +08:00
17a87d2336 fix: liveRoom layout error 2024-11-24 22:08:45 +08:00
0b1fff3f03 Merge branch 'main' into feature-liveRoomRender 2024-11-24 21:34:08 +08:00
747ed377b5 mod 2024-11-24 17:46:20 +08:00
5201c66ac1 feat: hardwareDecodeFormat 2024-11-24 17:38:35 +08:00
5dce41adca Merge branch 'feature-invalidInfo' 2024-11-24 16:43:02 +08:00
8bf1c3a68d Merge branch 'main' into feature-invalidInfo 2024-11-24 16:41:10 +08:00
2804a9ea68 Merge branch 'feature-sponsorBlock' 2024-11-24 16:38:59 +08:00
f78b557ac2 Merge branch 'main' into feature-sponsorBlock 2024-11-24 16:38:43 +08:00
15e46f46b0 Merge branch 'feature-enableComment' 2024-11-24 16:36:47 +08:00
796db85b21 opt: videoPlayer control 2024-11-24 16:29:53 +08:00
e1948b159b feat: comment can be closed 2024-11-24 01:16:33 +08:00
7300da7701 Merge branch 'design' 2024-11-24 01:15:30 +08:00
aa73fb4615 Merge branch 'main' into design 2024-11-23 23:34:07 +08:00
e8166c9f82 opt: toggle showSubtitleBtn 2024-11-23 22:48:09 +08:00
79cd211976 feat: back home when autoplay is off 2024-11-23 15:28:26 +08:00
2db409b449 opt: video intro skeleton 2024-11-23 15:15:58 +08:00
e1c7a74e1b feat: SponsorBlock switch 2024-11-23 01:15:32 +08:00
349b65cb6d Merge branch 'main' into feature-sponsorBlock 2024-11-23 00:05:30 +08:00
6d2f50f41f Merge branch 'feature-dlna' 2024-11-23 00:01:43 +08:00
b824b75bc6 opt: enableDlna switch callFn 2024-11-23 00:01:16 +08:00
14640f338c opt: hide live users by default 2024-11-21 23:43:55 +08:00
30b47094cc Merge branch 'main' into feature-dlna 2024-11-20 22:47:06 +08:00
0b154f5558 Merge branch 'opt-dataInt' 2024-11-20 22:46:20 +08:00
1ac152bb49 feat: dlna switch 2024-11-20 22:45:25 +08:00
9ca47dfda4 Merge branch 'main' into feature-dlna 2024-11-20 17:10:52 +08:00
ea41d90835 Merge branch 'opt-dataInt' 2024-11-20 17:10:13 +08:00
121d32e403 mod: reply appbar title spacing 2024-11-20 09:50:34 +08:00
4008b8caef fix: controlsLock exit fullscreen 2024-11-20 09:46:05 +08:00
94fa0a1e6e Merge branch 'main' into fix 2024-11-20 09:32:53 +08:00
65bb5d7e3d refactor: buvidActivate call 2024-11-20 00:02:12 +08:00
16fa467742 refactor: GlobalDataCache 2024-11-19 23:50:45 +08:00
85ace29282 mod: invalid video style 2024-11-19 23:22:33 +08:00
606a3ad495 Merge branch 'main' into opt-dataInt 2024-11-19 10:48:27 +08:00
8c8c862095 feat: pure dark mode 2024-11-18 19:32:15 +08:00
3fda360739 Merge branch 'design' 2024-11-18 11:05:25 +08:00
b8affcef05 feat: view invalid fav video 2024-11-18 00:27:58 +08:00
d6247fad98 mod: verticalHeight calc 2024-11-17 22:45:51 +08:00
5c8a822c2f opt: seasons layout 2024-11-17 22:33:53 +08:00
1252b609a9 mod: userInfo data type 2024-11-17 22:18:53 +08:00
f44b5793c2 fix: repeated reply 2024-11-17 20:40:17 +08:00
570a073963 mod: AppBarTheme 2024-11-17 19:56:14 +08:00
c3ef35f150 mod: cancel player fullScreenCb 2024-11-17 19:45:06 +08:00
4324e4dbe6 Merge branch 'main' into design 2024-11-17 16:10:26 +08:00
88d8027b60 opt: vertical video layout 2024-11-17 15:59:54 +08:00
e5d3e84b61 opt: videoDetail appbar 2024-11-17 14:05:04 +08:00
dc9bdcb917 Merge branch 'fix' 2024-11-16 22:51:16 +08:00
b88e16e262 Merge branch 'design' 2024-11-16 15:36:11 +08:00
bfbae81997 fix: Request get options.headers null error 2024-11-16 15:35:48 +08:00
e9e5532a15 Merge branch 'main' into fix 2024-11-16 15:34:40 +08:00
bdedd78e30 opt: dynamic comment push 2024-11-16 15:18:19 +08:00
4e1d8ac4a6 Merge branch 'design' 2024-11-16 14:58:06 +08:00
f932175a1f opt: dynamic comment push 2024-11-16 14:54:57 +08:00
2495483739 Merge branch 'design' 2024-11-16 13:49:53 +08:00
d8b1ee1b2a opt: appScheme 2024-11-16 13:44:41 +08:00
cb76851543 Merge branch 'main' into fix 2024-11-16 11:34:35 +08:00
908dd8c20d opt: AppBarTheme 2024-11-16 11:31:53 +08:00
a4413b9520 feat: cookie登录 2024-11-15 23:34:42 +08:00
c9e499bea7 fix: dynamicForward msg 2024-11-15 22:00:25 +08:00
b332cef4a3 mod: favoritesSection style 2024-11-15 21:56:04 +08:00
aaa491d56c Merge branch 'main' into design 2024-11-14 00:40:02 +08:00
8f56124b32 Merge branch 'feature-videoTags' 2024-11-14 00:39:41 +08:00
acdc347a7f mod: tag click push 2024-11-14 00:33:41 +08:00
b93a3d08cc opt: reply del 2024-11-14 00:19:05 +08:00
0009630639 opt: reply del 2024-11-13 23:59:31 +08:00
57407c943f opt: request get options 2024-11-13 00:54:49 +08:00
449630c770 Merge branch 'main' into design 2024-11-13 00:34:41 +08:00
3cc03f7d15 Merge branch 'fix' 2024-11-13 00:34:12 +08:00
9f9a568322 fix: cv load failed 2024-11-13 00:27:47 +08:00
d420d02eab Merge branch 'fix' 2024-11-12 16:40:44 +08:00
3ee5e7acfc mod 2024-11-12 14:15:26 +08:00
511f2513dc Merge branch 'main' into fix 2024-11-12 14:13:58 +08:00
539e83fb94 opt: replace gif 2024-11-12 00:02:08 +08:00
08cb807f39 fix: history cid 2024-11-11 23:46:08 +08:00
1e7a7a0819 Merge branch 'fix-seasonChange' 2024-11-11 22:28:33 +08:00
cf7d73c8f2 Merge branch 'fix' 2024-11-11 22:27:34 +08:00
ed73f321cd Merge branch 'feature-sponsorBlock' 2024-11-11 22:25:08 +08:00
e112a85894 opt: request method 2024-11-11 22:24:37 +08:00
acb0de1adf mod: skipSegments type filter 2024-11-11 09:51:19 +08:00
17fddb2a16 fix: typo 2024-11-11 09:18:05 +08:00
44ef189f32 opt: layout 2024-11-10 22:51:36 +08:00
3a34772acb Merge branch 'main' into feature-sponsorBlock 2024-11-10 12:47:22 +08:00
26bb6226eb Merge branch 'feature-sponsorBlock' 2024-11-10 12:46:47 +08:00
7458ae0d37 Merge branch 'fix-seasonChange' 2024-11-10 12:45:29 +08:00
4c139c3a26 feat: season fav 2024-11-10 00:52:16 +08:00
43d866bfe1 fix: season currentIndex 2024-11-09 23:22:19 +08:00
9c80112979 fix: sections 2024-11-09 23:12:30 +08:00
f242eec145 mod: season change error 2024-11-09 17:56:13 +08:00
32923cd417 mod: segment data type 2024-11-09 01:34:10 +08:00
b85c33bcde Merge branch 'feature-sponsorBlock' of github.com:guozhigq/pilipala_app into feature-sponsorBlock 2024-11-09 01:24:44 +08:00
47cb51eda5 mod: videoDuration data type 2024-11-08 09:47:26 +08:00
2adb10c406 feat: sponsorBlock 2024-11-07 23:59:21 +08:00
f3ab6ce502 Merge branch 'main' into feature-sponsorBlock 2024-11-07 17:06:56 +08:00
986ed4f46f Merge branch 'fix' 2024-11-06 23:46:40 +08:00
bd9745c534 mod: upPanel clickUpCb 2024-11-06 23:42:55 +08:00
0ad3d45dd2 mod: subtitleContent clear 2024-11-06 23:23:25 +08:00
3a68581ae5 mod: getSubtitle api 2024-11-05 23:36:31 +08:00
7a81abd083 Merge branch 'fix' 2024-11-03 23:13:29 +08:00
d60bbec827 fix: seasonId error 2024-11-03 22:50:22 +08:00
dcd04d73cc fix: sys msg matcher 2024-11-03 00:29:49 +08:00
8140d75b6f Merge branch 'fix' 2024-11-02 23:42:57 +08:00
eec3a8cb73 Merge branch 'design' 2024-11-02 23:42:52 +08:00
0bc2a79468 mod: remove more 2024-11-02 23:39:29 +08:00
b1821163bd Merge branch 'main' into design 2024-11-02 22:25:24 +08:00
294ea9e1b7 feat: video tags 2024-11-02 22:24:59 +08:00
fe4b33febf fix: fullScreenStatusListener 2024-11-02 15:04:26 +08:00
335019c396 fix: PlayerStatus.completed status bar loss 2024-11-02 14:19:42 +08:00
d082a77885 Merge branch 'design' 2024-11-02 13:39:19 +08:00
a462de4c39 Merge branch 'main' into fix 2024-11-02 13:38:54 +08:00
fef0cf9546 mod 2024-11-02 13:17:55 +08:00
a69a27cdc4 feat: up投稿播放全部 2024-11-02 01:51:26 +08:00
3209bde290 opt: block rec ad 2024-11-01 22:22:19 +08:00
6dccaa87ae mod: fav isPublic logic 2024-11-01 22:21:12 +08:00
3cb595e76e opt: login status processing 2024-11-01 21:20:36 +08:00
1b1e62e146 Merge branch 'fix' 2024-11-01 09:23:06 +08:00
4fd49befbb fix: 评论重复加载 2024-11-01 09:17:57 +08:00
dd1bc66c57 Merge branch 'main' into fix 2024-10-31 23:24:47 +08:00
91aaa1b519 fix: replyreply load 2024-10-31 23:22:29 +08:00
a49429bbf1 fix: replyAdd params 2024-10-31 23:05:57 +08:00
7d4e9cb16d Merge branch 'design' 2024-10-31 09:24:10 +08:00
700fb187ee Merge branch 'fix' 2024-10-31 09:24:04 +08:00
da52c63056 mod: uploadImage params 2024-10-31 00:29:53 +08:00
f71ab166c8 feat: at msg 2024-10-31 00:13:11 +08:00
c8bd564cf0 mod: member page title 2024-10-31 00:10:25 +08:00
3808c3ddae fix: scheme SchemeEntity 2024-10-30 23:27:54 +08:00
49f64563e7 Merge branch 'main' into fix 2024-10-30 23:18:36 +08:00
866593e5d0 Merge branch 'design' 2024-10-30 23:06:37 +08:00
2adafb497a Merge branch 'update-positionedList' 2024-10-30 16:08:02 +08:00
4c05479ee8 Merge branch 'main' into design 2024-10-30 09:50:36 +08:00
fa1928c47b Merge branch 'fix' 2024-10-30 09:42:35 +08:00
7a1f3c95a9 fix: text overflow 2024-10-29 23:39:56 +08:00
f9f17bcf09 update: positionedList plugin 2024-10-29 22:48:02 +08:00
26f3492ad2 fix: customer service message 2024-10-29 09:47:11 +08:00
c0190a526f fix: msg page layout 2024-10-28 23:58:58 +08:00
3e630334ca fix:专栏图文渲染异常 2024-10-27 23:46:33 +08:00
de2b2907a6 Merge branch 'main' into fix 2024-10-27 23:36:33 +08:00
0a91870c97 Merge branch 'design' 2024-10-27 23:36:04 +08:00
12e01aae5a opt: img preview action type 2024-10-27 23:12:05 +08:00
6e6430e86c Merge branch 'fix' 2024-10-27 21:33:08 +08:00
f579fec670 Merge branch 'opt-bangumi' 2024-10-27 21:32:59 +08:00
ac90e14665 fix: repeated reply 2024-10-27 21:28:56 +08:00
fbc1288def opt: bangumi progress 2024-10-27 18:31:28 +08:00
f21ad55f50 opt: bangumi layout 2024-10-27 16:15:50 +08:00
16a8cc8d68 opt: bangumi follow status 2024-10-27 14:39:21 +08:00
b9ef5bae4e Merge branch 'design' 2024-10-27 00:56:37 +08:00
686c205a60 opt: httpError layout 2024-10-27 00:51:11 +08:00
63aa964300 Merge branch 'fix' 2024-10-27 00:45:46 +08:00
7485400894 fix: loadMore reply 2024-10-27 00:45:20 +08:00
638e22a60d feat: live following 2024-10-26 23:46:19 +08:00
7f5d30c6aa Merge branch 'fix' 2024-10-26 16:35:51 +08:00
687d89bcdf Merge branch 'design' 2024-10-26 16:34:56 +08:00
4f6ac4aff4 feat: search user by uid 2024-10-26 16:31:01 +08:00
baa6a644e3 opt: search panel layout 2024-10-26 15:10:30 +08:00
b6e6cc1735 opt: unsubscribe button 2024-10-26 01:01:47 +08:00
3aca6cecc2 fix: member article cover url null 2024-10-26 00:34:23 +08:00
0d55116f24 feat: up status 2024-10-26 00:28:08 +08:00
0ce77d421f feat: up uid copy 2024-10-25 23:07:50 +08:00
0169323075 mod: SchemeEntity to Uri 2024-10-25 00:54:51 +08:00
c671752fc0 feat: archive url copy 2024-10-25 00:35:35 +08:00
a8f228fab7 fix: null error 2024-10-25 00:06:20 +08:00
e74d326c7a fix: search history cache 2024-10-25 00:03:24 +08:00
fdb86a9a20 opt: user relation 2024-10-24 23:25:24 +08:00
492faad029 Merge branch 'fix' 2024-10-24 00:49:34 +08:00
09df49fa78 Merge branch 'design' 2024-10-24 00:49:30 +08:00
27c7a34e20 mod: sys notice align 2024-10-24 00:49:10 +08:00
55ae549b98 fix: reply model null error 2024-10-24 00:35:32 +08:00
13e7a50a89 mod: webSiteUrl 2024-10-24 00:23:14 +08:00
86f3632170 mod: reply save layout 2024-10-24 00:22:25 +08:00
7f08208425 feat: Update logic for public fav folder 2024-10-23 23:52:29 +08:00
b16d163cbd Merge branch 'design' 2024-10-23 23:07:21 +08:00
2106baf7e6 mod: sys message link judge 2024-10-23 23:07:07 +08:00
96dc9ee230 Merge branch 'main' into fix 2024-10-23 23:04:44 +08:00
1b4dc0a40a Merge branch 'feature-minePage' 2024-10-23 23:01:22 +08:00
c6fcbb8566 fix: layout 2024-10-23 23:00:59 +08:00
79514e4bfb mod: history search api 2024-10-22 23:58:38 +08:00
62836815ce Merge branch 'design' 2024-10-22 23:02:45 +08:00
56f5a72e81 opt: dynamic forward 2024-10-22 22:56:42 +08:00
002b3a1329 Merge branch 'main' into design 2024-10-21 23:32:58 +08:00
cc37c962d7 Merge branch 'feature-replyWithPic' 2024-10-21 23:29:13 +08:00
9ff4b83aef Merge branch 'design' 2024-10-21 23:21:00 +08:00
b788383966 opt: root reply 2024-10-21 23:12:24 +08:00
49c35a7e0d feat: bangumi cover preview 2024-10-20 23:05:31 +08:00
7abb1447e1 Merge branch 'design' 2024-10-20 22:59:18 +08:00
c287fd898a Merge branch 'feature-minePage' 2024-10-20 22:49:19 +08:00
c8a8544857 opt: pagesList style 2024-10-20 22:36:55 +08:00
9841633240 opt: playall safeArea 2024-10-20 15:08:15 +08:00
7c4dd6027b fix: bangumi fav sheet 2024-10-20 14:23:13 +08:00
6fd816c505 opt: dynamics pic radius 2024-10-20 14:14:57 +08:00
805e5f8ec6 mod: favorites isPrivacy 2024-10-20 12:51:15 +08:00
b683ce2791 mod: use DraggableScrollableSheet 2024-10-20 12:38:32 +08:00
8292f0e15a feat: 动态样式切换 2024-10-20 00:29:31 +08:00
83c9ce55c8 feat: 简介默认展开 2024-10-19 22:59:55 +08:00
bb2d5e5494 opt: system message 2024-10-19 21:38:03 +08:00
be29f70b30 faat: message to comment 2024-10-19 18:16:04 +08:00
ad9f05ef27 Merge branch 'design' 2024-10-19 15:46:22 +08:00
b4ccd2f4bf feat: custom image borderRadius 2024-10-19 15:46:01 +08:00
b37c767ac0 Merge branch 'opt-playerLayout' 2024-10-19 15:43:33 +08:00
5aa1bee58a Merge branch 'feature-appScheme' 2024-10-19 15:43:11 +08:00
bfe907d5cc Merge branch 'fix' 2024-10-19 15:42:54 +08:00
e4679143c5 feat: search suggestion switch 2024-10-19 14:50:09 +08:00
95df2fb6ab opt: set&get sheetHeight 2024-10-19 13:31:11 +08:00
c755e8a60f opt: search page 2024-10-19 13:29:18 +08:00
99a5891d52 feat: up头像预览 2024-10-19 02:28:32 +08:00
75f069ca69 opt: following host 2024-10-18 00:54:33 +08:00
b8e5c3d210 fix: up主页null 2024-10-18 00:19:37 +08:00
6d4359be0e Merge branch 'main' into fix 2024-10-18 00:18:50 +08:00
fa79b92f82 opt: http 2024-10-18 00:09:34 +08:00
b60e693e2e mod: reply api 2024-10-17 23:24:45 +08:00
113a76894a feat: 带图评论 2024-10-17 00:40:42 +08:00
163b8a3013 feat: 评论查看更多 2024-10-17 00:36:02 +08:00
0ec14fe1fa opt: HttpError 2024-10-16 22:59:34 +08:00
174eff7151 Merge branch 'main' into feature-minePage 2024-10-16 14:17:24 +08:00
eb2a51e5e2 opt: 快进快退面板 2024-10-16 00:52:10 +08:00
dc8f034df7 typo 2024-10-15 00:24:31 +08:00
63a6c048e6 feat: 稍后再看下拉刷新 2024-10-15 00:17:46 +08:00
3f9b35b56b mod: ai总结样式 2024-10-15 00:06:48 +08:00
48e2e17a1e Merge branch 'feature-appScheme' 2024-10-14 09:37:28 +08:00
c3120eb03c Merge branch 'design' 2024-10-14 00:32:39 +08:00
a952d4b551 Merge branch 'fix' 2024-10-14 00:32:33 +08:00
334ce6d5b1 mod: deepLink 参数处理 2024-10-14 00:20:38 +08:00
0c993bceee fix: null error 2024-10-14 00:02:12 +08:00
d77450e1d3 mod: 「收到的赞」取参 2024-10-13 23:48:22 +08:00
47ec38b465 feat: deepLink 2024-10-13 23:00:32 +08:00
be316f1c69 Merge branch 'main' into feature-appScheme 2024-10-13 19:52:23 +08:00
d0e689070e mod: 全屏手势可关闭 2024-10-13 18:53:48 +08:00
e381d861d2 Merge branch 'fix' 2024-10-13 17:43:59 +08:00
227781a577 Merge branch 'design' 2024-10-13 17:42:57 +08:00
51ff684aaf fix: 导航栏沉浸 2024-10-13 17:19:39 +08:00
3a2d9def65 feat: 全屏手势可关闭 2024-10-13 16:41:53 +08:00
4307950177 fix: 返回上一页播放异常 2024-10-13 15:48:27 +08:00
326827624c fix: 首页返回顶部 2024-10-13 01:27:07 +08:00
b03fe0fce8 fix: 清除缓存dialog 2024-10-13 01:19:59 +08:00
c1cd024db6 opt: up主页布局 2024-10-13 01:11:48 +08:00
85f77ed933 mod: up主页wWebid校验 2024-10-12 22:05:04 +08:00
22e8213e61 Merge branch 'main' into design 2024-10-12 17:51:24 +08:00
e7bbd3d32a mod: 官网&网盘地址 2024-10-12 14:27:16 +08:00
cf29a62a52 fix: 缓存弹幕设置 2024-10-12 14:16:53 +08:00
fffbd62f4f opt: Request().get 2024-10-12 11:35:49 +08:00
7aa0747995 Merge branch 'fix' 2024-10-11 00:23:47 +08:00
fb84ba0481 fix: 直播间布局异常、控制器初始化异常、imgQuality/cover取值异常 2024-10-11 00:23:27 +08:00
935d56fcb1 Merge branch 'main' into fix 2024-10-10 23:57:03 +08:00
caa066237d v1.0.25 更新日志 2024-10-10 23:04:59 +08:00
2e206f20cc Update yml 2024-10-10 23:02:16 +08:00
81491ce98a Merge branch 'design' 2024-10-10 22:27:20 +08:00
fadefa2ddc opt: bangumiIntroController初始化 2024-10-10 22:26:46 +08:00
90fa6a16b9 Merge branch 'fix' 2024-10-10 09:44:54 +08:00
212b4ee685 Merge branch 'design' 2024-10-10 09:43:31 +08:00
c634e602b9 fix: 字幕数据过大时页面卡死 2024-10-09 23:33:52 +08:00
a44c0ae51e opt: 评论信息布局 2024-10-09 22:41:12 +08:00
51654ac54e opt: 评论操作栏间隙 2024-10-09 22:03:58 +08:00
545be4b0da Merge branch 'design' 2024-10-09 00:01:32 +08:00
21f5aae3b9 Merge branch 'feature-watchLater' 2024-10-09 00:00:55 +08:00
3830380172 feat: 顺序播放 2024-10-08 23:46:40 +08:00
48d869a6c0 opt: 视频播放页状态栏前景色 2024-10-07 23:46:55 +08:00
81e7da1f16 Merge branch 'main' into design 2024-10-07 23:26:39 +08:00
9d965aae2f mod: 番剧封面比例 2024-10-07 23:15:17 +08:00
c92ef36504 Merge branch 'feature-opusRender' 2024-10-07 22:54:03 +08:00
ee1b3049cb Merge branch 'design' 2024-10-07 22:53:54 +08:00
24a854b663 Merge branch 'fix' 2024-10-07 22:53:49 +08:00
a366f5d3ce opt: 专栏内容可选 2024-10-07 22:51:02 +08:00
16847b8a92 mod: 评论跳转cv 2024-10-07 22:39:48 +08:00
e94f008168 opt: appScheme 补充 2024-10-07 21:46:00 +08:00
e34a75f0f3 Merge branch 'main' into fix 2024-10-07 17:56:28 +08:00
0332f24542 Merge branch 'design' 2024-10-07 17:56:04 +08:00
64c2bcc650 opt: 控制器初始化 2024-10-07 17:55:39 +08:00
d24ccd7b26 Merge branch 'feature-replyDel' 2024-10-07 14:38:06 +08:00
676b2f18eb mod 2024-10-06 21:11:00 +08:00
078941bd9c Merge branch 'fix' 2024-10-06 16:54:32 +08:00
fa53c1214c mod: 返回页面时stream重置 2024-10-06 16:53:06 +08:00
4118be70dc Merge branch 'main' into fix 2024-10-06 16:47:17 +08:00
47546c8e0d Merge branch 'feature-watchLater' 2024-10-06 16:46:43 +08:00
2dca375901 mod 2024-10-06 16:38:50 +08:00
00423be5a9 mod: 一键三连 2024-10-05 14:18:24 +08:00
c08c3f4c7c mod 2024-10-05 11:39:09 +08:00
e3a52db725 Merge branch 'main' into feature-minePage 2024-10-05 11:26:29 +08:00
722ba06787 feat: 专栏分类搜索 2024-10-04 23:07:34 +08:00
ef7a563caa Merge branch 'fix' 2024-10-04 11:47:11 +08:00
f1441ac97e fix: 收藏夹 2024-10-04 11:36:17 +08:00
8b82725a49 Merge branch 'design' 2024-10-03 21:39:18 +08:00
4cac02a4c0 opt: Request().post 2024-10-03 21:28:12 +08:00
e949dd60ce opt: 图片预览 2024-10-03 20:35:33 +08:00
e409b679c0 Merge branch 'main' into design 2024-10-03 16:37:35 +08:00
f3e0e3c2f6 Merge branch 'feature-opusRender' 2024-10-03 16:37:26 +08:00
566b2cbd7f Merge branch 'main' into design 2024-10-03 16:37:13 +08:00
2a436cfcfc feat: 原网页查看专栏 2024-10-03 16:30:47 +08:00
dd363e3cda Merge branch 'feature-readRender' into feature-opusRender 2024-10-03 16:02:37 +08:00
31f87bd24c fix: 登录页面 2024-10-02 22:27:20 +08:00
1f391cbfd0 fix 2024-10-02 22:26:13 +08:00
fed1bf4e9d feat: 资料编辑 2024-10-01 22:17:47 +08:00
dd47724777 feat: navBar展示头像 2024-10-01 18:48:01 +08:00
c4f446e01e Merge branch 'main' into feature-minePage 2024-10-01 11:47:47 +08:00
853627097d Merge branch 'fix' 2024-09-30 13:35:34 +08:00
877eeded37 fix: 黑名单展示 2024-09-30 13:09:40 +08:00
19866fe080 fix: 视频评论回顶 2024-09-30 12:00:30 +08:00
66d2ac9777 fix: 粉丝不可见时异常 2024-09-30 11:38:39 +08:00
ed9a75ecd3 fix: 视频总结 2024-09-30 11:23:40 +08:00
c3d23dfdba typo 2024-09-29 15:29:08 +08:00
6c644256d1 Merge branch 'main' into fix 2024-09-29 15:27:03 +08:00
cb657ad8bc Merge branch 'fix-liveHistory' 2024-09-29 14:11:02 +08:00
5a12889834 Merge branch 'feature-readRender' 2024-09-29 14:09:49 +08:00
ab6a55bc03 Merge branch 'feature-notifications' 2024-09-29 14:09:39 +08:00
d9285c92c7 Merge branch 'design' 2024-09-29 14:09:31 +08:00
31f07bff90 Merge branch 'fix' 2024-09-29 14:09:24 +08:00
b6390ea626 fix: read专栏图片浏览 2024-09-29 14:07:21 +08:00
11aa465a8f feat: 私信图片查看 2024-09-29 14:01:26 +08:00
400b87395a mod: 标题最大行数 2024-09-29 12:00:38 +08:00
79c148adeb fix: 链接兜底 2024-09-29 01:12:43 +08:00
ec5cc6ff91 feat: 直播间历史记录 2024-09-29 01:01:45 +08:00
f95bcb2e6c mod: 评论删除逻辑 2024-09-28 23:52:50 +08:00
166dceb1bd typo 2024-09-28 23:21:17 +08:00
0b50b1bafe Merge branch 'feature-notifications' 2024-09-28 23:16:41 +08:00
b34fc2ff1f mod: 系统消息 2024-09-28 23:16:00 +08:00
afe5fe0a5e Merge branch 'main' into feature-notifications 2024-09-28 21:44:55 +08:00
3e3d6b19bb Merge branch 'main' into feature-minePage 2024-09-28 21:24:06 +08:00
ba73933041 Merge branch 'feature-readRender' 2024-09-28 18:30:02 +08:00
26a5733675 feat: cv专栏记录 2024-09-28 18:22:42 +08:00
d3f2d1fb3c Merge branch 'feature-opusRender' 2024-09-28 17:24:54 +08:00
aa6b5af05d fix: 重定向cv 2024-09-28 17:24:23 +08:00
3db50621b7 Merge branch 'fix' 2024-09-28 16:28:40 +08:00
a54f11d458 Merge branch 'feature-upArticle' 2024-09-28 16:28:10 +08:00
0a6eb931b8 Merge branch 'feature-opusRender' 2024-09-28 16:26:23 +08:00
fcbe423375 Merge branch 'feature-readRender' 2024-09-28 16:26:13 +08:00
43750142ae faat: 用户专栏 2024-09-28 16:17:23 +08:00
2ac3307e4d fix: 浏览历史专栏跳转 2024-09-27 16:57:18 +08:00
9541d7a4ea opt: 专栏代码块渲染 2024-09-27 16:38:47 +08:00
c7f044e441 fix: Stream has already been listened to 2024-09-27 00:39:18 +08:00
feaec8fc30 fix: Stream has already been listened to 2024-09-27 00:36:13 +08:00
8c479915f0 fix: Stream has already been listened to 2024-09-27 00:34:32 +08:00
6b5743c5ab mod: 布局 2024-09-27 00:21:07 +08:00
30b609271f feat: read专栏内容渲染 2024-09-26 23:45:58 +08:00
3478c70176 Merge branch 'feature-opusRender' into feature-readRender 2024-09-26 22:12:27 +08:00
34537ab141 mod: arguments 2024-09-26 22:12:00 +08:00
6873eb3da7 opt: 专栏opus图片预览 2024-09-25 09:33:55 +08:00
38fbbeb5a8 feat: opus专栏内容渲染 2024-09-25 00:32:46 +08:00
509e48feef Merge branch 'main' into feature-readRender 2024-09-23 21:58:32 +08:00
150745bb2d Merge branch 'feature-watchLater' 2024-09-23 21:58:10 +08:00
d7e5ccaf3a mod 2024-09-23 19:43:56 +08:00
301679d37e Merge branch 'main' into design 2024-09-23 00:14:27 +08:00
f25467eeea Merge branch 'feature-liveRoomRender' 2024-09-22 23:42:48 +08:00
47985e5d17 mod: 布局 2024-09-22 23:42:25 +08:00
ce4a0814ee Merge branch 'feature-liveRoomRender' 2024-09-22 23:16:42 +08:00
249600ec27 opt: 竖屏直播布局 2024-09-22 23:16:19 +08:00
031358e72e Merge branch 'feature-followingLiveUser' into feature-liveRoomRender 2024-09-22 23:12:54 +08:00
420d2eeba2 Merge branch 'feature-followingLiveUser' 2024-09-22 23:10:33 +08:00
b24c96db7c mod: 请求异常布局 2024-09-22 23:10:05 +08:00
b0f01f0ff4 Merge branch 'main' into feature-liveRoomRender 2024-09-22 19:18:35 +08:00
ad243616e3 Merge branch 'feature-followingLiveUser' 2024-09-22 19:18:16 +08:00
1905ba2a98 mod: 直播用户过滤 2024-09-22 19:17:46 +08:00
e40573f8b5 Merge branch 'main' into feature-liveRoomRender 2024-09-22 16:15:48 +08:00
438b7ab5bd Merge branch 'feature-followingLiveUser' 2024-09-22 16:15:07 +08:00
913e9154f5 feat: 我的关注 正在直播 2024-09-22 16:11:52 +08:00
12aada6a3f Merge branch 'fix' 2024-09-21 23:17:46 +08:00
a2299b1613 Merge branch 'main' into feature-minePage 2024-09-21 16:18:02 +08:00
39aa967864 Merge branch 'design' 2024-09-21 16:16:11 +08:00
fbbe555787 mod: navBar首页可编辑 2024-09-21 16:15:05 +08:00
21ba50c7a9 mod: 增加搜索页面入口 2024-09-21 16:11:55 +08:00
cf66d3be4c feat: 稍后再看&收藏夹播放全部 2024-09-21 15:14:38 +08:00
5f35f6cf5c Merge branch 'main' into feature-watchLater 2024-09-18 22:23:26 +08:00
dfc97d5e1f Merge branch 'opt-componentParams' 2024-09-18 22:18:18 +08:00
476fef8877 mod 2024-09-18 22:17:06 +08:00
5f02c17a2d fix: 关注up主搜索ps 2024-09-18 00:29:43 +08:00
8f6fe042cd feat: 我的&媒体页面合并 2024-09-18 00:16:02 +08:00
d2640f230c feat: 视频评论删除 2024-09-15 02:30:35 +08:00
fb010d6d4f Merge branch 'main' into feature-replyDel 2024-09-15 02:04:51 +08:00
be82d05d1c Merge branch 'opt-dataInt' 2024-09-15 02:04:37 +08:00
389ca286a7 mod: userInfo cache 2024-09-15 02:03:53 +08:00
8aebf463e5 opt: 播放器音量&亮度控制条 2024-09-15 01:16:30 +08:00
ad1428b28f Merge branch 'opt-componentParams' into design 2024-09-12 23:57:14 +08:00
6c23773fa2 merge main 2024-09-12 23:56:20 +08:00
0bec084bec opt: 收藏夹为空提示 2024-09-12 09:40:08 +08:00
95a452dea8 opt: stat组件传参 2024-09-11 20:25:40 +08:00
ba1704fa2a feat: 收藏夹新建/编辑 2024-09-11 00:03:14 +08:00
10f464aab1 mod: 动态视频标签展示 2024-09-09 00:47:16 +08:00
5651466881 fix: 暗黑模式下个人认证文本颜色 2024-09-09 00:12:38 +08:00
012b415233 fix: 点赞计数 2024-09-09 00:05:22 +08:00
1d87e66433 fix: 翻页错误 2024-09-08 17:46:23 +08:00
df18662863 fix: 用户合集参数 2024-09-08 17:46:08 +08:00
c3595a0dcd fix: 搜索条件筛选面板无法滚动 2024-09-08 15:53:56 +08:00
e4a820268a fix: iOS静音模式无声 2024-09-04 09:42:08 +08:00
5c7f477ad8 mod:收藏夹类型展示(公开/私密) 2024-08-31 14:26:03 +08:00
e525554152 Merge branch 'main' into fix 2024-08-31 14:01:55 +08:00
67aa95c027 fix: 部分接口忽略error response提示 2024-08-27 23:57:19 +08:00
01cae5e280 mod: GlobalDataCache init 2024-08-27 23:46:01 +08:00
478dd39b20 mod: bottomSheet样式 2024-08-26 23:48:12 +08:00
2e329553d9 opt: 数据初始化 2024-08-26 23:23:43 +08:00
f0cd9c5cf2 Merge branch 'main' into opt-dataInt 2024-08-26 23:19:58 +08:00
c60fd6a73e Merge branch 'feature-liveDanmaku' 2024-08-26 23:18:14 +08:00
f598b6adad opt: liveRoom getBuvid 2024-08-26 23:14:37 +08:00
8b93eaf13b Merge branch 'main' into fix 2024-08-26 19:45:16 +08:00
2216296ba2 Merge branch 'feature-liveDanmaku' 2024-08-26 00:16:37 +08:00
0c61394a9e Merge branch 'fix' 2024-08-26 00:13:29 +08:00
d9ddd2fd37 Merge branch 'design' 2024-08-26 00:13:13 +08:00
d85e9446e3 opt: fav follow bottomSheet 2024-08-26 00:12:35 +08:00
8fd3bfae5f fix: 系统消息标记已读 2024-08-25 22:07:42 +08:00
8810a74ebf fix: 未播放时返回当前页异常 2024-08-24 23:33:19 +08:00
b96f35bae2 mod: 移除up主页分割线 2024-08-24 00:28:07 +08:00
15e1cb5d47 feat: 私信可选 2024-08-24 00:07:08 +08:00
fc22834e4a mod: 直播弹幕开关 2024-08-23 23:47:15 +08:00
61e019f458 fix: 合集类型补充(直播回放) 2024-08-23 00:20:20 +08:00
844db213a5 mod: 输入框样式 2024-08-22 23:57:11 +08:00
44910b35d9 feat: 直播弹幕发送 2024-08-22 20:24:21 +08:00
69590c6092 Merge branch 'feature-liveDanmaku' of github.com:guozhigq/pilipala_app into feature-liveDanmaku 2024-08-21 00:14:54 +08:00
a074a360f2 feat: 直播弹幕2 2024-08-21 00:14:45 +08:00
869e49bec2 feat: 直播弹幕2 2024-08-21 00:09:26 +08:00
1012b5d009 feat: 直播弹幕 2024-08-18 23:30:51 +08:00
c0f7623e3c Merge branch 'feature-replySave' 2024-08-11 23:49:27 +08:00
914760b5a7 Merge branch 'design' 2024-08-11 23:49:13 +08:00
ae3c457f4e Merge branch 'fix' 2024-08-11 23:49:08 +08:00
ec30235421 opt: 一键三连动画 2024-08-11 23:16:33 +08:00
b188675faf opt 2024-08-11 18:43:21 +08:00
61337338bd fix: 图片预览Hero tag重复 2024-08-10 23:11:21 +08:00
0bb9a68cc5 mod: 保存封面时视频标题可选中 2024-08-09 18:39:16 +08:00
66edac428b mod: 补充合集类型 2024-08-04 00:35:42 +08:00
8e0fbb2a54 opt: 非pip状态切换至后台不关闭BottomSheet 2024-07-27 22:08:12 +08:00
a2cbcca909 fix: 首页异常 2024-07-27 11:02:42 +08:00
5e6f082ade feat: 评论保存为图片 2024-07-27 11:00:19 +08:00
7b07ec383b Merge branch 'main' into feature-replySave 2024-07-26 22:53:27 +08:00
c7ffcd91de Merge branch 'fix' 2024-07-26 22:52:00 +08:00
80d0b15ac8 fix: 动态评论查看详情 2024-07-26 22:47:14 +08:00
a0bc0314bf fix: 评论详情查看 2024-07-25 00:08:18 +08:00
933dca3698 Merge branch 'main' into fix 2024-07-23 23:30:54 +08:00
5b78810ba4 fix: 消息mid null 2024-07-23 23:29:53 +08:00
bc36493e60 fix: 首页推荐数据格式异常 2024-07-23 23:25:06 +08:00
1f63c7e6d4 Merge branch 'design' 2024-07-21 22:50:09 +08:00
bc3ce33f78 feat: 评论二楼跳转 2024-07-21 22:40:43 +08:00
9ac2752cbb Merge branch 'main' into design 2024-07-21 22:14:04 +08:00
9941e65a76 Merge branch 'opt-imagePreview' 2024-07-21 22:12:54 +08:00
dbc0246682 Merge branch 'feature-chargeArchives' 2024-07-21 22:10:03 +08:00
92b2f3ee92 Merge branch 'feature-upDynamic' 2024-07-21 22:09:29 +08:00
38b6b6b4e0 fix: 消息mid null 2024-07-21 18:50:36 +08:00
75859fc9cf mod: 取消投币限制&布局 2024-07-18 01:11:26 +08:00
9c00d3c4d3 feat: up投稿显示充电专属 2024-07-18 00:52:17 +08:00
5a4bf24b30 Merge branch 'fix' 2024-07-17 23:38:18 +08:00
9f676f8ef9 fix: 首页推荐数据异常 2024-07-17 23:37:55 +08:00
db708f9d8c Merge branch 'main' into fix 2024-07-17 23:29:43 +08:00
04bdf5c293 feat: 轮播查看up动态 2024-07-14 21:47:37 +08:00
b489a45481 fix: 收藏异常、收到的赞 2024-07-14 00:41:59 +08:00
a5b7ee5a96 Merge branch 'design' 2024-07-13 19:46:04 +08:00
cc2595fd7b opt: 图片预览 2024-07-13 16:47:44 +08:00
189abbc747 fix: 导航栏背景异常 2024-07-10 23:58:55 +08:00
7759add4c5 Merge branch 'design' 2024-07-08 23:45:19 +08:00
6f69212952 opt: 视频加载异常捕获 2024-07-08 23:44:39 +08:00
139405d4da Merge branch 'main' into design 2024-07-08 23:17:19 +08:00
7b9ff07b2c Merge branch 'design' 2024-07-07 23:17:27 +08:00
9c0ee95220 Merge branch 'fix' 2024-07-07 23:17:23 +08:00
aab5144371 fix: 字幕req导致headerControl初始化异常 2024-07-07 22:27:28 +08:00
637c82f536 Merge branch 'main' into design 2024-07-07 15:32:15 +08:00
0a0d375caa Merge branch 'main' into fix 2024-07-07 11:01:29 +08:00
c248d33109 mod 2024-07-07 11:01:09 +08:00
c28b11d05a Merge branch 'design' 2024-07-06 23:47:30 +08:00
db23f844f5 Merge branch 'fix' 2024-07-06 23:47:23 +08:00
1032b6d2ea Merge branch 'main' into design 2024-07-06 23:47:02 +08:00
dac0898729 opt: AppBar渐变背景 2024-07-06 23:43:50 +08:00
a23a18f3bc fix: 字幕导致headControl初始化失败 2024-07-06 19:31:28 +08:00
60e8975622 Merge branch 'feature-memberFav' 2024-07-06 18:47:20 +08:00
77ab68abf5 Merge branch 'design' 2024-07-06 18:45:03 +08:00
2e3703a8d6 Merge branch 'fix' 2024-07-06 18:44:55 +08:00
ba430eaa2e mod: up主合集补充 2024-07-06 15:56:25 +08:00
7ae637ed6a feat: 查看up主收藏订阅 2024-07-06 15:37:50 +08:00
b3f1400c04 fix: 评论区跳转笔记 2024-07-06 00:07:02 +08:00
8ac987bfe8 Merge branch 'main' into fix 2024-07-05 23:35:11 +08:00
739e1d9ada opt: AppBar渐变背景 2024-07-05 22:54:21 +08:00
a276aea3da Merge branch 'main' into design 2024-07-03 23:49:10 +08:00
bc842f4da5 Merge branch 'fix' 2024-07-03 23:47:40 +08:00
0d96327f34 fix: 字幕查询越界 2024-07-01 23:11:11 +08:00
2cc43fad57 Merge branch 'main' into fix 2024-07-01 22:39:21 +08:00
3b42cf5ba9 Merge branch 'design' 2024-06-30 22:02:37 +08:00
b1e283beea Merge branch 'fix' 2024-06-30 22:01:50 +08:00
605f0269a5 Merge branch 'feature-sendMsg' 2024-06-30 22:01:40 +08:00
c7ba9dc97b feat: 系统消息 2024-06-30 22:01:12 +08:00
a19129c596 opt: 字幕按钮显隐逻辑 2024-06-30 13:02:50 +08:00
9f1b74b7e2 mod 2024-06-30 00:28:26 +08:00
d004440252 Merge branch 'main' into design 2024-06-29 18:47:56 +08:00
de86dba39d feat: 港澳台模式 2024-06-29 18:47:04 +08:00
eaae622f95 opt: 字幕渲染逻辑 2024-06-29 17:12:06 +08:00
d8b7e99ad7 Merge branch 'main' into fix 2024-06-29 14:30:20 +08:00
0f1d71e9c4 Merge branch 'design' 2024-06-29 14:30:08 +08:00
ea7ae15384 mod: 合集 2024-06-29 14:29:43 +08:00
a63a9a28d7 feat: 最近点赞的视频 2024-06-29 13:53:43 +08:00
af28e8873b Merge branch 'fix' 2024-06-29 10:39:32 +08:00
317046cf41 Merge branch 'design' 2024-06-29 10:39:27 +08:00
6a28ccbf64 fix: 评论内容解析 2024-06-28 23:44:48 +08:00
7301673783 mod: 视频操作区图标 2024-06-28 23:24:42 +08:00
e31ae07848 Merge branch 'main' into design 2024-06-28 00:10:47 +08:00
dbfc31a1df v1.0.24 更新日志 2024-06-26 22:29:11 +08:00
936730d355 Merge branch 'feature-sendMsg' 2024-06-26 22:19:14 +08:00
0031b22902 mod: 未开发功能关闭入口 2024-06-26 22:18:49 +08:00
1c02617005 Merge branch 'design' 2024-06-25 23:51:53 +08:00
7aa02be251 mod 2024-06-25 23:51:32 +08:00
73005c3066 Merge branch 'main' into design 2024-06-25 23:36:06 +08:00
a38696beb5 Merge branch 'feature-sendMsg' 2024-06-25 00:12:18 +08:00
2156e084e6 Merge branch 'fix' 2024-06-25 00:12:03 +08:00
07ebe8f432 Merge branch 'design' 2024-06-25 00:11:59 +08:00
cc32224daf feat: 音频输出方式设置 2024-06-24 23:43:37 +08:00
abfb7a1439 fix: 评论区 /? 链接跳转异常 2024-06-24 23:04:32 +08:00
4fa9bdc380 mod: chatItem布局 2024-06-23 23:23:05 +08:00
c5247b27c7 mod: 消息计数清零 2024-06-23 23:12:04 +08:00
860818de08 Merge branch 'feature-appScheme' 2024-06-20 23:54:49 +08:00
2ebf1356a6 Merge branch 'fix' 2024-06-20 23:54:39 +08:00
6e48c7864a Merge branch 'design' 2024-06-20 23:54:35 +08:00
1db1d8f598 feat: 点击tab返回顶部 2024-06-20 23:38:49 +08:00
4de15ad6b3 opt: _routePush 逻辑分支 2024-06-20 00:06:45 +08:00
9f40b34020 Merge branch 'main' into feature-appScheme 2024-06-19 23:40:08 +08:00
56c0635389 mod: scheme 补充 2024-06-19 23:39:19 +08:00
54c38d8683 opt: 字幕类别补充 2024-06-19 23:17:36 +08:00
35d2d92480 fix: 分集切换字幕未更新 2024-06-18 23:35:38 +08:00
b61d2305a9 opt: 字幕类别补充 2024-06-17 23:51:01 +08:00
75525595c6 opt: 首页tab样式 2024-06-16 20:59:55 +08:00
2503d5cbb4 opt: 搜索结果为空 2024-06-16 19:09:05 +08:00
30f88f78a0 Merge branch 'fix' 2024-06-16 18:43:33 +08:00
4591593bb5 fix: 评论表情丢失 2024-06-16 18:34:32 +08:00
a2210f17f6 fix: 评论区链接重复跳转 2024-06-16 18:24:31 +08:00
06082359f3 Merge branch 'feature-sendMsg' 2024-06-16 18:03:00 +08:00
779f7e7666 feat: 收到的赞 2024-06-16 17:53:46 +08:00
569f7c23fd feat: 回复我的 2024-06-16 13:58:43 +08:00
bfdd996b08 feat: 未读消息计数 2024-06-15 20:34:28 +08:00
46cef5e55b feat: 会话移除 2024-06-15 17:03:52 +08:00
5e63f0da7b feat: 私信 2024-06-15 16:03:45 +08:00
c4441dccb2 Merge branch 'main' into feature-sendMsg 2024-06-14 21:50:55 +08:00
7159c582cd Merge branch 'design' 2024-06-14 21:50:32 +08:00
7d706aa012 Merge branch 'fix' 2024-06-14 21:50:29 +08:00
8038400678 Merge branch 'main' into feature-sendMsg 2024-06-13 23:14:50 +08:00
2873754317 feat: 播放器全屏回调 2024-06-13 23:13:47 +08:00
5afb50cac9 fix: 快进快退触发异常 2024-06-13 22:55:54 +08:00
593f7f1367 Merge branch 'main' into design 2024-06-12 23:38:18 +08:00
ca6f6dd531 Merge branch 'main' into fix 2024-06-12 23:38:00 +08:00
5c3d3cc957 undo: flutter version 3.22.1 -> 3.19.1 2024-06-12 23:37:29 +08:00
42a377fcab Merge branch 'fix' 2024-06-11 22:59:29 +08:00
7af1ebd3d5 fix: 弹幕显示&弹幕设置缓存 2024-06-11 22:59:07 +08:00
9067d4895f Merge branch 'feature-login' 2024-06-11 00:07:09 +08:00
beb5945135 fix: 网络异常时登录状态重置 2024-06-11 00:06:49 +08:00
cf597f1bcf Merge branch 'fix' 2024-06-10 23:46:22 +08:00
857d63ac96 Merge branch 'feature-updateVideoDetailStructure' 2024-06-10 23:46:03 +08:00
11b4b1b0b2 Merge branch 'design' 2024-06-10 23:45:56 +08:00
bc1c38c950 Merge branch 'main' into feature-sendMsg 2024-06-10 16:32:47 +08:00
d632d1c576 Merge branch 'main' into design 2024-06-10 14:55:02 +08:00
e47816d0c8 opt: 一键三连样式 2024-06-10 14:18:59 +08:00
128c9201bd fix: 评论框安全距离 2024-06-10 13:36:23 +08:00
05fea2b941 Merge branch 'main' into fix 2024-06-10 13:17:54 +08:00
c9cc57d14b Merge branch 'feature-updateVideoDetailStructure' 2024-06-10 13:13:08 +08:00
51be62cd26 opt: 一键三连 2024-06-10 12:50:15 +08:00
6e15264d91 Merge branch 'feature-login' 2024-06-10 01:10:13 +08:00
67012e88c2 Merge branch 'feature-updateVideoDetailStructure' 2024-06-10 01:10:07 +08:00
61c29d3082 fix: 跳转登录页 2024-06-10 01:09:28 +08:00
d94ddca905 opt: 三连进度条样式&登录状态判断 2024-06-10 00:58:04 +08:00
9675dcd510 Merge branch 'design' 2024-06-10 00:20:29 +08:00
5b0eeefc09 Merge branch 'feature-updateVideoDetailStructure' 2024-06-09 14:52:31 +08:00
006ba8bc59 feat: 一键三连 2024-06-09 14:51:59 +08:00
3a95b36e43 Merge branch 'main' into feature-updateVideoDetailStructure 2024-06-08 17:59:43 +08:00
be3bffa33c opt: 我的订阅页面布局 2024-06-08 17:54:40 +08:00
b37232931b mod: 默认不调用电池优化 2024-06-08 17:45:27 +08:00
0ada8163b7 Merge branch 'feature-search' 2024-06-08 17:41:45 +08:00
a03d159a86 mod: 内容分区字段 2024-06-08 17:36:55 +08:00
2b05f29c35 Merge branch 'main' into feature-search 2024-06-08 17:09:14 +08:00
d11b32cff7 Merge branch 'fix' 2024-06-08 15:36:06 +08:00
897551bf23 fix: 私信渲染类型错误 2024-06-08 15:35:45 +08:00
345c26d83a Merge branch 'main' into fix 2024-06-08 15:23:46 +08:00
f4b7f77e44 upgrade: new version syntax 2024-06-08 13:29:36 +08:00
57b8ebfa6f Merge branch 'main' into design 2024-06-08 13:16:13 +08:00
6f41683c5d Merge branch 'design' 2024-06-08 04:09:57 +08:00
24e62ca43b Merge branch 'feature-login' 2024-06-08 04:09:42 +08:00
aee52b0247 opt: 消息页面增加骨架屏 2024-06-08 04:09:00 +08:00
3a94281310 feat: web端扫码登录 2024-06-08 03:14:37 +08:00
4912506fb2 Merge branch 'design' 2024-06-08 00:43:45 +08:00
6f020df967 Merge branch 'fix' 2024-06-08 00:43:39 +08:00
0378dde36b Merge branch 'feature-login' 2024-06-08 00:43:22 +08:00
4fe8366c2f upgrade: gt3 plugin 2024-06-08 00:42:45 +08:00
9888aba62e feat: web端密码登录 2024-06-08 00:26:08 +08:00
f8897f74bf feat: web端验证码登录 2024-06-07 23:48:48 +08:00
709e4b4412 Merge branch 'main' into feature-login 2024-06-06 23:36:53 +08:00
7fc4f3fd41 fix: 首页app推荐关注状态判断 2024-06-06 00:28:46 +08:00
e0e1c6b08a upgrade: color 2024-06-04 23:59:23 +08:00
dbbf810dbd Merge branch 'opt-loadingAni' 2024-06-03 23:44:06 +08:00
a0e8918935 Merge branch 'feature-appScheme' 2024-06-03 23:43:46 +08:00
8d6d8932d5 Merge branch 'fix' 2024-06-03 23:43:27 +08:00
d5881452d3 Merge branch 'design' 2024-06-03 23:43:14 +08:00
3b1ad133db mod: logs replace# 2024-06-02 22:32:00 +08:00
accaaa1142 Merge branch 'main' into feature-appScheme 2024-06-02 16:08:11 +08:00
59304760f6 Merge branch 'main' into fix 2024-06-02 01:15:47 +08:00
251f0ed55d Merge branch 'design' 2024-06-02 01:06:35 +08:00
8f26884164 upgrade: 依赖升级 2024-06-02 01:04:51 +08:00
bde44af9a0 opt: main.daat code 2024-06-01 22:43:27 +08:00
2e57e73138 Merge branch 'main' into design 2024-06-01 12:56:06 +08:00
dfc3a1f8c3 Merge branch 'fix' 2024-06-01 12:55:59 +08:00
ac0dc59054 Merge branch 'main' into design 2024-06-01 12:55:34 +08:00
2358ba42e1 opt: pip issues #752 2024-06-01 00:21:04 +08:00
e1572c0962 fix: 锁定状态下避免手势退出全屏 issues #753 2024-05-31 23:37:27 +08:00
b14291ac1c Merge branch 'main' into fix 2024-05-31 23:32:38 +08:00
eef9e3ae9e opt: loading Ani 2024-05-30 23:58:42 +08:00
1283879fb7 Merge branch 'main' of github.com:guozhigq/pilipala_app 2024-05-29 23:58:44 +08:00
67f635aa3c Merge branch 'design' 2024-05-29 23:58:25 +08:00
6b4d24f595 opt: 动态页up主点击 2024-05-28 22:58:51 +08:00
f5bd4266da Merge branch 'main' into design 2024-05-28 22:45:02 +08:00
1c6047a326 Update README.md 2024-05-27 23:54:33 +08:00
063ae01d0a Merge branch 'fix' 2024-05-26 23:19:00 +08:00
4aa47f4a7b fix: pip进入 评论区异常 2024-05-26 23:18:37 +08:00
63d5752d3e fix: 连续快进异常 2024-05-26 17:30:42 +08:00
ccb0265a5f Merge branch 'design' 2024-05-26 16:34:42 +08:00
4bfc6f835f Merge branch 'fix' 2024-05-26 16:34:36 +08:00
5c0edf873b fix: 外链跳转 pic null 2024-05-26 16:26:39 +08:00
d6e24096e0 opt: 视频详情页Hero动画 2024-05-26 15:48:28 +08:00
1cefdb68b7 opt: 骨架屏补充 2024-05-25 16:38:16 +08:00
0d53090b11 Merge branch 'design' 2024-05-25 16:17:03 +08:00
d88603f475 Merge branch 'fix' 2024-05-25 16:16:58 +08:00
8d729549fc Merge branch 'fix-historySearch' 2024-05-25 16:16:45 +08:00
95685c4fdf mod: 历史记录搜索逻辑 2024-05-25 16:16:23 +08:00
732beb38a7 opt: 评论区跳转 2024-05-25 15:31:00 +08:00
f718c7dad5 Merge branch 'main' into fix 2024-05-25 15:11:47 +08:00
c387cb83e7 mod: 收藏夹跳转 2024-05-24 23:54:25 +08:00
7fd5d8240b Merge branch 'design' 2024-05-23 23:23:48 +08:00
58ab9d9810 Merge branch 'main' of github.com:guozhigq/pilipala_app 2024-05-23 23:23:39 +08:00
1bcaea31d9 Merge branch 'design' of github.com:guozhigq/pilipala_app into design 2024-05-23 00:39:03 +08:00
2dfd2d4dc1 opt: 视频操作栏安全区域优化 2024-05-23 00:32:59 +08:00
2619635e2b Merge branch 'main' into design 2024-05-23 00:15:44 +08:00
eea07984f3 Merge pull request #1 from guozhigq/fix
Merge branch 'main' into fix
2024-05-22 23:54:24 +08:00
f8abde0edb Merge branch 'main' into fix 2024-05-22 23:35:05 +08:00
ea718bee33 Merge branch 'main' into feature-updateVideoDetailStructure 2024-05-22 00:02:30 +08:00
5d99d8ed5b Merge branch 'opt-blockUser' 2024-05-21 23:52:22 +08:00
d2be65b76f Merge branch 'design' 2024-05-21 23:52:08 +08:00
ed28e98bba opt: 推荐视频拉黑逻辑 2024-05-20 23:45:38 +08:00
cb7cd0a2f0 feat: videoDetail menu edit 2024-05-19 19:57:13 +08:00
6b165b392f Merge branch 'main' into feature-updateVideoDetailStructure 2024-05-18 19:40:01 +08:00
eae39c480c mod: playInit autoplay 逻辑 2024-05-18 19:29:57 +08:00
9c2364d7ed Merge branch 'main' into design 2024-05-18 19:25:01 +08:00
0ff889b028 Merge branch 'feature-media_kit' 2024-05-18 00:08:31 +08:00
126165ac14 Merge branch 'design' 2024-05-17 23:57:09 +08:00
f23a21f6dc feat: 动态类型补充 2024-05-16 23:04:47 +08:00
37118f96b6 Merge branch 'main' into design 2024-05-16 22:56:01 +08:00
44f2a168ce opt: 播放器单例 2024-05-15 23:55:04 +08:00
c14954cad4 Merge branch 'fix' 2024-05-14 23:52:22 +08:00
31e8ee8d34 fix: 番剧无评分导致的异常 2024-05-13 23:55:17 +08:00
728f279a98 Merge branch 'main' into fix 2024-05-13 23:47:18 +08:00
11e38141c4 Merge branch 'fix' 2024-05-13 23:40:25 +08:00
68d35a7ed8 feat: 搜索分区UI 2024-05-13 23:37:22 +08:00
79bde1b7ff mod: 历史记录长按圆角 2024-05-13 23:16:25 +08:00
44ceb5779a Merge branch 'main' into design 2024-05-12 22:51:49 +08:00
5a10dbaf4c Merge branch 'main' into feature-media_kit 2024-05-12 00:54:24 +08:00
14b7ac438f fix: 直播全屏按钮 2024-05-11 23:50:41 +08:00
b8e3764345 fix: login Box has already been closed 2024-05-10 23:45:51 +08:00
eda3e777fe Merge branch 'fix' 2024-05-09 00:01:56 +08:00
37654c5eab fix: 评论区链接解析 2024-05-09 00:00:59 +08:00
5807999296 mod: scheme BVAV匹配规则 2024-05-08 23:19:29 +08:00
6380c138e8 typo: 历史记录接口 2024-05-08 23:19:02 +08:00
250131d2b0 fix: 分p字幕 2024-05-08 22:42:18 +08:00
c2a176ad2f fix: issues #718 2024-05-07 23:53:31 +08:00
7ff6884342 fix: pathSegments越界 2024-05-07 23:10:27 +08:00
4f10e6a869 fix: 动态未读标记 2024-05-07 00:01:44 +08:00
2fefe32587 mod: 默认不展示升级标识 2024-05-06 23:24:19 +08:00
0162b9614e fix: 评论区链接解析 2024-05-06 23:14:12 +08:00
db824681fd fix: 退出全屏按钮无效 2024-05-05 21:00:12 +08:00
5fab28284a Merge branch 'main' into fix 2024-05-05 20:57:00 +08:00
e62db9d447 Merge branch 'design' 2024-05-05 17:54:13 +08:00
e65389040f feat: 搜索计数 2024-05-05 17:53:54 +08:00
5934015104 Merge branch 'main' into design 2024-05-05 17:07:00 +08:00
ceb1fc2397 Merge branch 'fix' 2024-05-05 17:00:56 +08:00
93d8e19a8c fix: 动态跳转详情异常 2024-05-05 17:00:35 +08:00
15b63b42a2 Merge branch 'fix' 2024-05-05 10:09:49 +08:00
bb4325768f fix: 视频播放器封面异常 2024-05-05 10:06:26 +08:00
06e943027f Merge branch 'main' into fix 2024-05-05 09:43:52 +08:00
15f7c4a802 v1.0.23 更新日志 2024-05-04 23:22:24 +08:00
c64b48b04c Merge branch 'design' 2024-05-03 23:06:29 +08:00
dafbb83863 opt: 媒体库页面登录跳转 2024-05-03 22:58:14 +08:00
21453bb2d8 Merge branch 'main' into design 2024-05-03 22:15:18 +08:00
46f9b18ac3 Merge branch 'fix' 2024-05-03 21:42:30 +08:00
a32be2c5c6 fix: 半屏时播放完成状态栏消失 2024-05-03 21:42:01 +08:00
e6f4702f40 mod: 底部导航栏sdk判断 2024-05-03 21:41:04 +08:00
164da3f28e Merge branch 'fix' 2024-05-03 21:05:29 +08:00
c2873a2138 Merge branch 'design' 2024-05-03 21:05:23 +08:00
81af23e870 mod: MainActivity 2024-05-03 21:04:03 +08:00
0145232f53 Merge branch 'main' into fix 2024-05-03 16:29:55 +08:00
b2eaec15b1 opt: 视频卡片功能拓展 2024-05-03 15:58:54 +08:00
d18e87ef3f Merge branch 'design' 2024-05-02 23:38:30 +08:00
b8efe249de opt: up主投稿跳转番剧 2024-05-02 23:33:58 +08:00
9af748b0fb Merge branch 'design' 2024-05-02 22:19:40 +08:00
61505c6127 opt: RoutePush bangumi 2024-05-02 22:19:20 +08:00
d7c85d17c4 Merge branch 'main' into design 2024-05-02 21:06:04 +08:00
ab525da35d Merge branch 'feature-appScheme' 2024-05-01 23:41:39 +08:00
b85067f7eb opt: 系统级跳转av、bangumi 2024-05-01 23:41:18 +08:00
ebff9987b3 Merge branch 'main' into feature-appScheme 2024-05-01 23:19:30 +08:00
4d432c12ab Merge branch 'fix' 2024-05-01 22:52:13 +08:00
8082550da6 fix: 全屏状态异常 2024-05-01 22:51:55 +08:00
1d8ca1c141 Merge branch 'main' into fix 2024-05-01 22:37:06 +08:00
7bc4a3c633 Merge branch 'fix' 2024-05-01 20:44:58 +08:00
291312bde7 fix: 评论区跳转视频页pic null 2024-05-01 20:44:38 +08:00
91ad0fa03d fix: 查看评论详情点击区域 2024-05-01 20:22:52 +08:00
c6f35e98ed Merge branch 'main' into fix 2024-05-01 20:04:38 +08:00
e7bccbfab2 Merge branch 'fix-coverSave' 2024-05-01 20:04:14 +08:00
af7917ce7a Merge branch 'main' into fix-coverSave 2024-05-01 20:03:10 +08:00
2382768962 Merge branch 'fix' 2024-05-01 20:02:54 +08:00
e361e09ddf fix: 订阅详情type区分 2024-05-01 20:02:34 +08:00
afb354387a Merge branch 'main' into fix 2024-05-01 19:46:46 +08:00
7dbd832a80 feat: 长按保存封面 2024-05-01 19:46:27 +08:00
389747d6f4 v1.0.22 更新日志 2024-04-30 23:30:28 +08:00
013372a825 Merge branch 'fix' 2024-04-30 22:47:19 +08:00
68c73fde56 fix: videoDetail info copy 2024-04-30 22:47:02 +08:00
c4b06358ae Merge branch 'fix' 2024-04-30 22:40:41 +08:00
ba1a5486bf opt: 初始化时记忆播放 2024-04-30 22:40:22 +08:00
ab88b70e27 Merge branch 'main' into feature-updateVideoDetailStructure 2024-04-30 15:52:01 +08:00
c3cf7f2274 Merge branch 'main' into fix 2024-04-30 15:51:50 +08:00
1dd012109a Merge branch 'main' into design 2024-04-30 15:51:37 +08:00
b011805a7e Merge branch 'feature-updateVideoDetailStructure' 2024-04-30 15:51:12 +08:00
bab0985e86 mod: 关注按钮 2024-04-30 15:49:00 +08:00
1b0359efa7 Merge branch 'feature-updateVideoDetailStructure' 2024-04-30 15:35:49 +08:00
124ad62ca7 Merge branch 'fix' 2024-04-29 13:41:49 +08:00
3c8a92209f revert: 评论详情优先展示二级评论 2024-04-29 13:41:25 +08:00
787fac4bdd Merge branch 'fix' 2024-04-29 13:16:47 +08:00
0bb26aa467 fix: videoDetail cover null 2024-04-29 13:16:25 +08:00
3e95479248 Merge branch 'main' into fix 2024-04-28 23:28:03 +08:00
811487bdd4 fix: 重回前台弹幕堆积 2024-04-28 23:03:33 +08:00
06d47dfcc1 Merge branch 'fix' 2024-04-28 22:27:39 +08:00
bc4fb0e0ae fix: videoDetail cover null 2024-04-28 22:27:14 +08:00
90dcb54997 Merge branch 'feature-editNavBar' 2024-04-28 22:03:40 +08:00
8a6b4f987f revert: NavigationBar Color 2024-04-28 22:03:19 +08:00
4b7bc5c7b9 Merge branch 'main' into feature-editNavBar 2024-04-28 08:03:26 +08:00
7c293fc60f Merge branch 'design' 2024-04-28 07:40:20 +08:00
750e9d2b58 revert: 评论详情优先展示二级评论 2024-04-28 07:39:55 +08:00
fd7e2d2a31 Merge branch 'design' 2024-04-28 00:07:18 +08:00
c653a60f05 feat: 活动类型动态渲染 2024-04-28 00:06:08 +08:00
b81dd2b91c Merge branch 'fix' 2024-04-27 22:18:27 +08:00
aff39c291d fix: 合集cover null 2024-04-27 22:17:10 +08:00
d61068cd3f Merge branch 'main' into fix 2024-04-27 22:12:04 +08:00
cbb7b90bf9 mod 2024-04-27 22:11:56 +08:00
d631b0e172 Merge branch 'main' into design 2024-04-27 21:46:04 +08:00
75c37e3de2 Merge branch 'feature-collections' 2024-04-27 20:41:23 +08:00
8cd9a538b9 Merge branch 'design' 2024-04-27 20:41:00 +08:00
257596cb9e mod: 默认关闭硬解 2024-04-27 20:40:23 +08:00
f24291134c feat: 合集封面展示、封面切换 2024-04-27 17:44:19 +08:00
13ca6f3aed Merge branch 'main' into feature-collections 2024-04-27 16:17:24 +08:00
adf969d35d Merge branch 'opt-DialogAction' 2024-04-27 16:08:44 +08:00
0e52e0288c opt: 优化投币Dialog逻辑 2024-04-27 16:08:10 +08:00
89ea456d6d Merge branch 'fix' 2024-04-27 15:32:31 +08:00
29bdbbfe18 mod: playCount calc 2024-04-27 15:32:05 +08:00
6490d31d3d Merge branch 'main' into fix 2024-04-27 12:43:50 +08:00
599afd94b2 Merge branch 'feature-together' 2024-04-27 12:36:42 +08:00
b2e5cc0443 Merge branch 'fix' 2024-04-27 12:36:20 +08:00
0312c8d01d feat: 显示联合投稿up 2024-04-27 12:35:43 +08:00
b752214af3 fix: durl格式视频播放 2024-04-27 01:04:11 +08:00
8273ff2e02 opt: 评论框优化 2024-04-26 23:46:54 +08:00
4e66a3f9e7 opt: 评论详情优先展示二级评论 2024-04-26 23:22:26 +08:00
c6f5bc561c feat: up投稿展示充电专属标签 2024-04-25 23:18:21 +08:00
1f426881f2 mod: 使用feed_version V3推荐 2024-04-25 22:42:42 +08:00
ca58ec1cb0 Merge branch 'main' into design 2024-04-25 22:34:42 +08:00
2b7a566094 Merge branch 'design' 2024-04-25 00:00:17 +08:00
ab45d2e6a6 opt: 首页推荐卡片 2024-04-24 23:56:07 +08:00
31125435b1 opt: 首页推荐栏布局 2024-04-23 23:40:40 +08:00
926c99001e mod: 视频简介增加aid显示 2024-04-22 23:58:36 +08:00
935073ce75 mod: 视频详情页布局调整 2024-04-22 23:51:31 +08:00
fb59ca5e95 Merge branch 'main' into feature-updateVideoDetailStructure 2024-04-22 23:06:20 +08:00
e3b67e1fc6 Merge branch 'main' into design 2024-04-21 22:41:51 +08:00
e4d84e21db Merge branch 'feature-appScheme' 2024-04-21 19:26:21 +08:00
b83ac38c60 mod: scheme 补充 2024-04-21 19:25:42 +08:00
7ad68c7bb3 Merge branch 'main' into fix 2024-04-21 17:38:39 +08:00
45f0a8e015 Merge branch 'feature-dynamicForward' 2024-04-21 17:38:22 +08:00
c42ce2f1f9 mod: 番剧传递aid 2024-04-21 17:38:07 +08:00
9dc7256a00 feat: 投稿番剧评论时转发到动态 2024-04-21 16:47:38 +08:00
a8585c4a76 Merge branch 'feature-dynamicForward' 2024-04-21 15:52:47 +08:00
22d8cf12a0 opt: forward panel 2024-04-21 15:52:16 +08:00
cf8f0fac26 merge favFolder delete 2024-04-21 11:52:38 +08:00
0f8139fac7 Merge branch 'fix' 2024-04-20 23:32:47 +08:00
bc29f69133 opt: streamController close 2024-04-20 23:32:28 +08:00
0edc1bde48 Merge branch 'feature-dynamicForward' 2024-04-20 22:41:35 +08:00
03ce69b140 feat: 动态转发 2024-04-20 22:40:54 +08:00
fcd7781789 feat: 收藏夹删除 2024-04-20 00:55:18 +08:00
254fac144e Merge branch 'fix' 2024-04-19 23:50:22 +08:00
5f0bb44bf1 mod: 获取收藏夹pageSize 2024-04-19 23:43:23 +08:00
e2d07906dd Merge branch 'main' into fix 2024-04-19 23:28:00 +08:00
4bc24be368 Merge branch 'design' 2024-04-19 00:02:31 +08:00
350e349023 feat: ai总结复制功能 2024-04-19 00:01:09 +08:00
11e4f9d3dc Merge branch 'main' into design 2024-04-18 23:44:01 +08:00
61d61a019d Merge branch 'fix-dynamicReply' 2024-04-18 23:35:22 +08:00
3e105804d7 fix: 动态回复页面键盘收起后无法返回 2024-04-18 23:33:55 +08:00
43f2d995a7 Merge branch 'main' into fix 2024-04-18 22:50:24 +08:00
6edd0aa702 Merge branch 'main' of github.com:guozhigq/pilipala_app 2024-04-18 00:02:16 +08:00
f8e8deab8c Merge branch 'feature-playerSubtitle' 2024-04-18 00:01:32 +08:00
7fc2765471 opt: 字幕类别补充 2024-04-18 00:00:19 +08:00
706c134627 Update beta_ci.yml 2024-04-17 23:53:00 +08:00
c0b4aacafe Merge branch 'main' into feature-playerSubtitle 2024-04-17 23:16:12 +08:00
328f96a809 Merge branch 'fix' 2024-04-16 23:48:10 +08:00
038801a3b9 opt: 视频初始化 2024-04-16 23:41:45 +08:00
a8cfe9fa1a fix: seekTo异常 2024-04-16 23:38:03 +08:00
ef7295399b Merge branch 'fix' 2024-04-16 00:11:51 +08:00
76f0d5fba2 fix: zoneController error 2024-04-16 00:11:36 +08:00
adba7b33d3 fix: 预设视频画质异常 2024-04-15 22:59:35 +08:00
2354853689 Merge branch 'main' into fix 2024-04-15 22:28:08 +08:00
65f08e2bd5 Merge branch 'fix' 2024-04-14 17:11:04 +08:00
d943e156d2 fix: 关闭推荐时切换合集失效 2024-04-14 17:10:47 +08:00
3d3f106576 Merge branch 'fix' 2024-04-14 17:00:50 +08:00
e7f46883ed fix: 未开启自动播放时弹幕开关异常 2024-04-14 17:00:29 +08:00
c3a3974b08 Merge branch 'fix' 2024-04-14 00:48:14 +08:00
cc5e370510 fix: 跟随系统主题模式失效 2024-04-14 00:47:40 +08:00
56c8a956a3 Merge branch 'main' into fix 2024-04-14 00:12:51 +08:00
cba33dc303 Merge branch 'feature-collections' 2024-04-13 23:35:07 +08:00
f1334b5505 feat: 番剧选集 2024-04-13 23:34:46 +08:00
2a986218a8 Merge branch 'main' into feature-collections 2024-04-13 23:02:11 +08:00
dee2892d8a Merge branch 'main' into design 2024-04-13 22:58:04 +08:00
e21396c728 Merge branch 'design' 2024-04-13 22:57:41 +08:00
894f4fa68d opt: index为0时合集跳动 2024-04-13 22:57:18 +08:00
d01a54c1cc Merge branch 'feature-updateVideoDetailStructure' 2024-04-13 22:39:47 +08:00
fa1fea0e0b Merge branch 'design' 2024-04-13 18:49:39 +08:00
3fa809484c Merge branch 'fix' 2024-04-13 18:49:33 +08:00
b1c801c8c8 fix: mediaPage stream error 2024-04-13 16:31:28 +08:00
177645db1a Merge branch 'main' into fix 2024-04-13 16:22:14 +08:00
ff5101d3d0 opt: 可拖动标识 2024-04-13 15:46:12 +08:00
83d121fd9c opt: sheetHeight 2024-04-13 15:04:33 +08:00
d03678fea6 Merge branch 'main' into feature-updateVideoDetailStructure 2024-04-13 13:31:49 +08:00
cf206959aa Merge branch 'main' into design 2024-04-13 10:59:23 +08:00
6f31cb15e6 merge design 2024-04-13 10:58:58 +08:00
ea18c926fd Merge branch 'feature-editNavBar' 2024-04-13 10:57:45 +08:00
504d9e2065 opt: stream listener 2024-04-13 10:55:14 +08:00
ef6070aa8b mod: systemNavBarColor 2024-04-13 10:35:06 +08:00
2aa5c5e4b3 Merge branch 'feature-editNavBar' 2024-04-13 01:41:54 +08:00
4f438603ca Merge branch 'fix' 2024-04-13 01:41:44 +08:00
297ad6a46d opt: navBar样式 2024-04-13 01:41:24 +08:00
1076c02a58 fix: android 12权限处理 2024-04-12 23:12:12 +08:00
10435bb7b1 mod: 最近投币视频标题左对齐 2024-04-12 00:01:32 +08:00
8d9a30646b Merge branch 'feature-editNavBar' 2024-04-11 23:30:43 +08:00
c4c0ca38e3 Merge branch 'design' 2024-04-11 23:30:21 +08:00
a74647eb61 opt: 默认不收起顶栏&底栏 2024-04-11 23:29:51 +08:00
4b3dd3ca59 opt: navigationBar展示 2024-04-11 23:26:06 +08:00
815a62d5c2 Merge branch 'main' into fix 2024-04-11 00:01:13 +08:00
ebc4362c2e Merge branch 'feature-updateVideoDetailStructure' 2024-04-10 23:53:44 +08:00
7fd2304431 fix: pip进入时appbarStream异常 2024-04-10 23:52:21 +08:00
f95835d46b Merge branch 'main' into fix 2024-04-10 23:42:49 +08:00
8a08df50e1 Merge branch 'fix' 2024-04-10 23:38:07 +08:00
3f16a36bac fix: 楼中楼评论请求异常 2024-04-10 23:34:59 +08:00
b80bf7728f merge main 2024-04-09 23:51:35 +08:00
87ca412d86 Merge branch 'feature-profile' 2024-04-09 23:42:40 +08:00
9f9471d7f9 fix: up主页专栏视频时长显示 2024-04-09 23:42:09 +08:00
bd1faa79c3 Merge branch 'feature-liveRoomRender' 2024-04-09 23:33:42 +08:00
04bfc29452 feat: 直播间刷新 2024-04-09 23:33:13 +08:00
81a5d62600 Merge branch 'feature-headerControl' 2024-04-09 23:23:23 +08:00
ca37d45eb9 fix: 全屏切换合集视频标题未更新 2024-04-09 23:22:57 +08:00
2fec56979d Merge branch 'feature-dlna' 2024-04-08 23:56:17 +08:00
84f83c260a feat: 简单实现投屏 2024-04-08 23:55:29 +08:00
b9e93dabe6 Update beta_ci.yml 2024-04-08 23:45:54 +08:00
98a181fcdb Merge branch 'main' of github.com:guozhigq/pilipala_app 2024-04-08 23:44:28 +08:00
04b9b7a35a Merge branch 'fix' 2024-04-08 23:43:34 +08:00
2bd97f800e Update beta_ci.yml 2024-04-08 23:43:25 +08:00
48f0b59701 mod: 相册、存储权限判断 2024-04-08 23:33:43 +08:00
42673bd434 Merge branch 'feature-subscription' 2024-04-07 23:51:27 +08:00
aeca7c614e Merge branch 'feature-editNavBar' 2024-04-07 23:51:20 +08:00
9ee0f6526c mod: 订阅视频类型补充 2024-04-07 23:48:27 +08:00
9c12c21796 mod: navigation Bar编辑 2024-04-07 23:13:51 +08:00
f90e40a490 Merge branch 'feature-collections' 2024-04-06 22:24:09 +08:00
46c975bbbb mod: 合集按钮展示逻辑 2024-04-06 21:57:57 +08:00
c2a4d80c79 feat: 全屏选择合集 2024-04-06 21:32:29 +08:00
d1e83e4d1c Merge branch 'main' into feature-collections 2024-04-06 15:33:41 +08:00
1730672b15 Merge branch 'feature-collections' 2024-04-06 15:32:44 +08:00
ce56072995 mod: 更新播放器底栏配置 2024-04-06 15:32:08 +08:00
d4212f88c5 feat: 投稿、番剧合集整理 2024-04-06 15:26:53 +08:00
a5494484ae mod: 更新播放器底栏配置 2024-04-06 11:30:53 +08:00
99645c7b4a fix: seekTo multiple trigger 2024-04-05 23:20:44 +08:00
bec619111b Merge branch 'fix' 2024-04-05 22:20:51 +08:00
0d0e0b9adb fix: 关注按钮状态异常 2024-04-05 22:19:45 +08:00
7aa7ca1e70 Merge branch 'fix' 2024-04-05 20:07:30 +08:00
ec7762644b mod: findClosestNumber 2024-04-05 00:02:31 +08:00
5500a58c32 mod: 优化selectDialog选择逻辑 2024-04-05 00:02:31 +08:00
247f6ee0a7 mod: findClosestNumber 2024-04-04 23:59:53 +08:00
b58df720fd mod: 优化selectDialog选择逻辑 2024-04-04 23:41:16 +08:00
2ba72e3792 Update README.md 2024-04-03 23:59:24 +08:00
25c416f9bf Merge branch 'fix' 2024-04-03 23:20:44 +08:00
9ec9fc2830 Merge branch 'feature-updateVideoDetailStructure' 2024-04-03 23:20:21 +08:00
74f6b0ad1e fix: 评论框切换action时高度跳动 2024-04-02 23:58:27 +08:00
3fa72f5340 Merge branch 'main' into fix 2024-04-02 23:31:45 +08:00
c0f3b4f3a2 fix: 全屏时展示弹幕操作 2024-04-02 23:13:15 +08:00
c6de1fa95a mod: 评论b23.tv链接匹配 issue 2024-04-02 00:09:44 +08:00
da9828a295 mod: 个人主页样式修改 2024-04-02 00:09:44 +08:00
e212a32763 feat: 启动时清除日志 issues #656 2024-04-02 00:09:44 +08:00
a20217bf39 opt: 向下查找可用视频清晰度 2024-04-02 00:09:44 +08:00
469a5ec691 mod: 个人主页样式修改 2024-04-01 23:03:31 +08:00
8897c4dd5b feat: 启动时清除日志 issues #656 2024-03-31 11:11:50 +08:00
336feb4fda fix: utils timeFormat error 2024-03-31 00:38:08 +08:00
53b103b853 fix: utils timeFormat error 2024-03-31 00:27:39 +08:00
fd54915399 fix: 历史记录进度条 2024-03-30 22:30:18 +08:00
157726c4c6 Merge branch 'feature-subscription' 2024-03-30 22:25:56 +08:00
25272d6d1b Merge branch 'feature-historyProgress' 2024-03-30 22:25:30 +08:00
af1163f6e0 fix: 历史记录进度条 2024-03-30 22:17:37 +08:00
b689db16b5 Merge branch 'main' into feature-media_kit 2024-03-30 17:13:09 +08:00
d003f864ce feat: 订阅取消 issues #658 2024-03-30 17:01:32 +08:00
dd7b226351 Merge branch 'main' into feature-subscription 2024-03-30 16:40:10 +08:00
6c2eab86e9 fix: 视频标题展开 2024-03-30 00:09:31 +08:00
d806de7d8f feat: 播放记录进度条展示 2024-03-30 00:09:31 +08:00
5cb3e578a8 Merge branch 'feature-updateVideoDetailStructure' 2024-03-29 00:02:36 +08:00
8f9fbf5d41 fix: 视频标题展开 2024-03-29 00:01:17 +08:00
53941469ce opt: 向下查找可用视频清晰度 2024-03-28 00:29:22 +08:00
eb73680296 Merge branch 'main' into design 2024-03-28 00:27:28 +08:00
9845f0383a Merge branch 'feature-historyProgress' 2024-03-28 00:00:46 +08:00
fb3be848b4 feat: 播放记录进度条展示 2024-03-28 00:00:27 +08:00
7d7df17317 Merge branch 'fix' 2024-03-27 23:47:18 +08:00
aae08d0688 fix: 最热/最新评论标识未刷新 2024-03-27 23:44:07 +08:00
9fe5b78cfa Merge branch 'fix' 2024-03-27 23:37:07 +08:00
6b028c36af mod: 搜索专栏副标题转义 2024-03-27 23:34:59 +08:00
92c385ff58 Merge branch 'fix' 2024-03-27 23:28:09 +08:00
463ee1d5b5 mod: 标题转义补充 2024-03-27 23:27:53 +08:00
0a416c95bc Merge branch 'main' into fix 2024-03-27 23:20:10 +08:00
ed8443ba02 feat: navigation Bar编辑 2024-03-27 22:26:47 +08:00
3d09d80007 Merge branch 'feature-rank' 2024-03-26 22:14:41 +08:00
fffa15faa3 merge 2024-03-26 22:14:36 +08:00
d6b972a8ab mod: 弹幕图标颜色&稍后再看 2024-03-26 22:13:01 +08:00
d6fd299395 fix: tabbar指示器抖动 2024-03-25 22:25:05 +08:00
1953653044 Merge branch 'main' into feature-rank 2024-03-25 22:19:16 +08:00
9faa625d52 Merge branch 'feature-playerSubtitle' 2024-03-24 23:27:45 +08:00
955d8f5401 feat: 简单实现字幕功能 2024-03-24 23:25:45 +08:00
1f75a7e781 fix: appbar滑动距离移除 2024-03-24 16:54:19 +08:00
2cd8ab7d27 mod: 视频详情页简介查看&操作栏 2024-03-24 16:54:19 +08:00
7e7bb1f43a fix: appbar滑动距离移除 2024-03-24 16:53:20 +08:00
a925ef63eb mod: 视频详情页简介查看&操作栏 2024-03-24 16:53:20 +08:00
f8326e7cb5 fix: appbar滑动距离移除 2024-03-24 16:17:02 +08:00
02d2598d01 mod: 视频详情页简介查看&操作栏 2024-03-24 16:03:18 +08:00
862ccea879 Merge branch 'main' into feature-playerSubtitle 2024-03-24 13:48:15 +08:00
031d57e1fd opt: 排行榜切换tab数据缓存 2024-03-24 13:47:54 +08:00
77b509fd17 opt: 排行榜切换tab数据缓存 2024-03-24 13:42:40 +08:00
53b72bec25 mod: read schame补充 2024-03-24 13:16:13 +08:00
20745a4541 Merge branch 'main' into feature-appScheme 2024-03-24 11:44:02 +08:00
4db5a950f3 mod: 弹幕开关状态 2024-03-24 11:43:44 +08:00
c9327c97e5 fix: 评论投票message重复 2024-03-24 11:43:44 +08:00
8ff387d54a mod: 评论头部样式 2024-03-24 11:43:44 +08:00
11e907d74b mod: 弹幕开关状态 2024-03-24 10:48:45 +08:00
6298711528 Merge branch 'main' into feature-updateVideoDetailStructure 2024-03-24 10:43:24 +08:00
b1e80c298e Merge branch 'main' into design 2024-03-23 21:56:59 +08:00
72f1a82650 bump: sdk&dependencies 2024-03-23 19:44:37 +08:00
57f7628795 Merge branch 'main' into feature-customBottomControl 2024-03-23 18:13:47 +08:00
b5a46d1be0 feat: 接收自定义组件传入 2024-03-23 18:03:33 +08:00
7b15f19895 fix: 详情页TabBar布局异常 2024-03-23 18:00:52 +08:00
14338dc33d fix: 详情页TabBar布局异常 2024-03-23 17:23:51 +08:00
c216c9bd65 mod: tabbar样式&增加评论数 2024-03-21 23:51:43 +08:00
3701fdef97 Merge branch 'fix-scrollSetVolume' 2024-03-21 23:40:55 +08:00
59641f0216 Merge branch 'fix' 2024-03-21 23:40:30 +08:00
4dbcd2e0ec fix: 尝试修复音量调节抖动 issues #647 #498 #104 #198 2024-03-21 23:39:56 +08:00
6d276fce4c fix: 媒体库无法滑动 2024-03-21 00:03:20 +08:00
0f0546ae59 Merge branch 'main' into feature-rank 2024-03-20 23:30:04 +08:00
710361caea fix: 历史记录相关错误 2024-03-20 23:21:41 +08:00
00b81b194f Merge branch 'fix-issues#620' 2024-03-20 00:13:51 +08:00
734db176bf Merge branch 'main' into fix 2024-03-20 00:08:37 +08:00
c23fe9c2bf Merge branch 'main' into feature-updateVideoDetailStructure 2024-03-20 00:07:35 +08:00
79fcd017ab mod: tabbar样式&增加评论数 2024-03-20 00:07:00 +08:00
76784ee664 mod: seekTo 2024-03-19 23:33:32 +08:00
2dbef3fee2 mod: media_kit引入 2024-03-19 23:23:14 +08:00
3a66c8c03d Merge branch 'main' into feature-media_kit 2024-03-19 23:15:06 +08:00
64292d523f fix: player fit rebuild 2024-03-18 22:13:15 +08:00
42ed67e03f merge main 2024-03-17 22:42:46 +08:00
af96d16062 feat: 电池优化 2024-03-17 14:45:40 +08:00
12c299685b Merge branch 'feature-removeLockIcon' 2024-03-17 14:35:14 +08:00
1182a58cb4 Merge branch 'fix' 2024-03-17 14:30:26 +08:00
e04a7e5702 fix: 图片保存命名、质量、权限问题 2024-03-17 14:29:39 +08:00
e9dc6f7fdb Merge branch 'main' into fix 2024-03-17 01:13:54 +08:00
25d1ccc87a Merge branch 'feature-liveRoomRender' 2024-03-17 00:38:19 +08:00
33d28f51d1 feat: 未登录状态切换直播画质提示 2024-03-17 00:36:00 +08:00
a37f3b8b5b Merge branch 'main' into feature-liveRoomRender 2024-03-16 23:35:18 +08:00
a57f5e8b2f Merge branch 'main' of github.com:guozhigq/pilipala 2024-03-16 23:12:52 +08:00
beb640ac83 Merge branch 'fix-bangumi' 2024-03-16 23:12:31 +08:00
1b54f07bc3 merge main 2024-03-16 23:11:47 +08:00
fca0588377 Merge pull request #628 from guozhigq/feature-customBottomControl
Feature custom bottom control
2024-03-16 23:08:22 +08:00
4865948609 Merge branch 'fix-whisperRenderError' 2024-03-16 23:07:01 +08:00
09eb180fc7 Merge branch 'main' of github.com:guozhigq/pilipala 2024-03-16 23:06:18 +08:00
3fab47780b Merge pull request #635 from guozhigq/feature-videoDetailCodeCleanUp
feat: 视频番剧详情页代码整理
2024-03-16 23:05:58 +08:00
453cbd7b1c Merge branch 'main' of github.com:guozhigq/pilipala 2024-03-16 23:03:09 +08:00
0bf2326c73 Merge branch 'feature-updateVideoDetailStructure' 2024-03-16 23:02:43 +08:00
2985c624ab mod: stream close 2024-03-16 23:02:21 +08:00
32cbc2759e Merge branch 'main' into feature-updateVideoDetailStructure 2024-03-16 22:52:15 +08:00
13c77957fe fix: 番剧badge 2024-03-16 22:48:47 +08:00
f382c8f377 Merge pull request #632 from kalac2232/main
feature: 动态页跳转登录
2024-03-16 21:56:18 +08:00
491bc87251 fix: 私信列表渲染异常 issues #295 2024-03-15 23:26:43 +08:00
b13d7b475b feat: 非全屏状态下隐藏锁定按钮 2024-03-14 23:49:36 +08:00
5e8d9b524b Merge branch 'fix-favoritesCalc' 2024-03-14 23:31:00 +08:00
606f1b5c64 fix: 收藏夹详情计数错误 issues #637 2024-03-14 23:30:18 +08:00
c4fec14517 Merge branch 'main' into fix-favoritesCalc 2024-03-14 23:23:41 +08:00
f368ef83ee Merge branch 'fix' 2024-03-14 23:23:27 +08:00
357133fa97 fix:去除无用的setState 2024-03-14 10:00:32 +08:00
337cdafef3 typo: vdCtr 2024-03-14 00:18:03 +08:00
bc74e32c10 Merge branch 'main' into fix 2024-03-14 00:17:09 +08:00
a5558de872 Merge branch 'feature-hiddenRelateVideo' 2024-03-14 00:15:24 +08:00
73693c5bbb Merge branch 'feature-updateVideoDetailStructure' 2024-03-14 00:11:34 +08:00
2ad9c3c993 merge main 2024-03-14 00:11:04 +08:00
cab74cff17 Merge branch 'main' of github.com:guozhigq/pilipala 2024-03-14 00:08:52 +08:00
a161df2c7b Merge pull request #627 from guozhigq/feature-updateVideoDetailStructure
Feature update video detail structure
2024-03-14 00:08:32 +08:00
4def3ffb80 Merge branch 'fix' 2024-03-14 00:06:20 +08:00
da2bbeedff mod: 默认直播画质设置 2024-03-13 23:12:34 +08:00
70317f92e2 mod: 视频详情页结构优化 2024-03-13 22:42:34 +08:00
bc9ea43cd2 feat: 视频番剧详情页代码整理 2024-03-12 23:45:22 +08:00
882957e2f8 feature:动态页的错误按钮在未登录状态下的按钮为直接跳转登录页 2024-03-12 14:34:32 +08:00
d3766ae31b typo: dynamic type 2024-03-11 23:35:07 +08:00
641cf4ebb3 Merge branch 'main' of github.com:guozhigq/pilipala 2024-03-11 23:32:39 +08:00
99e6abdad9 feat: 相关视频推荐开关 issues #585 2024-03-11 23:31:20 +08:00
ab10223eca feat: 接收自定义组件传入 2024-03-11 23:03:50 +08:00
1eb2d23fb9 merge main 2024-03-11 22:36:36 +08:00
98aaca286b feat: 直播画质切换 2024-03-11 00:02:11 +08:00
dc1edf7e73 Merge pull request #624 from yeqiling/feature-rank
feat:支持排行榜功能
2024-03-10 22:58:47 +08:00
31405750e6 mod: 视频详情页布局 2024-03-10 22:44:07 +08:00
6fdfcb888d feat: 播放器底部控制栏自定义 2024-03-10 19:41:23 +08:00
3ece2bb173 feat: 系统倍速可编辑 2024-03-10 17:57:24 +08:00
b7b75e956f fix: 删除单个搜索历史无效 2024-03-10 16:13:11 +08:00
bf37c33291 feat:支持排行榜功能 2024-03-09 19:39:21 +08:00
06fb3e8d2f fix: 请求github异常 2024-03-09 01:25:54 +08:00
504be6fbda fix: 搜索结果类型为课堂时渲染异常 2024-03-09 01:18:26 +08:00
df4539a035 fix: github链接 issues #618 2024-03-08 23:15:48 +08:00
a3e1fd4e91 fix: 清除缓存提示 issues #619 2024-03-08 23:09:52 +08:00
f41bb02bae fix: 合集最后一p不显示 issues #620 2024-03-08 23:05:09 +08:00
105a29f311 feat: disable Battery Optimization 2024-03-08 22:56:16 +08:00
3bf6136bc6 fix: 楼中楼评论请求重复 #284 2024-03-08 00:03:34 +08:00
ab24da5f55 fix: 媒体通知进度条未按预期停止 2024-03-07 23:35:39 +08:00
ed0b43eff1 v1.0.21 更新日志 2024-03-06 23:29:18 +08:00
ab9ae3a481 fix: setState() called after dispose() 导致全屏失效 2024-03-06 00:04:52 +08:00
d728b1fb6d mod: 评论区非正常地址判断 2024-03-05 23:39:05 +08:00
12e947ef84 fix: reply callback null error issues #615 2024-03-05 23:21:51 +08:00
3fad86e7e3 fix: 视频简介被遮挡 issues #613 2024-03-05 23:04:59 +08:00
fea70011cb fix: navBars unmodifiable issues #612 2024-03-05 23:01:23 +08:00
32cdb27f7c fix: enableGradientBg未定义 2024-03-05 22:37:52 +08:00
eb4435045b fix: 番剧全屏时title取值异常 2024-03-04 23:48:01 +08:00
f1b829cec1 fix: 首页tarbar指示器跳动 2024-03-04 08:29:01 +08:00
ee368d348d feat: 字幕展示 2024-02-27 22:50:02 +08:00
6f62837495 mod: media_kit依赖 2024-02-02 23:12:04 +08:00
394 changed files with 29118 additions and 12529 deletions

View File

@ -4,7 +4,7 @@ on:
workflow_dispatch:
push:
branches:
- "main"
- "never"
paths-ignore:
- "**.md"
- "**.txt"
@ -95,7 +95,7 @@ jobs:
if: steps.cache-flutter.outputs.cache-hit != 'true'
uses: subosito/flutter-action@v2
with:
flutter-version: 3.16.5
flutter-version: 3.19.6
channel: any
- name: 下载项目依赖
@ -205,4 +205,4 @@ jobs:
method: sendFile
path: Pilipala-Beta/*
parse_mode: Markdown
context: "*Beta版本: v${{ needs.update_version.outputs.new_version }}*\n更新内容: [${{ needs.update_version.outputs.last_commit }}](${{ github.event.head_commit.url }})"
context: "*Beta版本: v${{ needs.update_version.outputs.new_version }}*\n更新内容: [${{ needs.update_version.outputs.last_commit }}]"

View File

@ -36,7 +36,7 @@ jobs:
if: steps.cache-flutter.outputs.cache-hit != 'true'
uses: subosito/flutter-action@v2
with:
flutter-version: 3.16.5
flutter-version: 3.19.6
channel: any
- name: 下载项目依赖
@ -98,7 +98,7 @@ jobs:
uses: subosito/flutter-action@v2.10.0
with:
cache: true
flutter-version: 3.16.5
flutter-version: 3.19.6
- name: flutter build ipa
run: |

View File

@ -26,15 +26,50 @@
Xcode 13.4 不支持**auto_orientation**,请注释相关代码
```bash
[] Flutter (Channel stable, 3.16.4, on macOS 14.1.2 23B92 darwin-arm64, locale
zh-Hans-CN)
[!] Flutter (Channel [user-branch], 3.19.6, on macOS 14.6.1 23G93 darwin-arm64,
locale zh-Hans-CN)
! Flutter version 3.19.6 on channel [user-branch] at
/Users/rr/Documents/sdk/flutter
Currently on an unknown channel. Run `flutter channel` to switch to an
official channel.
If that doesn't fix the issue, reinstall Flutter by following instructions
at https://flutter.dev/docs/get-started/install.
! Upstream repository unknown source is not a standard remote.
Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss
this error.
• Framework revision 54e66469a9 (8 months ago), 2024-04-17 13:08:03 -0700
• Engine revision c4cd48e186
• Dart version 3.3.4
• DevTools version 2.31.1
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
• If those were intentional, you can disregard the above warnings; however
it is recommended to use "git" directly to perform update checks and
upgrades.
[] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/rr/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /Applications/Android
Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)
• All Android licenses accepted.
[] Xcode - develop for iOS and macOS (Xcode 15.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15C65
• CocoaPods version 1.14.3
[] Chrome - develop for the web
[] Android Studio (version 2022.3)
[] VS Code (version 1.85.1)
[] Connected device (3 available)
[] Network resources
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[] Android Studio (version 2024.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)
```
@ -44,6 +79,9 @@ Xcode 13.4 不支持**auto_orientation**,请注释相关代码
## 技术交流
Telegram: https://t.me/+lm_oOVmF0RJiODk1
Tg Beta版本@PiliPala_Beta
QQ频道: https://pd.qq.com/s/365esodk3
@ -91,7 +129,7 @@ QQ频道: https://pd.qq.com/s/365esodk3
- [x] 音质选择(视视频而定)
- [x] 解码格式选择(视视频而定)
- [x] 弹幕
- [ ] 字幕
- [x] 字幕
- [x] 记忆播放
- [x] 视频比例:高度/宽度适应、填充、包含等

View File

@ -1,3 +1,9 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
@ -6,10 +12,6 @@ if (localPropertiesFile.exists()) {
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
@ -21,9 +23,6 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystorePropertiesFile = rootProject.file('key.properties')
def keystoreProperties = new Properties()
@ -37,8 +36,9 @@ def _keyAlias = System.getenv("KEY_ALIAS") ?: keystoreProperties["keyAlias"]
def _keyPassword = System.getenv("KEY_PASSWORD") ?: keystoreProperties["keyPassword"]
android {
namespace "com.guozhigq.pilipala"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
ndkVersion "27.0.12077973"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
@ -91,9 +91,6 @@ flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
ext.abiCodes = ["x86_64": 1, "armeabi-v7a": 2, "arm64-v8a": 3]
import com.android.build.OutputFile

4
android/app/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,4 @@
# missing R8 error
-dontwarn javax.annotation.Nullable
-dontwarn org.conscrypt.Conscrypt
-dontwarn org.conscrypt.OpenSSLProvider

View File

@ -12,7 +12,6 @@
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
</intent>
</queries>
<queries>
<intent>
@ -20,7 +19,6 @@
"android.support.customtabs.action.CustomTabsService" />
</intent>
</queries>
<queries>
<!-- If your app checks for http support -->
<intent>
@ -34,7 +32,6 @@
<data android:scheme="https" />
</intent>
</queries>
<application
android:label="PiliPala"
android:name="${applicationName}"
@ -45,15 +42,16 @@
android:fullBackupContent="false"
tools:replace="android:allowBackup">
<activity
android:name="com.ryanheise.audioservice.AudioServiceActivity"
android:name="com.guozhigq.pilipala.MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:launchMode="singleTask"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"
android:supportsPictureInPicture="true"
android:resizeableActivity="true"
android:autoVerify="true"
>
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
@ -63,10 +61,21 @@
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<meta-data android:name="flutter_deeplinking_enabled" android:value="false" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<!-- Deep Link -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.SEARCH" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="pili"/>
<data android:scheme="pilipala"/>
</intent-filter>
<!-- App Link -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.SEARCH" />
@ -132,102 +141,55 @@
<data android:scheme="bilibili" android:host="assistant" />
<data android:scheme="bilibili" android:host="feedback" />
<data android:scheme="bilibili" android:host="auth" android:path="/launch" />
<data android:scheme="http" android:host="live.bilibili.com"
android:pathPattern="/live/.*" />
<data android:scheme="https" android:host="live.bilibili.com"
android:pathPattern="/live/.*" />
<data android:scheme="http" android:host="www.bilibili.com"
android:pathPattern="/video/.*" />
<data android:scheme="https" android:host="www.bilibili.com"
android:pathPattern="/video/.*" />
<data android:scheme="http" android:host="www.bilibili.tv"
android:pathPattern="/video/.*" />
<data android:scheme="https" android:host="www.bilibili.tv"
android:pathPattern="/video/.*" />
<data android:scheme="http" android:host="www.bilibili.cn"
android:pathPattern="/video/.*" />
<data android:scheme="https" android:host="www.bilibili.cn"
android:pathPattern="/video/.*" />
<data android:scheme="http" android:host="www.bilibili.com"
android:pathPattern="/mobile/video/.*" />
<data android:scheme="https" android:host="www.bilibili.com"
android:pathPattern="/mobile/video/.*" />
<data android:scheme="http" android:host="m.bilibili.com"
android:pathPattern="/video/.*" />
<data android:scheme="https" android:host="m.bilibili.com"
android:pathPattern="/video/.*" />
<data android:scheme="http" android:host="www.bilibili.com"
android:pathPattern="/story/.*" />
<data android:scheme="https" android:host="www.bilibili.com"
android:pathPattern="/story/.*" />
<data android:scheme="http" android:host="www.bilibili.com"
android:pathPattern="/bangumi/i/.*" />
<data android:scheme="https" android:host="www.bilibili.com"
android:pathPattern="/bangumi/i/.*" />
<data android:scheme="http" android:host="www.bilibili.com"
android:pathPattern="/mobile/bangumi/i/.*" />
<data android:scheme="https" android:host="www.bilibili.com"
android:pathPattern="/mobile/bangumi/i/.*" />
<data android:scheme="http" android:host="bangumi.bilibili.com"
android:pathPattern="/.*" />
<data android:scheme="https" android:host="bangumi.bilibili.com"
android:pathPattern="/.*" />
<data android:scheme="http" android:host="www.bilibili.com"
android:pathPattern="/bangumi/.*" />
<data android:scheme="https" android:host="www.bilibili.com"
android:pathPattern="/bangumi/.*" />
<data android:scheme="http" android:host="m.bilibili.com"
android:pathPattern="/bangumi/.*" />
<data android:scheme="https" android:host="m.bilibili.com"
android:pathPattern="/bangumi/.*" />
<data android:scheme="http" android:host="www.bilibili.com"
android:pathPattern="/cheese/play/ss.*" />
<data android:scheme="https" android:host="www.bilibili.com"
android:pathPattern="/cheese/play/ss.*" />
<data android:scheme="http" android:host="www.bilibili.com"
android:pathPattern="/cheese/play/ep.*" />
<data android:scheme="https" android:host="www.bilibili.com"
android:pathPattern="/cheese/play/ep.*" />
<data android:scheme="http" android:host="m.bilibili.com"
android:pathPattern="/bangumi/play/ss.*" />
<data android:scheme="https" android:host="m.bilibili.com"
android:pathPattern="/cheese/play/ss.*" />
<data android:scheme="http" android:host="m.bilibili.com"
android:pathPattern="/cheese/play/ep.*" />
<data android:scheme="https" android:host="m.bilibili.com"
android:pathPattern="/cheese/play/ep.*" />
<data android:scheme="http" android:host="www.bilibili.com"
android:pathPattern="/read/cv.*" />
<data android:scheme="https" android:host="www.bilibili.com"
android:pathPattern="/read/cv.*" />
<data android:scheme="http" android:host="www.bilibili.com" android:path="/review/" />
<data android:scheme="https" android:host="www.bilibili.com" android:path="/review/" />
<data android:scheme="http" android:host="bilibili.cn"
android:pathPattern="/video/.*" />
<data android:scheme="https" android:host="bilibili.cn"
android:pathPattern="/video/.*" />
<data android:scheme="http" android:host="bilibili.com"
android:pathPattern="/video/.*" />
<data android:scheme="https" android:host="bilibili.com"
android:pathPattern="/video/.*" />
<data android:scheme="http" android:host="www.bilibili.cn"
android:pathPattern="/video/.*" />
<data android:scheme="https" android:host="www.bilibili.cn"
android:pathPattern="/video/.*" />
<data android:scheme="http" android:host="www.bilibili.com"
android:pathPattern="/video/.*" />
<data android:scheme="https" android:host="www.bilibili.com"
android:pathPattern="/video/.*" />
<data android:scheme="http" android:host="www.bilibili.com"
android:pathPattern="/mobile/video/.*" />
<data android:scheme="https" android:host="www.bilibili.com"
android:pathPattern="/mobile/video/.*" />
<data android:scheme="https" android:host="b23.tv"
android:pathPattern="/*" />
<data android:scheme="https" android:host="space.bilibili.com"
android:pathPattern="/*" />
</intent-filter>
</activity>
<service
@ -239,7 +201,6 @@
<action android:name="android.media.browse.MediaBrowserService" />
</intent-filter>
</service>
<receiver
android:name="com.ryanheise.audioservice.MediaButtonReceiver"
android:exported="true"
@ -247,7 +208,7 @@
<intent-filter>
<action android:name="android.intent.action.MEDIA_BUTTON" />
</intent-filter>
</receiver>
</receiver>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
@ -269,4 +230,4 @@
-->
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
</manifest>
</manifest>

View File

@ -1,6 +1,8 @@
package com.guozhigq.pilipala
import io.flutter.embedding.android.FlutterActivity
// import io.flutter.embedding.android.FlutterActivity
import com.ryanheise.audioservice.AudioServiceActivity;
class MainActivity: FlutterActivity() {
class MainActivity: AudioServiceActivity() {
}

View File

@ -1,15 +1,3 @@
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
@ -20,6 +8,15 @@ allprojects {
rootProject.buildDir = '../build'
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
project.android {
if (namespace == null) {
namespace project.group
}
}
}
}
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {

View File

@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip

View File

@ -1,11 +1,25 @@
include ':app'
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.7.2" apply false
id "org.jetbrains.kotlin.android" version "1.9.0" apply false
}
include ":app"

BIN
assets/images/coin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" data-pointer="none" viewBox="0 0 24 24"><path fill-rule="evenodd" d="m8.085 4.891-.999-1.499a1.008 1.008 0 0 1 1.679-1.118l1.709 2.566c.54-.008 1.045-.012 1.515-.012h.13c.345 0 .707.003 1.088.007l1.862-2.59a1.008 1.008 0 0 1 1.637 1.177l-1.049 1.46c.788.02 1.631.046 2.53.078 1.958.069 3.468 1.6 3.74 3.507.088.613.13 2.158.16 3.276l.001.027c.01.333.017.63.025.856a.987.987 0 0 1-1.974.069c-.008-.23-.016-.539-.025-.881v-.002c-.028-1.103-.066-2.541-.142-3.065-.143-1.004-.895-1.78-1.854-1.813-2.444-.087-4.466-.13-6.064-.131-1.598 0-3.619.044-6.063.13a2.037 2.037 0 0 0-1.945 1.748c-.15 1.04-.225 2.341-.225 3.904 0 1.874.11 3.474.325 4.798.154.949.95 1.66 1.91 1.708a97.58 97.58 0 0 0 5.416.139.988.988 0 0 1 0 1.975c-2.196 0-3.61-.047-5.513-.141A4.012 4.012 0 0 1 2.197 17.7c-.236-1.446-.351-3.151-.351-5.116 0-1.64.08-3.035.245-4.184A4.013 4.013 0 0 1 5.92 4.96c.761-.027 1.483-.05 2.164-.069Zm4.436 4.707h-1.32v4.63h2.222v.848h-2.618v1.078h2.431a5.01 5.01 0 0 1 3.575-3.115V9.598h-1.276a8.59 8.59 0 0 0 .748-1.42l-1.089-.384a14.232 14.232 0 0 1-.814 1.804h-1.518l.693-.308a8.862 8.862 0 0 0-.814-1.408l-1.045.352c.297.396.572.847.825 1.364Zm-4.18 3.564.154-1.485h1.98V8.289h-3.2v.979h2.067v1.43H7.483l-.308 3.454h2.277c0 1.166-.044 1.925-.12 2.277-.078.352-.386.528-.936.528-.308 0-.616-.022-.902-.055l.297 1.067.062.004c.285.02.551.04.818.04 1.001-.066 1.562-.418 1.694-1.056.11-.638.176-1.903.176-3.795h-2.2Zm7.458.11v-.858h-1.254v.858H15.8Zm-2.376-.858v.858h-1.199v-.858h1.2Zm-1.199-.946h1.2v-.902h-1.2v.902Zm2.321 0v-.902H15.8v.902h-1.254Zm3.517 10.594a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-.002-1.502a2.5 2.5 0 0 1-2.217-3.657l3.326 3.398a2.49 2.49 0 0 1-1.109.259Zm2.5-2.5c0 .42-.103.815-.286 1.162l-3.328-3.401a2.5 2.5 0 0 1 3.614 2.239Z" clip-rule="evenodd"></path></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" data-pointer="none" viewBox="0 0 24 24" id="svgcontent" overflow="visible" width="24" height="24" x="597" y="286"><g class="layer" style="pointer-events:all"><title style="pointer-events:inherit">Layer 1</title><path fill-rule="evenodd" d="M11.99,4.83C11.52,4.83 11.01,4.83 10.47,4.84L8.76,2.27A1.01,1.01 0 0 0 7.09,3.39L8.08,4.89C7.4,4.91 6.68,4.93 5.92,4.96A4.01,4.01 0 0 0 2.09,8.4C1.93,9.55 1.85,10.94 1.85,12.58C1.85,14.55 1.96,16.25 2.2,17.7A4.01,4.01 0 0 0 5.96,21.06L6.86,21.11C8.07,21.17 8.67,21.2 10.47,21.2A0.99,0.99 0 0 0 10.47,19.23C8.71,19.23 8.13,19.2 6.97,19.14L6.06,19.09A2.04,2.04 0 0 1 4.15,17.38C3.93,16.06 3.82,14.46 3.82,12.58C3.82,11.02 3.9,9.72 4.05,8.68C4.19,7.7 5.01,6.97 5.99,6.93C8.43,6.85 10.46,6.8 12.05,6.8C13.65,6.8 15.67,6.85 18.12,6.93C19.08,6.97 19.83,7.74 19.97,8.75C20.05,9.27 20.09,10.71 20.11,11.81L20.11,11.81C20.12,12.16 20.13,12.46 20.14,12.69A0.99,0.99 0 1 0 22.11,12.63C22.1,12.4 22.1,12.1 22.09,11.77L22.09,11.74C22.06,10.62 22.01,9.08 21.93,8.47C21.65,6.56 20.14,5.03 18.19,4.96C17.29,4.93 16.44,4.9 15.66,4.88L16.71,3.42A1.01,1.01 0 0 0 15.07,2.24L13.21,4.83C12.83,4.83 12.46,4.83 12.12,4.83L11.99,4.83zM12.51,9.6L11.19,9.6L11.19,14.23L13.41,14.23L13.41,15.08L10.79,15.08L10.79,16.16L13.41,16.16L13.42,16.84C13.78,16.86 14.13,17 14.43,17.24L14.54,17.24L14.54,16.16L17.23,16.16L17.23,15.08L14.53,15.08L14.53,14.23L16.8,14.23L16.8,9.6L15.52,9.6A8.59,8.59 0 0 0 16.27,8.18L15.18,7.8A14.23,14.23 0 0 1 14.37,9.6L12.85,9.6L13.54,9.3A8.86,8.86 0 0 0 12.73,7.89L11.68,8.24C11.98,8.64 12.26,9.09 12.51,9.6zM8.33,13.17L8.48,11.68L10.46,11.68L10.46,8.29L7.26,8.29L7.26,9.27L9.33,9.27L9.33,10.7L7.47,10.7L7.16,14.16L9.44,14.16C9.44,15.32 9.4,16.08 9.32,16.43C9.24,16.79 8.94,16.96 8.39,16.96C8.08,16.96 7.77,16.94 7.48,16.91L7.78,17.97L7.84,17.98C8.13,18 8.39,18.02 8.66,18.02C9.66,17.95 10.22,17.6 10.35,16.96C10.46,16.32 10.53,15.06 10.53,13.17L8.33,13.17zM15.79,13.28L15.79,12.42L14.53,12.42L14.53,13.28L15.79,13.28zM13.41,12.42L13.41,13.28L12.21,13.28L12.21,12.42L13.41,12.42zM12.21,11.47L13.41,11.47L13.41,10.57L12.21,10.57L12.21,11.47zM14.53,11.47L14.53,10.57L15.79,10.57L15.79,11.47L14.53,11.47z" clip-rule="evenodd" id="svg_1"></path><path fill="#000000" fill-rule="evenodd" d="M22.85,14.63A1,1 0 0 0 21.43,14.7L16.34,20.41L14.13,18.13L14.03,18.04L14.02,18.04A1,1 0 0 0 12.7,19.53L15.66,22.57L15.76,22.66L15.76,22.66C16.17,22.98 16.76,22.93 17.12,22.54L22.93,16.03L23.01,15.93L23.01,15.92A1,1 0 0 0 22.85,14.63z" clip-rule="evenodd" id="svg_2"></path></g></svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
assets/images/video/dlna.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

BIN
assets/images/video/pip.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

1
assets/loading.json Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,9 @@
## 1.0.21
### 修复
+ 推荐视频全屏问题
+ 番剧全屏播放时灰屏问题
+ 评论回调导致页面卡死问题
更多更新日志可在Github上查看
问题反馈、功能建议请查看「关于」页面。

27
change_log/1.0.22.0430.md Normal file
View File

@ -0,0 +1,27 @@
## 1.0.22
### 功能
+ 字幕
+ 全屏时选集
+ 动态转发
+ 评论视频并转发
+ 收藏夹删除
+ 合集显示封面
+ 底部导航栏编辑、排序功能
+ 历史记录进度条展示
+ 直播画质切换
+ 排行榜功能
+ 视频详情页推荐视频开关
+ 显示联合投稿up
### 修复
+ 收藏夹个数错误
+ 封面保存权限问题
+ 合集最后1p未展示
+ up主页关注按钮触发灰屏
### 优化
+ 视频简介查看逻辑
更多更新日志可在Github上查看
问题反馈、功能建议请查看「关于」页面。

14
change_log/1.0.23.0504.md Normal file
View File

@ -0,0 +1,14 @@
## 1.0.23
### 功能
+ 封面下载
### 修复
+ 全屏问题
+ 视频播放器灰屏问题
+ 评论区点击区域问题
更多更新日志可在Github上查看
问题反馈、功能建议请查看「关于」页面。

23
change_log/1.0.24.0626.md Normal file
View File

@ -0,0 +1,23 @@
## 1.0.24
### 功能
+ 私信功能
+ 回复我的、收到的赞查看
+ 新的登录方式
+ 全屏选集
+ 一键三连
+ 按分区搜索
### 优化
+ 页面跳转动画
+ 评论区跳转
### 修复
+ 音画不同步问题
+ 分集字幕未同步
+ 多语言字幕
+ 弹幕设置未生效
+
问题反馈、功能建议请查看「关于」页面。

39
change_log/1.0.25.1010.md Normal file
View File

@ -0,0 +1,39 @@
## 1.0.25
### 功能
+ 直播弹幕
+ 稍后再看、收藏夹播放全部
+ 收藏夹新建、编辑
+ 评论删除
+ 评论保存为图片
+ 动态页滑动切换up
+ up投稿筛选充电视频
+ 直播tab展示关注up
+ up主页专栏展示
### 优化
+ 视频详情页一键三连
+ 动态页标识充电视频
+ 播放器亮度、音量调整百分比展示
+ 封面预览时视频标题可复制
+ 竖屏直播布局
+ 图片预览
+ 专栏渲染优化
+ 私信图片查看
### 修复
+ 收藏夹点击异常
+ 搜索up异常
+ 系统通知已读异常
+ [赞了我的]展示错误
+ 部分up合集无法打开
+ 切换合集视频投币个数未重置
+ 搜索条件筛选面板无法滚动
+ 部分机型导航条未沉浸
+ 专栏图片渲染问题
+ 专栏浏览历史记录
+ 直播间历史记录
更多更新日志可在Github上查看
问题反馈、功能建议请查看「关于」页面。

38
change_log/1.0.26.1214.md Normal file
View File

@ -0,0 +1,38 @@
## 1.0.26
### 功能
+ 番剧历史记录
+ 番组追番状态
+ up主投稿播放
+ 视频tags展示
+ 视频带图评论
+ 无效视频查看
+ 支持合集订阅
+ 艾特评论展示
+ 视频合集展示
+ 视频硬解格式
+ cookie登录
+ 默认空降助手
+ 支持评论区关闭
+ 支持纯黑色背景
+ 简介默认展开
### 优化
+ 竖屏视频播放
+ 专栏文章查看
+ 播放器亮度、音量调整百分比展示
+ 竖屏直播布局
+ 图片预览
+ 专栏渲染优化
+ 私信图片查看
### 修复
+ 字幕匹配错误
+ 视频全屏异常
+ 直播间横屏异常
+ 其他一些问题
更多更新日志可在Github上查看
问题反馈、功能建议请查看「关于」页面。

View File

@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>

View File

@ -1,5 +1,5 @@
PODS:
- appscheme (1.0.4):
- app_links (0.0.2):
- Flutter
- audio_service (0.0.1):
- Flutter
@ -9,7 +9,7 @@ PODS:
- Flutter
- connectivity_plus (0.0.1):
- Flutter
- ReachabilitySwift
- FlutterMacOS
- device_info_plus (0.0.1):
- Flutter
- Flutter (1.0.0)
@ -23,10 +23,12 @@ PODS:
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- gt3_flutter_plugin (0.0.8):
- gt3_flutter_plugin (0.0.9):
- Flutter
- GT3Captcha-iOS
- GT3Captcha-iOS (0.15.8.3)
- image_picker_ios (0.0.1):
- Flutter
- media_kit_libs_ios_video (1.0.4):
- Flutter
- media_kit_native_event_loop (1.0.0):
@ -38,9 +40,8 @@ PODS:
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- permission_handler_apple (9.1.1):
- permission_handler_apple (9.3.0):
- Flutter
- ReachabilitySwift (5.0.0)
- saver_gallery (0.0.1):
- Flutter
- screen_brightness_ios (0.1.0):
@ -67,17 +68,18 @@ PODS:
- Flutter
DEPENDENCIES:
- appscheme (from `.symlinks/plugins/appscheme/ios`)
- app_links (from `.symlinks/plugins/app_links/ios`)
- audio_service (from `.symlinks/plugins/audio_service/ios`)
- audio_session (from `.symlinks/plugins/audio_session/ios`)
- auto_orientation (from `.symlinks/plugins/auto_orientation/ios`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- Flutter (from `Flutter`)
- flutter_mailer (from `.symlinks/plugins/flutter_mailer/ios`)
- flutter_volume_controller (from `.symlinks/plugins/flutter_volume_controller/ios`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- gt3_flutter_plugin (from `.symlinks/plugins/gt3_flutter_plugin/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- media_kit_libs_ios_video (from `.symlinks/plugins/media_kit_libs_ios_video/ios`)
- media_kit_native_event_loop (from `.symlinks/plugins/media_kit_native_event_loop/ios`)
- media_kit_video (from `.symlinks/plugins/media_kit_video/ios`)
@ -100,12 +102,11 @@ SPEC REPOS:
trunk:
- FMDB
- GT3Captcha-iOS
- ReachabilitySwift
- Toast
EXTERNAL SOURCES:
appscheme:
:path: ".symlinks/plugins/appscheme/ios"
app_links:
:path: ".symlinks/plugins/app_links/ios"
audio_service:
:path: ".symlinks/plugins/audio_service/ios"
audio_session:
@ -113,7 +114,7 @@ EXTERNAL SOURCES:
auto_orientation:
:path: ".symlinks/plugins/auto_orientation/ios"
connectivity_plus:
:path: ".symlinks/plugins/connectivity_plus/ios"
:path: ".symlinks/plugins/connectivity_plus/darwin"
device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios"
Flutter:
@ -126,6 +127,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/fluttertoast/ios"
gt3_flutter_plugin:
:path: ".symlinks/plugins/gt3_flutter_plugin/ios"
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
media_kit_libs_ios_video:
:path: ".symlinks/plugins/media_kit_libs_ios_video/ios"
media_kit_native_event_loop:
@ -162,26 +165,26 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
SPEC CHECKSUMS:
appscheme: b1c3f8862331cb20430cf9e0e4af85dbc1572ad8
app_links: e7a6750a915a9e161c58d91bc610e8cd1d4d0ad0
audio_service: f509d65da41b9521a61f1c404dd58651f265a567
audio_session: 4f3e461722055d21515cf3261b64c973c062f345
auto_orientation: 102ed811a5938d52c86520ddd7ecd3a126b5d39d
connectivity_plus: 07c49e96d7fc92bc9920617b83238c4d178b446a
connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_mailer: 2ef5a67087bc8c6c4cefd04a178bf1ae2c94cd83
flutter_volume_controller: e4d5832f08008180f76e30faf671ffd5a425e529
fluttertoast: 31b00dabfa7fb7bacd9e7dbee580d7a2ff4bf265
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
gt3_flutter_plugin: bfa1f26e9a09dc00401514be5ed437f964cabf23
gt3_flutter_plugin: 5bd2c08d3c19cbb6ee3b08f4358439e54c8ab2ee
GT3Captcha-iOS: 5e3b1077834d8a9d6f4d64a447a30af3e14affe6
image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
media_kit_libs_ios_video: a5fe24bc7875ccd6378a0978c13185e1344651c1
media_kit_native_event_loop: e6b2ab20cf0746eb1c33be961fcf79667304fa2a
media_kit_video: 5da63f157170e5bf303bf85453b7ef6971218a2e
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
saver_gallery: 2b4e584106fde2407ab51560f3851564963e6b78
screen_brightness_ios: 715ca807df953bf676d339f11464e438143ee625
share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5
@ -189,11 +192,11 @@ SPEC CHECKSUMS:
status_bar_control: 7c84146799e6a076315cc1550f78ef53aae3e446
system_proxy: bec1a5c5af67dd3e3ebf43979400a8756c04cc44
Toast: ec33c32b8688982cecc6348adeae667c1b9938da
url_launcher_ios: bf5ce03e0e2088bad9cc378ea97fa0ed5b49673b
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
volume_controller: 531ddf792994285c9b17f9d8a7e4dcdd29b3eae9
wakelock_plus: 8b09852c8876491e4b6d179e17dfe2a0b5f60d47
wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1
webview_cookie_manager: eaf920722b493bd0f7611b5484771ca53fed03f7
webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a
webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36
PODFILE CHECKSUM: 637cd290bed23275b5f5ffcc7eb1e73d0a5fb2be

View File

@ -156,7 +156,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,5 +1,6 @@
import UIKit
import Flutter
import AVFoundation
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
@ -8,6 +9,14 @@ import Flutter
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
//
do {
try AVAudioSession.sharedInstance().setCategory(.playback, options: [.duckOthers])
} catch {
print("Failed to set audio session category: \(error)")
}
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
}

View File

@ -49,6 +49,8 @@
<true/>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>请允许APP保存图片到相册</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>请允许APP保存图片到相册</string>
<key>NSCameraUsageDescription</key>
<string>App需要您的同意,才能访问相册</string>
<key>NSAppleMusicUsageDescription</key>
@ -63,44 +65,29 @@
<array>
<dict>
<key>CFBundleURLName</key>
<string></string>
<string>bilibili</string>
<key>CFBundleURLSchemes</key>
<array>
<string>http</string>
<string>https</string>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string></string>
<key>CFBundleURLSchemes</key>
<array>
<string>m.bilibili.com</string>
<string>bilibili.com</string>
<string>www.bilibili.com</string>
<string>bangumi.bilibili.com</string>
<string>bilibili.cn</string>
<string>www.bilibili.cn</string>
<string>bangumi.bilibili.cn</string>
<string>bilibili.tv</string>
<string>www.bilibili.tv</string>
<string>bangumi.bilibili.tv</string>
<string>miniapp.bilibili.com</string>
<string>live.bilibili.com</string>
</array>
</dict>
</array>
</dict>
<!-- 当其他应用程序或系统通过 bilibili -->
<dict>
<key>CFBundleURLName</key>
<string>bilibili</string>
<key>CFBundleURLSchemes</key>
<array>
<string>bilibili</string>
<string>m.bilibili.com</string>
<string>bilibili.com</string>
<string>www.bilibili.com</string>
<string>bangumi.bilibili.com</string>
<string>bilibili.cn</string>
<string>www.bilibili.cn</string>
<string>bangumi.bilibili.cn</string>
<string>bilibili.tv</string>
<string>www.bilibili.tv</string>
<string>bangumi.bilibili.tv</string>
<string>miniapp.bilibili.com</string>
<string>live.bilibili.com</string>
<string>pili</string>
<string>pilipala</string>
</array>
<key>FlutterDeepLinkingEnabled</key>
<false/>
</dict>
</array>
<key>UIBackgroundModes</key>

View File

@ -15,6 +15,4 @@ class Constants {
// 59b43e04ad6965f34319062b478f83dd TV端
static const String appSec = '59b43e04ad6965f34319062b478f83dd';
static const String thirdSign = '04224646d1fea004e79606d3b038c84a';
static const String thirdApi =
'https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png';
}

View File

@ -0,0 +1,844 @@
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'package:pilipala/common/constants.dart';
import 'package:pilipala/common/widgets/network_img_layer.dart';
import 'package:pilipala/http/video.dart';
import 'package:pilipala/models/video_detail_res.dart';
import 'package:pilipala/pages/video/detail/index.dart';
import 'package:pilipala/utils/utils.dart';
import 'package:scrollview_observer/scrollview_observer.dart';
import '../models/common/video_episode_type.dart';
import 'widgets/badge.dart';
import 'widgets/stat/danmu.dart';
import 'widgets/stat/view.dart';
class EpisodeBottomSheet {
final List<dynamic> episodes;
final int currentCid;
final dynamic dataType;
final Function changeFucCall;
final int? cid;
final double? sheetHeight;
bool isFullScreen = false;
final UgcSeason? ugcSeason;
final int? currentEpisodeIndex;
final int? currentIndex;
EpisodeBottomSheet({
required this.episodes,
required this.currentCid,
required this.dataType,
required this.changeFucCall,
this.cid,
this.sheetHeight,
this.isFullScreen = false,
this.ugcSeason,
this.currentEpisodeIndex,
this.currentIndex,
});
Widget buildShowContent() {
return PagesBottomSheet(
episodes: episodes,
currentCid: currentCid,
dataType: dataType,
changeFucCall: changeFucCall,
cid: cid,
sheetHeight: sheetHeight,
isFullScreen: isFullScreen,
ugcSeason: ugcSeason,
currentEpisodeIndex: currentEpisodeIndex,
currentIndex: currentIndex,
);
}
PersistentBottomSheetController show(BuildContext context) {
final PersistentBottomSheetController btmSheetCtr = showBottomSheet(
context: context,
builder: (BuildContext context) {
return buildShowContent();
},
);
return btmSheetCtr;
}
}
class PagesBottomSheet extends StatefulWidget {
const PagesBottomSheet({
super.key,
required this.episodes,
required this.currentCid,
required this.dataType,
required this.changeFucCall,
this.cid,
this.sheetHeight,
this.isFullScreen = false,
this.ugcSeason,
this.currentEpisodeIndex,
this.currentIndex,
});
final List<dynamic> episodes;
final int currentCid;
final dynamic dataType;
final Function changeFucCall;
final int? cid;
final double? sheetHeight;
final bool isFullScreen;
final UgcSeason? ugcSeason;
final int? currentEpisodeIndex;
final int? currentIndex;
@override
State<PagesBottomSheet> createState() => _PagesBottomSheetState();
}
class _PagesBottomSheetState extends State<PagesBottomSheet>
with TickerProviderStateMixin {
final ScrollController _listScrollController = ScrollController();
late ListObserverController _listObserverController;
late GridObserverController _gridObserverController;
final ScrollController _gridScrollController = ScrollController();
late int currentIndex;
TabController? tabController;
List<ListObserverController>? _listObserverControllerList;
List<ScrollController>? _listScrollControllerList;
final String heroTag = Get.arguments['heroTag'];
VideoDetailController? _videoDetailController;
RxInt isSubscribe = (-1).obs;
bool isVisible = false;
@override
void initState() {
super.initState();
currentIndex = widget.currentIndex ??
widget.episodes.indexWhere((dynamic e) => e.cid == widget.currentCid);
_scrollToInit();
_scrollPositionInit();
if (widget.dataType == VideoEpidoesType.videoEpisode) {
_videoDetailController = Get.find<VideoDetailController>(tag: heroTag);
_getSubscribeStatus();
}
}
String prefix() {
switch (widget.dataType) {
case VideoEpidoesType.videoEpisode:
return '选集';
case VideoEpidoesType.videoPart:
return '分集';
case VideoEpidoesType.bangumiEpisode:
return '选集';
}
return '选集';
}
// 滚动器初始化
void _scrollToInit() {
/// 单个
_listObserverController =
ListObserverController(controller: _listScrollController);
if (widget.dataType == VideoEpidoesType.videoEpisode &&
widget.ugcSeason?.sections != null &&
widget.ugcSeason!.sections!.length > 1) {
tabController = TabController(
length: widget.ugcSeason!.sections!.length,
vsync: this,
initialIndex: widget.currentEpisodeIndex ?? 0,
);
/// 多tab
_listScrollControllerList = List.generate(
widget.ugcSeason!.sections!.length,
(index) {
return ScrollController();
},
);
_listObserverControllerList = List.generate(
widget.ugcSeason!.sections!.length,
(index) {
return ListObserverController(
controller: _listScrollControllerList![index],
);
},
);
} else {
_gridObserverController =
GridObserverController(controller: _gridScrollController);
}
}
// 滚动器位置初始化
void _scrollPositionInit() {
if (widget.dataType == VideoEpidoesType.videoEpisode) {
// 单个 多tab
if (widget.ugcSeason?.sections != null) {
if (widget.ugcSeason!.sections!.length == 1) {
_listObserverController.initialIndexModel =
ObserverIndexPositionModel(
index: currentIndex,
isFixedHeight: true,
);
} else {
_listObserverControllerList![widget.currentEpisodeIndex ?? 0]
.initialIndexModel = ObserverIndexPositionModel(
index: currentIndex,
isFixedHeight: true,
);
}
}
} else {
_gridObserverController.initialIndexModel = ObserverIndexPositionModel(
index: currentIndex,
isFixedHeight: false,
);
}
}
// 获取订阅状态
void _getSubscribeStatus() async {
var res =
await VideoHttp.getSubscribeStatus(bvid: _videoDetailController!.bvid);
if (res['status']) {
isSubscribe.value = res['data']['season_fav'] ? 1 : 0;
}
}
// 更改订阅状态
void _changeSubscribeStatus() async {
if (isSubscribe.value == -1) {
return;
}
dynamic result = await VideoHttp.seasonFav(
isFav: isSubscribe.value == 1,
seasonId: widget.ugcSeason!.id,
);
if (result['status']) {
SmartDialog.showToast(isSubscribe.value == 1 ? '取消订阅成功' : '订阅成功');
isSubscribe.value = isSubscribe.value == 1 ? 0 : 1;
} else {
SmartDialog.showToast(result['msg']);
}
}
// 更改展开状态
void _changeVisible() {
setState(() {
isVisible = !isVisible;
});
}
@override
void dispose() {
try {
_listObserverController.controller?.dispose();
_gridObserverController.controller?.dispose();
_listScrollController.dispose();
_gridScrollController.dispose();
for (var element in _listObserverControllerList!) {
element.controller?.dispose();
}
for (var element in _listScrollControllerList!) {
element.dispose();
}
} catch (_) {}
super.dispose();
}
@override
Widget build(BuildContext context) {
return StatefulBuilder(
builder: (BuildContext context, StateSetter setState) {
return SizedBox(
height: widget.sheetHeight,
child: Column(
children: [
TitleBar(
title: '${prefix()}${widget.episodes.length}',
isFullScreen: widget.isFullScreen,
),
if (widget.ugcSeason != null) ...[
UgcSeasonBuild(
ugcSeason: widget.ugcSeason!,
isSubscribe: isSubscribe,
isVisible: isVisible,
changeFucCall: _changeSubscribeStatus,
changeVisible: _changeVisible,
),
],
Expanded(
child: Material(
child: widget.dataType == VideoEpidoesType.videoEpisode
? (widget.ugcSeason!.sections!.length == 1
? ListViewObserver(
controller: _listObserverController,
child: ListView.builder(
controller: _listScrollController,
itemCount: widget.episodes.length + 1,
itemBuilder: (BuildContext context, int index) {
bool isLastItem =
index == widget.episodes.length;
bool isCurrentIndex = currentIndex == index;
return isLastItem
? SizedBox(
height: MediaQuery.of(context)
.padding
.bottom +
20,
)
: EpisodeListItem(
episode: widget.episodes[index],
index: index,
isCurrentIndex: isCurrentIndex,
dataType: widget.dataType,
changeFucCall: widget.changeFucCall,
isFullScreen: widget.isFullScreen,
);
},
),
)
: buildTabBar())
: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 12.0), // 设置左右间距为12
child: GridViewObserver(
controller: _gridObserverController,
child: GridView.count(
controller: _gridScrollController,
crossAxisCount: 2,
crossAxisSpacing: StyleString.safeSpace,
childAspectRatio: 2.6,
children: List.generate(
widget.episodes.length,
(index) {
bool isCurrentIndex = currentIndex == index;
return EpisodeGridItem(
episode: widget.episodes[index],
index: index,
isCurrentIndex: isCurrentIndex,
dataType: widget.dataType,
changeFucCall: widget.changeFucCall,
isFullScreen: widget.isFullScreen,
);
},
),
),
),
),
),
),
],
),
);
});
}
Widget buildTabBar() {
return Column(
children: [
// 背景色
Container(
color: Theme.of(context).colorScheme.surface,
child: TabBar(
controller: tabController,
isScrollable: true,
indicatorSize: TabBarIndicatorSize.label,
tabAlignment: TabAlignment.start,
splashBorderRadius: BorderRadius.circular(4),
tabs: [
...widget.ugcSeason!.sections!.map((SectionItem section) {
return Tab(
text: section.title,
);
}).toList()
],
),
),
Expanded(
child: TabBarView(
controller: tabController,
children: [
...widget.ugcSeason!.sections!.map((SectionItem section) {
final int fIndex = widget.ugcSeason!.sections!.indexOf(section);
return ListViewObserver(
controller: _listObserverControllerList![fIndex],
child: ListView.builder(
controller: _listScrollControllerList![fIndex],
itemCount: section.episodes!.length + 1,
itemBuilder: (BuildContext context, int index) {
final bool isLastItem = index == section.episodes!.length;
return isLastItem
? SizedBox(
height:
MediaQuery.of(context).padding.bottom + 20,
)
: EpisodeListItem(
episode: section.episodes![index], // 调整索引
index: index, // 调整索引
isCurrentIndex: widget.currentCid ==
section.episodes![index].cid,
dataType: widget.dataType,
changeFucCall: widget.changeFucCall,
isFullScreen: widget.isFullScreen,
);
},
),
);
}).toList()
],
),
),
],
);
}
}
class TitleBar extends StatelessWidget {
final String title;
final bool isFullScreen;
const TitleBar({
Key? key,
required this.title,
required this.isFullScreen,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return AppBar(
toolbarHeight: 45,
automaticallyImplyLeading: false,
centerTitle: false,
elevation: 1,
scrolledUnderElevation: 1,
title: Padding(
padding: const EdgeInsets.only(left: 12),
child: Text(
title,
style: Theme.of(context).textTheme.titleMedium,
),
),
actions: !isFullScreen
? [
SizedBox(
width: 35,
height: 35,
child: IconButton(
icon: const Icon(Icons.close, size: 20),
style: ButtonStyle(
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: () => Navigator.pop(context),
),
),
const SizedBox(width: 8),
]
: null,
);
}
}
class EpisodeListItem extends StatelessWidget {
final dynamic episode;
final int index;
final bool isCurrentIndex;
final dynamic dataType;
final Function changeFucCall;
final bool isFullScreen;
const EpisodeListItem({
Key? key,
required this.episode,
required this.index,
required this.isCurrentIndex,
required this.dataType,
required this.changeFucCall,
required this.isFullScreen,
}) : super(key: key);
@override
Widget build(BuildContext context) {
Color primary = Theme.of(context).colorScheme.primary;
Color onSurface = Theme.of(context).colorScheme.onSurface;
String title = '';
switch (dataType) {
case VideoEpidoesType.videoEpisode:
title = episode.title;
break;
case VideoEpidoesType.videoPart:
title = episode.pagePart;
break;
case VideoEpidoesType.bangumiEpisode:
title = '${episode.title}${episode.longTitle!}';
break;
}
return isFullScreen || episode?.cover == null || episode?.cover == ''
? _buildListTile(context, title, primary, onSurface)
: _buildInkWell(context, title, primary, onSurface);
}
Widget _buildListTile(
BuildContext context, String title, Color primary, Color onSurface) {
return ListTile(
onTap: () {
if (isCurrentIndex) {
return;
}
SmartDialog.showToast('切换至「$title');
changeFucCall.call(episode, index);
},
dense: false,
leading: isCurrentIndex
? Image.asset(
'assets/images/live.png',
color: primary,
height: 12,
)
: null,
title: Text(
title,
style: TextStyle(
fontSize: 14,
color: isCurrentIndex ? primary : onSurface,
),
),
);
}
Widget _buildInkWell(
BuildContext context, String title, Color primary, Color onSurface) {
return InkWell(
onTap: () {
if (isCurrentIndex) {
return;
}
SmartDialog.showToast('切换至「$title');
changeFucCall.call(episode, index);
},
child: Padding(
padding: const EdgeInsets.fromLTRB(
StyleString.safeSpace, 6, StyleString.safeSpace, 6),
child: LayoutBuilder(
builder: (BuildContext context, BoxConstraints boxConstraints) {
const double width = 160;
return Container(
constraints: const BoxConstraints(minHeight: 88),
height: width / StyleString.aspectRatio,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AspectRatio(
aspectRatio: StyleString.aspectRatio,
child: LayoutBuilder(
builder: (BuildContext context,
BoxConstraints boxConstraints) {
final double maxWidth = boxConstraints.maxWidth;
final double maxHeight = boxConstraints.maxHeight;
return Stack(
children: [
NetworkImgLayer(
src: episode?.cover ?? '',
width: maxWidth,
height: maxHeight,
),
if (episode.duration != 0)
PBadge(
text: Utils.timeFormat(episode.duration!),
right: 6.0,
bottom: 6.0,
type: 'gray',
),
],
);
},
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(10, 2, 6, 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
episode.title as String,
textAlign: TextAlign.start,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: FontWeight.w500,
color: isCurrentIndex ? primary : onSurface,
),
),
const Spacer(),
if (dataType != VideoEpidoesType.videoPart) ...[
if (episode?.pubdate != null ||
episode.pubTime != null)
Text(
Utils.dateFormat(
episode?.pubdate ?? episode.pubTime),
style: TextStyle(
fontSize: 11,
color:
Theme.of(context).colorScheme.outline),
),
const SizedBox(height: 2),
if (episode.stat != null)
Row(
children: [
StatView(view: episode.stat.view),
const SizedBox(width: 8),
StatDanMu(danmu: episode.stat.danmaku),
const Spacer(),
],
),
const SizedBox(height: 4),
]
],
),
),
)
],
),
);
},
),
),
);
}
}
class EpisodeGridItem extends StatelessWidget {
final dynamic episode;
final int index;
final bool isCurrentIndex;
final dynamic dataType;
final Function changeFucCall;
final bool isFullScreen;
const EpisodeGridItem({
Key? key,
required this.episode,
required this.index,
required this.isCurrentIndex,
required this.dataType,
required this.changeFucCall,
required this.isFullScreen,
}) : super(key: key);
@override
Widget build(BuildContext context) {
ColorScheme colorScheme = Theme.of(context).colorScheme;
TextStyle textStyle = TextStyle(
color: isCurrentIndex ? colorScheme.primary : colorScheme.onSurface,
fontSize: 14,
);
return Stack(
children: [
Container(
width: double.infinity,
margin: const EdgeInsets.only(top: StyleString.safeSpace),
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
color: isCurrentIndex
? colorScheme.primaryContainer.withOpacity(0.6)
: colorScheme.onInverseSurface.withOpacity(0.6),
borderRadius: BorderRadius.circular(8),
border: Border.all(
color: isCurrentIndex
? colorScheme.primary.withOpacity(0.8)
: Colors.transparent,
width: 1,
),
),
child: InkWell(
borderRadius: BorderRadius.circular(8),
onTap: () {
if (isCurrentIndex) {
return;
}
SmartDialog.showToast('切换至「${episode.title}');
changeFucCall.call(episode, index);
},
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 12.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [
Text(
dataType == VideoEpidoesType.bangumiEpisode
? '${index + 1}'
: '${index + 1}p',
style: textStyle),
const SizedBox(height: 1),
Text(
episode.title,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: textStyle,
),
],
),
),
),
),
if (dataType == VideoEpidoesType.bangumiEpisode &&
episode.badge != '' &&
episode.badge != null)
Positioned(
right: 8,
top: 18,
child: Text(
episode.badge,
style: const TextStyle(fontSize: 11, color: Color(0xFFFF6699)),
),
)
],
);
}
}
class UgcSeasonBuild extends StatelessWidget {
final UgcSeason ugcSeason;
final RxInt isSubscribe;
final bool isVisible;
final Function changeFucCall;
final Function changeVisible;
const UgcSeasonBuild({
Key? key,
required this.ugcSeason,
required this.isSubscribe,
required this.isVisible,
required this.changeFucCall,
required this.changeVisible,
}) : super(key: key);
@override
Widget build(BuildContext context) {
final ThemeData theme = Theme.of(context);
final Color outline = theme.colorScheme.outline;
final Color surface = theme.colorScheme.surface;
final Color primary = theme.colorScheme.primary;
final Color onPrimary = theme.colorScheme.onPrimary;
final Color onInverseSurface = theme.colorScheme.onInverseSurface;
final TextStyle titleMedium = theme.textTheme.titleMedium!;
final TextStyle labelMedium = theme.textTheme.labelMedium!;
final Color dividerColor = theme.dividerColor.withOpacity(0.1);
return isVisible
? Container(
padding: const EdgeInsets.fromLTRB(12, 0, 12, 0),
color: surface,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Divider(height: 1, thickness: 1, color: dividerColor),
const SizedBox(height: 10),
Row(
children: [
Expanded(
child: Text(
'合集:${ugcSeason.title}',
style: titleMedium,
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
),
const SizedBox(width: 10),
Obx(
() => isSubscribe.value == -1
? const SizedBox(height: 32)
: SizedBox(
height: 32,
child: FilledButton.tonal(
onPressed: () => changeFucCall.call(),
style: TextButton.styleFrom(
padding:
const EdgeInsets.only(left: 8, right: 8),
foregroundColor: isSubscribe.value == 1
? outline
: onPrimary,
backgroundColor: isSubscribe.value == 1
? onInverseSurface
: primary,
),
child:
Text(isSubscribe.value == 1 ? '已订阅' : '订阅'),
),
),
),
],
),
if (ugcSeason.intro != null && ugcSeason.intro != '') ...[
const SizedBox(height: 6),
Container(
constraints: const BoxConstraints(maxHeight: 100),
child: SingleChildScrollView(
child: Text(
ugcSeason.intro!,
style: TextStyle(color: outline, fontSize: 12),
),
),
),
],
const SizedBox(height: 4),
Text.rich(
TextSpan(
style: TextStyle(
fontSize: labelMedium.fontSize, color: outline),
children: [
TextSpan(
text: '${Utils.numFormat(ugcSeason.stat!.view)}播放'),
const TextSpan(text: ' · '),
TextSpan(
text:
'${Utils.numFormat(ugcSeason.stat!.danmaku)}弹幕'),
],
),
),
const SizedBox(height: 14),
Align(
alignment: Alignment.center,
child: Material(
color: surface,
child: InkWell(
onTap: () => changeVisible.call(),
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 10, horizontal: 0),
child: Text(
'收起简介',
style: TextStyle(color: primary, fontSize: 12),
),
),
),
),
),
Divider(height: 1, thickness: 1, color: dividerColor),
],
),
)
: Align(
alignment: Alignment.center,
child: InkWell(
onTap: () => changeVisible.call(),
child: Padding(
padding:
const EdgeInsets.symmetric(vertical: 10, horizontal: 0),
child: Text(
'展开简介',
style: TextStyle(color: primary, fontSize: 12),
),
),
),
);
}
}

View File

@ -3,14 +3,9 @@ import 'package:pilipala/common/constants.dart';
import 'skeleton.dart';
class MediaBangumiSkeleton extends StatefulWidget {
class MediaBangumiSkeleton extends StatelessWidget {
const MediaBangumiSkeleton({super.key});
@override
State<MediaBangumiSkeleton> createState() => _MediaBangumiSkeletonState();
}
class _MediaBangumiSkeletonState extends State<MediaBangumiSkeleton> {
@override
Widget build(BuildContext context) {
Color bgColor = Theme.of(context).colorScheme.onInverseSurface;
@ -35,25 +30,25 @@ class _MediaBangumiSkeletonState extends State<MediaBangumiSkeleton> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
color: Theme.of(context).colorScheme.onInverseSurface,
color: bgColor,
width: 200,
height: 20,
margin: const EdgeInsets.only(bottom: 15),
),
Container(
color: Theme.of(context).colorScheme.onInverseSurface,
color: bgColor,
width: 150,
height: 13,
margin: const EdgeInsets.only(bottom: 5),
),
Container(
color: Theme.of(context).colorScheme.onInverseSurface,
color: bgColor,
width: 150,
height: 13,
margin: const EdgeInsets.only(bottom: 5),
),
Container(
color: Theme.of(context).colorScheme.onInverseSurface,
color: bgColor,
width: 150,
height: 13,
),
@ -64,7 +59,7 @@ class _MediaBangumiSkeletonState extends State<MediaBangumiSkeleton> {
decoration: BoxDecoration(
borderRadius:
const BorderRadius.all(Radius.circular(20)),
color: Theme.of(context).colorScheme.onInverseSurface,
color: bgColor,
),
),
],

View File

@ -13,8 +13,8 @@ class Skeleton extends StatelessWidget {
var shimmerGradient = LinearGradient(
colors: [
Colors.transparent,
Theme.of(context).colorScheme.background.withAlpha(10),
Theme.of(context).colorScheme.background.withAlpha(10),
Theme.of(context).colorScheme.surface.withAlpha(10),
Theme.of(context).colorScheme.surface.withAlpha(10),
Colors.transparent,
],
stops: const [

View File

@ -0,0 +1,42 @@
import 'package:flutter/material.dart';
import '../constants.dart';
class UserListSkeleton extends StatelessWidget {
const UserListSkeleton({super.key});
@override
Widget build(BuildContext context) {
Color bgColor = Theme.of(context).colorScheme.onInverseSurface;
return Padding(
padding: const EdgeInsets.symmetric(
horizontal: StyleString.safeSpace, vertical: 7),
child: Row(
children: [
ClipOval(
child: Container(width: 42, height: 42, color: bgColor),
),
const SizedBox(width: 10),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Container(color: bgColor, width: 60, height: 13),
const SizedBox(width: 10),
Container(color: bgColor, width: 40, height: 13),
],
),
const SizedBox(height: 6),
Container(
color: bgColor,
width: 100,
height: 13,
),
],
),
),
],
));
}
}

View File

@ -0,0 +1,126 @@
import 'package:flutter/material.dart';
import '../constants.dart';
import 'skeleton.dart';
class VideoIntroSkeleton extends StatelessWidget {
const VideoIntroSkeleton({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
Color bgColor = Theme.of(context).colorScheme.onInverseSurface;
return Skeleton(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: StyleString.safeSpace),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 18),
Container(
width: double.infinity,
height: 20,
margin: const EdgeInsets.only(bottom: 6),
color: bgColor,
),
Container(
width: 220,
height: 20,
margin: const EdgeInsets.only(bottom: 12),
color: bgColor,
),
Row(
children: [
Container(
width: 45,
height: 14,
color: bgColor,
),
const SizedBox(width: 8),
Container(
width: 45,
height: 14,
color: bgColor,
),
const SizedBox(width: 8),
Container(
width: 45,
height: 14,
color: bgColor,
),
const Spacer(),
Container(
width: 35,
height: 14,
color: bgColor,
),
const SizedBox(width: 4),
],
),
const SizedBox(height: 30),
LayoutBuilder(builder: (context, constraints) {
// 并列5个正方形
double width = (constraints.maxWidth - 30) / 5;
return Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: List.generate(5, (index) {
return Container(
width: width - 24,
height: width - 24,
decoration: BoxDecoration(
color: bgColor,
borderRadius: BorderRadius.circular(16),
),
);
}),
);
}),
const SizedBox(height: 20),
Container(
width: double.infinity,
height: 30,
margin: const EdgeInsets.symmetric(horizontal: 6),
decoration: BoxDecoration(
color: bgColor,
borderRadius: BorderRadius.circular(8),
),
),
const SizedBox(height: 20),
Row(
children: [
ClipOval(
child: Container(
width: 44,
height: 44,
color: bgColor,
),
),
const SizedBox(width: 12),
Container(
width: 50,
height: 14,
color: bgColor,
),
const SizedBox(width: 8),
Container(
width: 35,
height: 14,
color: bgColor,
),
const Spacer(),
Container(
width: 55,
height: 30,
decoration: BoxDecoration(
color: bgColor,
borderRadius: BorderRadius.circular(16),
),
),
const SizedBox(width: 2)
],
),
const SizedBox(height: 10),
],
),
),
);
}
}

View File

@ -66,7 +66,7 @@ class PBadge extends StatelessWidget {
border: Border.all(color: borderColor),
),
child: Text(
text!,
text ?? '',
style: TextStyle(fontSize: fs ?? fontSize, color: color),
),
);

View File

@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:hive/hive.dart';
import 'package:pilipala/utils/storage.dart';
Box<dynamic> setting = GStrorage.setting;
Box<dynamic> setting = GStorage.setting;
class CustomToast extends StatelessWidget {
const CustomToast({super.key, required this.msg});

View File

@ -0,0 +1,25 @@
import 'package:flutter/material.dart';
class DragHandle extends StatelessWidget {
const DragHandle({super.key});
@override
Widget build(BuildContext context) {
return InkWell(
onTap: Navigator.of(context).pop,
child: SizedBox(
height: 36,
child: Center(
child: Container(
width: 32,
height: 4,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.outline,
borderRadius: BorderRadius.circular(4),
),
),
),
),
);
}
}

View File

@ -0,0 +1,158 @@
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'package:pilipala/common/widgets/http_error.dart';
import 'package:pilipala/http/member.dart';
import 'package:pilipala/models/member/tags.dart';
import 'package:pilipala/utils/feed_back.dart';
class GroupPanel extends StatefulWidget {
final int? mid;
final ScrollController scrollController;
const GroupPanel({super.key, this.mid, required this.scrollController});
@override
State<GroupPanel> createState() => _GroupPanelState();
}
class _GroupPanelState extends State<GroupPanel> {
late Future _futureBuilderFuture;
late List<MemberTagItemModel> tagsList;
bool showDefault = true;
@override
void initState() {
super.initState();
_futureBuilderFuture = MemberHttp.followUpTags();
}
void onSave() async {
feedBack();
// 是否有选中的 有选中的带id没选使用默认0
final bool anyHasChecked =
tagsList.any((MemberTagItemModel e) => e.checked == true);
late String tagids;
if (anyHasChecked) {
final List<MemberTagItemModel> checkedList =
tagsList.where((MemberTagItemModel e) => e.checked == true).toList();
final List<int> tagidList =
checkedList.map<int>((e) => e.tagid!).toList();
tagids = tagidList.join(',');
} else {
tagids = '0';
}
// 保存
final res = await MemberHttp.addUsers(widget.mid, tagids);
SmartDialog.showToast(res['msg']);
if (res['status']) {
Get.back();
}
}
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
AppBar(
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(20),
),
),
leading: IconButton(
onPressed: () => Get.back(),
icon: const Icon(Icons.close_outlined)),
title: Text('设置关注分组',
style: Theme.of(context)
.textTheme
.titleMedium!
.copyWith(fontWeight: FontWeight.bold)),
),
Expanded(
child: Material(
child: FutureBuilder(
future: _futureBuilderFuture,
builder: (BuildContext context, AsyncSnapshot snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
Map data = snapshot.data as Map;
if (data['status']) {
tagsList = data['data'];
return ListView.builder(
controller: widget.scrollController,
itemCount: data['data'].length,
itemBuilder: (context, index) {
return ListTile(
onTap: () {
data['data'][index].checked =
!data['data'][index].checked;
showDefault =
!data['data'].any((e) => e.checked == true);
setState(() {});
},
dense: true,
leading: const Icon(Icons.group_outlined),
minLeadingWidth: 0,
title: Text(data['data'][index].name),
subtitle: data['data'][index].tip != ''
? Text(data['data'][index].tip)
: null,
trailing: Transform.scale(
scale: 0.9,
child: Checkbox(
value: data['data'][index].checked,
onChanged: (bool? checkValue) {
data['data'][index].checked = checkValue;
showDefault =
!data['data'].any((e) => e.checked == true);
setState(() {});
},
),
),
);
},
);
} else {
return HttpError(
errMsg: data['msg'],
fn: () => setState(() {}),
);
}
} else {
// 骨架屏
return const Center(child: Text('请求中'));
}
},
),
),
),
Divider(
height: 1,
color: Theme.of(context).disabledColor.withOpacity(0.08),
),
Padding(
padding: EdgeInsets.only(
left: 20,
right: 20,
top: 12,
bottom: MediaQuery.paddingOf(context).bottom + 12,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
TextButton(
onPressed: () => onSave(),
style: TextButton.styleFrom(
padding: const EdgeInsets.only(left: 30, right: 30),
foregroundColor: Theme.of(context).colorScheme.onPrimary,
backgroundColor:
Theme.of(context).colorScheme.primary, // 设置按钮背景色
),
child: Text(showDefault ? '保存至默认分组' : '保存'),
),
],
),
),
],
);
}
}

View File

@ -1,7 +1,11 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:get/get.dart';
import 'network_img_layer.dart';
import 'package:pilipala/plugin/pl_gallery/hero_dialog_route.dart';
import 'package:pilipala/plugin/pl_gallery/interactiveviewer_gallery.dart';
import 'package:pilipala/utils/highlight.dart';
import '../../utils/global_data_cache.dart';
// ignore: must_be_immutable
class HtmlRender extends StatelessWidget {
@ -22,9 +26,25 @@ class HtmlRender extends StatelessWidget {
data: htmlContent,
onLinkTap: (String? url, Map<String, String> buildContext, attributes) {},
extensions: [
TagExtension(
tagsToExtend: <String>{'pre'},
builder: (ExtensionContext extensionContext) {
final Map<String, dynamic> attributes = extensionContext.attributes;
final String lang = attributes['data-lang'] as String;
final String code = attributes['codecontent'] as String;
List<String> selectedLanguages = [lang.split('@').first];
TextSpan? result = highlightExistingText(code, selectedLanguages);
if (result == null) {
return const Center(child: Text('代码块渲染失败'));
}
return SelectableText.rich(result);
},
),
TagExtension(
tagsToExtend: <String>{'img'},
builder: (ExtensionContext extensionContext) {
int defaultImgQuality = 10;
defaultImgQuality = GlobalDataCache.imgQuality;
try {
final Map<String, dynamic> attributes =
extensionContext.attributes;
@ -39,24 +59,56 @@ class HtmlRender extends StatelessWidget {
imgUrl = imgUrl.replaceAll('http://', 'https://');
}
imgUrl = imgUrl.contains('@') ? imgUrl.split('@').first : imgUrl;
final bool isEmote = imgUrl.contains('/emote/');
// final bool isEmote = imgUrl.contains('/emote/');
final bool isMall = imgUrl.contains('/mall/');
if (isMall) {
return const SizedBox();
}
// bool inTable =
// extensionContext.element!.previousElementSibling == null ||
// extensionContext.element!.nextElementSibling == null;
// imgUrl = Utils().imageUrl(imgUrl!);
// return Image.network(
// imgUrl,
// width: isEmote ? 22 : null,
// height: isEmote ? 22 : null,
// );
return NetworkImgLayer(
width: isEmote ? 22 : Get.size.width - 24,
height: isEmote ? 22 : 200,
src: imgUrl,
return InkWell(
onTap: () {
Navigator.of(context).push(
HeroDialogRoute<void>(
builder: (BuildContext context) =>
InteractiveviewerGallery(
sources: imgList ?? [imgUrl],
initIndex: imgList?.indexOf(imgUrl) ?? 0,
itemBuilder: (
BuildContext context,
int index,
bool isFocus,
bool enablePageView,
) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if (enablePageView) {
Navigator.of(context).pop();
}
},
child: Center(
child: Hero(
tag: imgList?[index] ?? imgUrl,
child: CachedNetworkImage(
fadeInDuration:
const Duration(milliseconds: 0),
imageUrl: imgList?[index] ?? imgUrl,
fit: BoxFit.contain,
),
),
),
);
},
onPageChanged: (int pageIndex) {},
),
),
);
},
child: ClipRRect(
borderRadius: BorderRadius.circular(12),
child: CachedNetworkImage(
imageUrl: '$imgUrl@${defaultImgQuality}q.webp',
),
),
);
} catch (err) {
return const SizedBox();
@ -66,7 +118,7 @@ class HtmlRender extends StatelessWidget {
],
style: {
'html': Style(
fontSize: FontSize.medium,
fontSize: FontSize.large,
lineHeight: LineHeight.percent(140),
),
'body': Style(margin: Margins.zero, padding: HtmlPaddings.zero),
@ -78,7 +130,7 @@ class HtmlRender extends StatelessWidget {
margin: Margins.only(bottom: 10),
),
'span': Style(
fontSize: FontSize.medium,
fontSize: FontSize.large,
height: Height(1.65),
),
'div': Style(height: Height.auto()),
@ -90,6 +142,14 @@ class HtmlRender extends StatelessWidget {
textAlign: TextAlign.justify,
),
'img': Style(margin: Margins.only(top: 4, bottom: 4)),
'figcaption': Style(
textAlign: TextAlign.center,
margin: Margins.only(top: 8, bottom: 20),
color: Theme.of(context).colorScheme.secondary,
),
'figure': Style(
margin: Margins.zero,
),
},
);
}

View File

@ -2,50 +2,54 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class HttpError extends StatelessWidget {
const HttpError(
{required this.errMsg, required this.fn, this.btnText, super.key});
const HttpError({
required this.errMsg,
this.fn,
this.btnText,
this.isShowBtn = true,
this.isInSliver = true,
super.key,
});
final String? errMsg;
final Function()? fn;
final String? btnText;
final bool isShowBtn;
final bool isInSliver;
@override
Widget build(BuildContext context) {
return SliverToBoxAdapter(
child: SizedBox(
height: 400,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(
"assets/images/error.svg",
height: 200,
),
const SizedBox(height: 30),
Text(
errMsg ?? '请求异常',
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.titleSmall,
),
const SizedBox(height: 20),
Color primary = Theme.of(context).colorScheme.primary;
final errorContent = SizedBox(
height: 400,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset("assets/images/error.svg", height: 200),
const SizedBox(height: 30),
Text(
errMsg ?? '请求异常',
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.titleSmall,
),
const SizedBox(height: 20),
if (isShowBtn)
FilledButton.tonal(
onPressed: () {
fn!();
},
onPressed: () => fn?.call(),
style: ButtonStyle(
backgroundColor: MaterialStateProperty.resolveWith((states) {
return Theme.of(context).colorScheme.primary.withAlpha(20);
return primary.withAlpha(20);
}),
),
child: Text(
btnText ?? '点击重试',
style: TextStyle(color: Theme.of(context).colorScheme.primary),
),
child: Text(btnText ?? '点击重试', style: TextStyle(color: primary)),
),
],
),
],
),
);
if (isInSliver) {
return SliverToBoxAdapter(child: errorContent);
} else {
return Align(alignment: Alignment.topCenter, child: errorContent);
}
}
}

View File

@ -2,11 +2,11 @@ import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:hive/hive.dart';
import 'package:pilipala/utils/extension.dart';
import 'package:pilipala/utils/global_data.dart';
import 'package:pilipala/utils/global_data_cache.dart';
import '../../utils/storage.dart';
import '../constants.dart';
Box<dynamic> setting = GStrorage.setting;
Box<dynamic> setting = GStorage.setting;
class NetworkImgLayer extends StatelessWidget {
const NetworkImgLayer({
@ -20,6 +20,7 @@ class NetworkImgLayer extends StatelessWidget {
// 图片质量 默认1%
this.quality,
this.origAspectRatio,
this.radius,
});
final String? src;
@ -30,13 +31,31 @@ class NetworkImgLayer extends StatelessWidget {
final Duration? fadeInDuration;
final int? quality;
final double? origAspectRatio;
final double? radius;
BorderRadius getBorderRadius(String? type, double? radius) {
return BorderRadius.circular(
radius ??
(type == 'avatar'
? 50
: type == 'emote'
? 0
: StyleString.imgRadius.x),
);
}
@override
Widget build(BuildContext context) {
final int defaultImgQuality = GlobalData().imgQuality;
int defaultImgQuality = 10;
try {
defaultImgQuality = GlobalDataCache.imgQuality;
} catch (_) {}
if (src == '' || src == null) {
return placeholder(context);
}
final String imageUrl =
'${src!.startsWith('//') ? 'https:${src!}' : src!}@${quality ?? defaultImgQuality}q.webp';
print(imageUrl);
int? memCacheWidth, memCacheHeight;
double aspectRatio = (width / height).toDouble();
@ -66,13 +85,7 @@ class NetworkImgLayer extends StatelessWidget {
return src != '' && src != null
? ClipRRect(
clipBehavior: Clip.antiAlias,
borderRadius: BorderRadius.circular(
type == 'avatar'
? 50
: type == 'emote'
? 0
: StyleString.imgRadius.x,
),
borderRadius: getBorderRadius(type, radius),
child: CachedNetworkImage(
imageUrl: imageUrl,
width: width,
@ -101,11 +114,7 @@ class NetworkImgLayer extends StatelessWidget {
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.onInverseSurface.withOpacity(0.4),
borderRadius: BorderRadius.circular(type == 'avatar'
? 50
: type == 'emote'
? 0
: StyleString.imgRadius.x),
borderRadius: getBorderRadius(type, radius),
),
child: type == 'bg'
? const SizedBox()

View File

@ -1,86 +0,0 @@
import 'package:flutter/material.dart';
import '../../utils/download.dart';
import '../constants.dart';
import 'network_img_layer.dart';
class OverlayPop extends StatelessWidget {
const OverlayPop({super.key, this.videoItem, this.closeFn});
final dynamic videoItem;
final Function? closeFn;
@override
Widget build(BuildContext context) {
final double imgWidth = MediaQuery.sizeOf(context).width - 8 * 2;
return Container(
margin: const EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
borderRadius: BorderRadius.circular(10.0),
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Stack(
children: [
NetworkImgLayer(
width: imgWidth,
height: imgWidth / StyleString.aspectRatio,
src: videoItem.pic! as String,
quality: 100,
),
Positioned(
right: 8,
top: 8,
child: Container(
width: 30,
height: 30,
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.3),
borderRadius:
const BorderRadius.all(Radius.circular(20))),
child: IconButton(
style: ButtonStyle(
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: () => closeFn!(),
icon: const Icon(
Icons.close,
size: 18,
color: Colors.white,
),
),
),
),
],
),
Padding(
padding: const EdgeInsets.fromLTRB(12, 10, 8, 10),
child: Row(
children: [
Expanded(
child: Text(
videoItem.title! as String,
),
),
const SizedBox(width: 4),
IconButton(
tooltip: '保存封面图',
onPressed: () async {
await DownloadUtils.downloadImg(
videoItem.pic != null
? videoItem.pic as String
: videoItem.cover as String,
);
// closeFn!();
},
icon: const Icon(Icons.download, size: 20),
)
],
)),
],
),
);
}
}

View File

@ -1,130 +0,0 @@
// ignore_for_file: depend_on_referenced_packages
import 'dart:math';
import 'dart:ui' as ui show Image;
import 'package:extended_image/extended_image.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:pull_to_refresh_notification/pull_to_refresh_notification.dart';
double get maxDragOffset => 100;
double hideHeight = maxDragOffset / 2.3;
double refreshHeight = maxDragOffset / 1.5;
class PullToRefreshHeader extends StatelessWidget {
const PullToRefreshHeader(
this.info,
this.lastRefreshTime, {
this.color,
super.key,
});
final PullToRefreshScrollNotificationInfo? info;
final DateTime? lastRefreshTime;
final Color? color;
@override
Widget build(BuildContext context) {
final PullToRefreshScrollNotificationInfo? infos = info;
if (infos == null) {
return const SizedBox();
}
String text = '';
if (infos.mode == PullToRefreshIndicatorMode.armed) {
text = 'Release to refresh';
} else if (infos.mode == PullToRefreshIndicatorMode.refresh ||
infos.mode == PullToRefreshIndicatorMode.snap) {
text = 'Loading...';
} else if (infos.mode == PullToRefreshIndicatorMode.done) {
text = 'Refresh completed.';
} else if (infos.mode == PullToRefreshIndicatorMode.drag) {
text = 'Pull to refresh';
} else if (infos.mode == PullToRefreshIndicatorMode.canceled) {
text = 'Cancel refresh';
}
final TextStyle ts = const TextStyle(
color: Colors.grey,
).copyWith(fontSize: 14);
final double dragOffset = info?.dragOffset ?? 0.0;
final DateTime time = lastRefreshTime ?? DateTime.now();
final double top = -hideHeight + dragOffset;
return Container(
height: dragOffset,
color: color ?? Colors.transparent,
// padding: EdgeInsets.only(top: dragOffset / 3),
// padding: EdgeInsets.only(bottom: 5.0),
child: Stack(
children: <Widget>[
Positioned(
left: 0.0,
right: 0.0,
top: top,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: Container(
alignment: Alignment.centerRight,
margin: const EdgeInsets.only(right: 12.0),
child: RefreshImage(top, null),
),
),
Column(
children: <Widget>[
Text(text, style: ts),
Text(
'Last updated:${DateFormat('yyyy-MM-dd hh:mm').format(time)}',
style: ts.copyWith(fontSize: 14),
)
],
),
const Spacer(),
],
),
)
],
),
);
}
}
class RefreshImage extends StatelessWidget {
const RefreshImage(this.top, Key? key) : super(key: key);
final double top;
@override
Widget build(BuildContext context) {
const double imageSize = 30;
return ExtendedImage.asset(
'assets/flutterCandies_grey.png',
width: imageSize,
height: imageSize,
afterPaintImage: (Canvas canvas, Rect rect, ui.Image image, Paint paint) {
final double imageHeight = image.height.toDouble();
final double imageWidth = image.width.toDouble();
final Size size = rect.size;
final double y =
(1 - min(top / (refreshHeight - hideHeight), 1)) * imageHeight;
canvas.drawImageRect(
image,
Rect.fromLTWH(0.0, y, imageWidth, imageHeight - y),
Rect.fromLTWH(rect.left, rect.top + y / imageHeight * size.height,
size.width, (imageHeight - y) / imageHeight * size.height),
Paint()
..colorFilter =
const ColorFilter.mode(Color(0xFFea5504), BlendMode.srcIn)
..isAntiAlias = false
..filterQuality = FilterQuality.low,
);
//canvas.restore();
},
);
}
}

View File

@ -6,7 +6,7 @@ class StatDanMu extends StatelessWidget {
final dynamic danmu;
final String? size;
const StatDanMu({Key? key, this.theme, this.danmu, this.size})
const StatDanMu({Key? key, this.theme = 'gray', this.danmu, this.size})
: super(key: key);
@override
@ -14,24 +14,49 @@ class StatDanMu extends StatelessWidget {
Map<String, Color> colorObject = {
'white': Colors.white,
'gray': Theme.of(context).colorScheme.outline,
'black': Theme.of(context).colorScheme.onBackground.withOpacity(0.8),
'black': Theme.of(context).colorScheme.onSurface.withOpacity(0.8),
};
Color color = colorObject[theme]!;
return StatIconText(
icon: Icons.subtitles_outlined,
text: Utils.numFormat(danmu!),
color: color,
size: size,
);
}
}
class StatIconText extends StatelessWidget {
final IconData icon;
final String text;
final Color color;
final String? size;
const StatIconText({
Key? key,
required this.icon,
required this.text,
required this.color,
this.size,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Row(
children: [
Icon(
Icons.subtitles_outlined,
icon,
size: 14,
color: color,
),
const SizedBox(width: 2),
Text(
Utils.numFormat(danmu!),
text,
style: TextStyle(
fontSize: size == 'medium' ? 12 : 11,
color: color,
),
)
),
],
);
}

View File

@ -6,27 +6,56 @@ class StatView extends StatelessWidget {
final dynamic view;
final String? size;
const StatView({Key? key, this.theme, this.view, this.size})
: super(key: key);
const StatView({
Key? key,
this.theme = 'gray',
this.view,
this.size,
}) : super(key: key);
@override
Widget build(BuildContext context) {
Map<String, Color> colorObject = {
'white': Colors.white,
'gray': Theme.of(context).colorScheme.outline,
'black': Theme.of(context).colorScheme.onBackground.withOpacity(0.8),
'black': Theme.of(context).colorScheme.onSurface.withOpacity(0.8),
};
Color color = colorObject[theme]!;
return StatIconText(
icon: Icons.play_circle_outlined,
text: Utils.numFormat(view!),
color: color,
size: size,
);
}
}
class StatIconText extends StatelessWidget {
final IconData icon;
final String text;
final Color color;
final String? size;
const StatIconText({
Key? key,
required this.icon,
required this.text,
required this.color,
this.size,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Row(
children: [
Icon(
Icons.play_circle_outlined,
icon,
size: 13,
color: color,
),
const SizedBox(width: 2),
Text(
Utils.numFormat(view!),
text,
style: TextStyle(
fontSize: size == 'medium' ? 12 : 11,
color: color,

View File

@ -1,12 +1,18 @@
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'package:pilipala/http/constants.dart';
import 'package:pilipala/utils/feed_back.dart';
import 'package:pilipala/utils/image_save.dart';
import 'package:pilipala/utils/route_push.dart';
import 'package:pilipala/utils/url_utils.dart';
import '../../http/search.dart';
import '../../http/user.dart';
import '../../http/video.dart';
import '../../utils/utils.dart';
import '../constants.dart';
import 'badge.dart';
import 'drag_handle.dart';
import 'network_img_layer.dart';
import 'stat/danmu.dart';
import 'stat/view.dart';
@ -16,113 +22,145 @@ class VideoCardH extends StatelessWidget {
const VideoCardH({
super.key,
required this.videoItem,
this.longPress,
this.longPressEnd,
this.onPressedFn,
this.source = 'normal',
this.showOwner = true,
this.showView = true,
this.showDanmaku = true,
this.showPubdate = false,
this.showCharge = false,
});
// ignore: prefer_typing_uninitialized_variables
final videoItem;
final Function()? longPress;
final Function()? longPressEnd;
final Function()? onPressedFn;
// normal 推荐, later 稍后再看, search 搜索
final String source;
final bool showOwner;
final bool showView;
final bool showDanmaku;
final bool showPubdate;
final bool showCharge;
@override
Widget build(BuildContext context) {
final int aid = videoItem.aid;
final String bvid = videoItem.bvid;
String type = 'video';
try {
type = videoItem.type;
} catch (_) {}
final String heroTag = Utils.makeHeroTag(aid);
return GestureDetector(
onLongPress: () {
if (longPress != null) {
longPress!();
return InkWell(
onTap: () async {
try {
if (type == 'ketang') {
SmartDialog.showToast('课堂视频暂不支持播放');
return;
}
if (showCharge && videoItem?.typeid == 33) {
final String redirectUrl = await UrlUtils.parseRedirectUrl(
'${HttpString.baseUrl}/video/$bvid/');
final String lastPathSegment = redirectUrl.split('/').last;
if (lastPathSegment.contains('ss')) {
RoutePush.bangumiPush(
Utils.matchNum(lastPathSegment).first, null);
}
if (lastPathSegment.contains('ep')) {
RoutePush.bangumiPush(
null, Utils.matchNum(lastPathSegment).first);
}
return;
}
final int cid =
videoItem.cid ?? await SearchHttp.ab2c(aid: aid, bvid: bvid);
Get.toNamed('/video?bvid=$bvid&cid=$cid',
arguments: {'videoItem': videoItem, 'heroTag': heroTag});
} catch (err) {
SmartDialog.showToast(err.toString());
}
},
// onLongPressEnd: (details) {
// if (longPressEnd != null) {
// longPressEnd!();
// }
// },
child: InkWell(
onTap: () async {
try {
final int cid =
videoItem.cid ?? await SearchHttp.ab2c(aid: aid, bvid: bvid);
Get.toNamed('/video?bvid=$bvid&cid=$cid',
arguments: {'videoItem': videoItem, 'heroTag': heroTag});
} catch (err) {
SmartDialog.showToast(err.toString());
}
},
child: Padding(
padding: const EdgeInsets.fromLTRB(
StyleString.safeSpace, 5, StyleString.safeSpace, 5),
child: LayoutBuilder(
builder: (BuildContext context, BoxConstraints boxConstraints) {
final double width = (boxConstraints.maxWidth -
StyleString.cardSpace *
6 /
MediaQuery.textScalerOf(context).scale(1.0)) /
2;
return Container(
constraints: const BoxConstraints(minHeight: 88),
height: width / StyleString.aspectRatio,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AspectRatio(
aspectRatio: StyleString.aspectRatio,
child: LayoutBuilder(
builder: (BuildContext context,
BoxConstraints boxConstraints) {
final double maxWidth = boxConstraints.maxWidth;
final double maxHeight = boxConstraints.maxHeight;
return Stack(
children: [
Hero(
tag: heroTag,
child: NetworkImgLayer(
src: videoItem.pic as String,
width: maxWidth,
height: maxHeight,
),
onLongPress: () => imageSaveDialog(
context,
videoItem,
SmartDialog.dismiss,
),
child: Padding(
padding: const EdgeInsets.fromLTRB(
StyleString.safeSpace, 5, StyleString.safeSpace, 5),
child: LayoutBuilder(
builder: (BuildContext context, BoxConstraints boxConstraints) {
final double width = (boxConstraints.maxWidth -
StyleString.cardSpace *
6 /
MediaQuery.textScalerOf(context).scale(1.0)) /
2;
return Container(
constraints: const BoxConstraints(minHeight: 88),
height: width / StyleString.aspectRatio,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AspectRatio(
aspectRatio: StyleString.aspectRatio,
child: LayoutBuilder(
builder: (BuildContext context,
BoxConstraints boxConstraints) {
final double maxWidth = boxConstraints.maxWidth;
final double maxHeight = boxConstraints.maxHeight;
return Stack(
children: [
Hero(
tag: heroTag,
child: NetworkImgLayer(
src: videoItem.pic as String,
width: maxWidth,
height: maxHeight,
),
),
if (videoItem.duration != 0)
PBadge(
text: Utils.timeFormat(videoItem.duration!),
right: 6.0,
bottom: 6.0,
type: 'gray',
),
// if (videoItem.rcmdReason != null &&
// videoItem.rcmdReason.content != '')
// pBadge(videoItem.rcmdReason.content, context,
// 6.0, 6.0, null, null),
],
);
},
),
if (type != 'video')
PBadge(
text: type,
left: 6.0,
bottom: 6.0,
type: 'primary',
),
// if (videoItem.rcmdReason != null &&
// videoItem.rcmdReason.content != '')
// pBadge(videoItem.rcmdReason.content, context,
// 6.0, 6.0, null, null),
if (showCharge && videoItem?.isChargingSrc)
const PBadge(
text: '充电专属',
right: 6.0,
top: 6.0,
type: 'primary',
),
],
);
},
),
VideoContent(
videoItem: videoItem,
source: source,
showOwner: showOwner,
showView: showView,
showDanmaku: showDanmaku,
showPubdate: showPubdate,
)
],
),
);
},
),
),
VideoContent(
videoItem: videoItem,
source: source,
showOwner: showOwner,
showView: showView,
showDanmaku: showDanmaku,
showPubdate: showPubdate,
onPressedFn: onPressedFn,
)
],
),
);
},
),
),
);
@ -137,6 +175,7 @@ class VideoContent extends StatelessWidget {
final bool showView;
final bool showDanmaku;
final bool showPubdate;
final Function()? onPressedFn;
const VideoContent({
super.key,
@ -146,6 +185,7 @@ class VideoContent extends StatelessWidget {
this.showView = true,
this.showDanmaku = true,
this.showPubdate = false,
this.onPressedFn,
});
@override
@ -156,7 +196,7 @@ class VideoContent extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (videoItem.title is String) ...[
if (source == 'normal' || source == 'later') ...[
Text(
videoItem.title as String,
textAlign: TextAlign.start,
@ -171,7 +211,7 @@ class VideoContent extends StatelessWidget {
maxLines: 2,
text: TextSpan(
children: [
for (final i in videoItem.title) ...[
for (final i in videoItem.titleList) ...[
TextSpan(
text: i['text'] as String,
style: TextStyle(
@ -227,128 +267,49 @@ class VideoContent extends StatelessWidget {
Row(
children: [
if (showView) ...[
StatView(
theme: 'gray',
view: videoItem.stat.view as int,
),
StatView(view: videoItem.stat.view as int),
const SizedBox(width: 8),
],
if (showDanmaku)
StatDanMu(
theme: 'gray',
danmu: videoItem.stat.danmaku as int,
),
StatDanMu(danmu: videoItem.stat.danmaku as int),
const Spacer(),
// SizedBox(
// width: 20,
// height: 20,
// child: IconButton(
// tooltip: '稍后再看',
// style: ButtonStyle(
// padding: MaterialStateProperty.all(EdgeInsets.zero),
// ),
// onPressed: () async {
// var res =
// await UserHttp.toViewLater(bvid: videoItem.bvid);
// SmartDialog.showToast(res['msg']);
// },
// icon: Icon(
// Icons.more_vert_outlined,
// color: Theme.of(context).colorScheme.outline,
// size: 14,
// ),
// ),
// ),
if (source == 'normal')
SizedBox(
width: 24,
height: 24,
child: PopupMenuButton<String>(
child: IconButton(
padding: EdgeInsets.zero,
onPressed: () {
feedBack();
showModalBottomSheet(
context: context,
useRootNavigator: true,
isScrollControlled: true,
builder: (context) {
return MorePanel(videoItem: videoItem);
},
);
},
icon: Icon(
Icons.more_vert_outlined,
color: Theme.of(context).colorScheme.outline,
size: 14,
),
position: PopupMenuPosition.under,
// constraints: const BoxConstraints(maxHeight: 35),
onSelected: (String type) {},
itemBuilder: (BuildContext context) =>
<PopupMenuEntry<String>>[
PopupMenuItem<String>(
onTap: () async {
var res = await UserHttp.toViewLater(
bvid: videoItem.bvid as String);
SmartDialog.showToast(res['msg']);
},
value: 'pause',
height: 40,
child: const Row(
children: [
Icon(Icons.watch_later_outlined, size: 16),
SizedBox(width: 6),
Text('稍后再看', style: TextStyle(fontSize: 13))
],
),
),
const PopupMenuDivider(),
PopupMenuItem<String>(
onTap: () async {
SmartDialog.show(
useSystem: true,
animationType:
SmartAnimationType.centerFade_otherSlide,
builder: (BuildContext context) {
return AlertDialog(
title: const Text('提示'),
content: Text(
'确定拉黑:${videoItem.owner.name}(${videoItem.owner.mid})?'
'\n\n被拉黑的Up可以在隐私设置-黑名单管理中解除'),
actions: [
TextButton(
onPressed: () => SmartDialog.dismiss(),
child: Text(
'点错了',
style: TextStyle(
color: Theme.of(context)
.colorScheme
.outline),
),
),
TextButton(
onPressed: () async {
var res = await VideoHttp.relationMod(
mid: videoItem.owner.mid,
act: 5,
reSrc: 11,
);
SmartDialog.dismiss();
SmartDialog.showToast(res['code'] == 0
? '成功'
: res['msg']);
},
child: const Text('确认'),
)
],
);
},
);
},
value: 'pause',
height: 40,
child: Row(
children: [
const Icon(Icons.block, size: 16),
const SizedBox(width: 6),
Text('拉黑:${videoItem.owner.name}',
style: const TextStyle(fontSize: 13))
],
),
),
],
),
),
if (source == 'later') ...[
IconButton(
style: ButtonStyle(
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: () => onPressedFn?.call(),
icon: Icon(
Icons.clear_outlined,
color: Theme.of(context).colorScheme.outline,
size: 18,
),
)
],
],
),
],
@ -357,3 +318,95 @@ class VideoContent extends StatelessWidget {
);
}
}
class MorePanel extends StatelessWidget {
final dynamic videoItem;
const MorePanel({super.key, required this.videoItem});
Future<dynamic> menuActionHandler(String type) async {
switch (type) {
case 'block':
blockUser();
break;
case 'watchLater':
var res = await UserHttp.toViewLater(bvid: videoItem.bvid as String);
SmartDialog.showToast(res['msg']);
Get.back();
break;
default:
}
}
void blockUser() async {
SmartDialog.show(
useSystem: true,
animationType: SmartAnimationType.centerFade_otherSlide,
builder: (BuildContext context) {
return AlertDialog(
title: const Text('提示'),
content: Text('确定拉黑:${videoItem.owner.name}(${videoItem.owner.mid})?'
'\n\n被拉黑的Up可以在隐私设置-黑名单管理中解除'),
actions: [
TextButton(
onPressed: () => SmartDialog.dismiss(),
child: Text(
'点错了',
style: TextStyle(color: Theme.of(context).colorScheme.outline),
),
),
TextButton(
onPressed: () async {
var res = await VideoHttp.relationMod(
mid: videoItem.owner.mid,
act: 5,
reSrc: 11,
);
SmartDialog.dismiss();
SmartDialog.showToast(res['msg'] ?? '成功');
},
child: const Text('确认'),
)
],
);
},
);
}
@override
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const DragHandle(),
ListTile(
onTap: () async => await menuActionHandler('block'),
minLeadingWidth: 0,
leading: const Icon(Icons.block, size: 19),
title: Text(
'拉黑up主 「${videoItem.owner.name}',
style: Theme.of(context).textTheme.titleSmall,
),
),
ListTile(
onTap: () async => await menuActionHandler('watchLater'),
minLeadingWidth: 0,
leading: const Icon(Icons.watch_later_outlined, size: 19),
title:
Text('添加至稍后再看', style: Theme.of(context).textTheme.titleSmall),
),
ListTile(
onTap: () =>
imageSaveDialog(context, videoItem, SmartDialog.dismiss),
minLeadingWidth: 0,
leading: const Icon(Icons.photo_outlined, size: 19),
title:
Text('查看视频封面', style: Theme.of(context).textTheme.titleSmall),
),
const SizedBox(height: 20),
],
),
);
}
}

View File

@ -1,14 +1,16 @@
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'package:pilipala/utils/feed_back.dart';
import 'package:pilipala/utils/image_save.dart';
import 'package:pilipala/utils/route_push.dart';
import '../../models/model_rec_video_item.dart';
import 'drag_handle.dart';
import 'stat/danmu.dart';
import 'stat/view.dart';
import '../../http/dynamics.dart';
import '../../http/search.dart';
import '../../http/user.dart';
import '../../http/video.dart';
import '../../models/common/search_type.dart';
import '../../utils/id_utils.dart';
import '../../utils/utils.dart';
import '../constants.dart';
@ -19,15 +21,13 @@ import 'network_img_layer.dart';
class VideoCardV extends StatelessWidget {
final dynamic videoItem;
final int crossAxisCount;
final Function()? longPress;
final Function()? longPressEnd;
final Function? blockUserCb;
const VideoCardV({
Key? key,
required this.videoItem,
required this.crossAxisCount,
this.longPress,
this.longPressEnd,
this.blockUserCb,
}) : super(key: key);
bool isStringNumeric(String str) {
@ -44,23 +44,11 @@ class VideoCardV extends StatelessWidget {
return;
}
int epId = videoItem.param;
SmartDialog.showLoading(msg: '资源获取中');
var result = await SearchHttp.bangumiInfo(seasonId: null, epId: epId);
if (result['status']) {
var bangumiDetail = result['data'];
int cid = bangumiDetail.episodes!.first.cid;
String bvid = IdUtils.av2bv(bangumiDetail.episodes!.first.aid);
SmartDialog.dismiss().then(
(value) => Get.toNamed(
'/video?bvid=$bvid&cid=$cid&epId=$epId',
arguments: {
'pic': videoItem.pic,
'heroTag': heroTag,
'videoType': SearchType.media_bangumi,
},
),
);
}
RoutePush.bangumiPush(
null,
epId,
heroTag: heroTag,
);
break;
case 'av':
String bvid = videoItem.bvid ?? IdUtils.av2bv(videoItem.aid);
@ -73,17 +61,13 @@ class VideoCardV extends StatelessWidget {
// 动态
case 'picture':
try {
String dynamicType = 'picture';
String uri = videoItem.uri;
String id = '';
if (videoItem.uri.startsWith('bilibili://article/')) {
// https://www.bilibili.com/read/cv27063554
dynamicType = 'read';
RegExp regex = RegExp(r'\d+');
Match match = regex.firstMatch(videoItem.uri)!;
String matchedNumber = match.group(0)!;
videoItem.param = int.parse(matchedNumber);
id = 'cv${videoItem.param}';
}
if (uri.startsWith('http')) {
String path = Uri.parse(uri).path;
@ -101,11 +85,10 @@ class VideoCardV extends StatelessWidget {
return;
}
}
Get.toNamed('/htmlRender', parameters: {
'url': uri,
Get.toNamed('/read', parameters: {
'title': videoItem.title,
'id': id,
'dynamicType': dynamicType
'id': videoItem.param,
'articleType': 'read'
});
} catch (err) {
SmartDialog.showToast(err.toString());
@ -127,64 +110,57 @@ class VideoCardV extends StatelessWidget {
@override
Widget build(BuildContext context) {
String heroTag = Utils.makeHeroTag(videoItem.id);
return Card(
elevation: 0,
clipBehavior: Clip.hardEdge,
margin: EdgeInsets.zero,
child: GestureDetector(
onLongPress: () {
if (longPress != null) {
longPress!();
}
},
// onLongPressEnd: (details) {
// if (longPressEnd != null) {
// longPressEnd!();
// }
// },
child: InkWell(
onTap: () async => onPushDetail(heroTag),
child: Column(
children: [
AspectRatio(
aspectRatio: StyleString.aspectRatio,
child: LayoutBuilder(builder: (context, boxConstraints) {
double maxWidth = boxConstraints.maxWidth;
double maxHeight = boxConstraints.maxHeight;
return Stack(
children: [
Hero(
tag: heroTag,
child: NetworkImgLayer(
src: videoItem.pic,
width: maxWidth,
height: maxHeight,
),
),
if (videoItem.duration > 0)
if (crossAxisCount == 1) ...[
PBadge(
bottom: 10,
right: 10,
text: Utils.timeFormat(videoItem.duration),
)
] else ...[
PBadge(
bottom: 6,
right: 7,
size: 'small',
type: 'gray',
text: Utils.timeFormat(videoItem.duration),
)
],
return InkWell(
onTap: () async => onPushDetail(heroTag),
onLongPress: () => imageSaveDialog(
context,
videoItem,
SmartDialog.dismiss,
),
borderRadius: BorderRadius.circular(16),
child: Column(
children: [
AspectRatio(
aspectRatio: StyleString.aspectRatio,
child: LayoutBuilder(builder: (context, boxConstraints) {
double maxWidth = boxConstraints.maxWidth;
double maxHeight = boxConstraints.maxHeight;
return Stack(
children: [
Hero(
tag: heroTag,
child: NetworkImgLayer(
src: videoItem.pic,
width: maxWidth,
height: maxHeight,
),
),
if (videoItem.duration > 0)
if (crossAxisCount == 1) ...[
PBadge(
bottom: 10,
right: 10,
text: Utils.timeFormat(videoItem.duration),
)
] else ...[
PBadge(
bottom: 6,
right: 7,
size: 'small',
type: 'gray',
text: Utils.timeFormat(videoItem.duration),
)
],
);
}),
),
VideoContent(videoItem: videoItem, crossAxisCount: crossAxisCount)
],
],
);
}),
),
),
VideoContent(
videoItem: videoItem,
crossAxisCount: crossAxisCount,
blockUserCb: blockUserCb,
)
],
),
);
}
@ -193,125 +169,101 @@ class VideoCardV extends StatelessWidget {
class VideoContent extends StatelessWidget {
final dynamic videoItem;
final int crossAxisCount;
const VideoContent(
{Key? key, required this.videoItem, required this.crossAxisCount})
: super(key: key);
final Function? blockUserCb;
const VideoContent({
Key? key,
required this.videoItem,
required this.crossAxisCount,
this.blockUserCb,
}) : super(key: key);
Widget _buildBadge(String text, String type, [double fs = 12]) {
return PBadge(
text: text,
stack: 'normal',
size: 'small',
type: type,
fs: fs,
);
}
@override
Widget build(BuildContext context) {
return Expanded(
flex: crossAxisCount == 1 ? 0 : 1,
child: Padding(
padding: crossAxisCount == 1
? const EdgeInsets.fromLTRB(9, 9, 9, 4)
: const EdgeInsets.fromLTRB(5, 8, 5, 4),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Expanded(
child: Text(
videoItem.title,
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
),
if (videoItem.goto == 'av' && crossAxisCount == 1) ...[
const SizedBox(width: 10),
VideoPopupMenu(
size: 32,
iconSize: 18,
videoItem: videoItem,
),
],
],
),
if (crossAxisCount > 1) ...[
const SizedBox(height: 2),
VideoStat(
videoItem: videoItem,
crossAxisCount: crossAxisCount,
),
],
if (crossAxisCount == 1) const SizedBox(height: 4),
Row(
children: [
if (videoItem.goto == 'bangumi') ...[
PBadge(
text: videoItem.bangumiBadge,
stack: 'normal',
size: 'small',
type: 'line',
fs: 9,
)
],
if (videoItem.rcmdReason != null &&
videoItem.rcmdReason.content != '') ...[
PBadge(
text: videoItem.rcmdReason.content,
stack: 'normal',
size: 'small',
type: 'color',
)
],
if (videoItem.goto == 'picture') ...[
const PBadge(
text: '动态',
stack: 'normal',
size: 'small',
type: 'line',
fs: 9,
)
],
if (videoItem.isFollowed == 1) ...[
const PBadge(
text: '已关注',
stack: 'normal',
size: 'small',
type: 'color',
)
],
Expanded(
flex: crossAxisCount == 1 ? 0 : 1,
child: Text(
videoItem.owner.name,
maxLines: 1,
style: TextStyle(
fontSize:
Theme.of(context).textTheme.labelMedium!.fontSize,
color: Theme.of(context).colorScheme.outline,
),
),
),
if (crossAxisCount == 1) ...[
Text(
'',
style: TextStyle(
fontSize:
Theme.of(context).textTheme.labelMedium!.fontSize,
color: Theme.of(context).colorScheme.outline,
),
),
VideoStat(
videoItem: videoItem,
crossAxisCount: crossAxisCount,
),
const Spacer(),
],
if (videoItem.goto == 'av' && crossAxisCount != 1) ...[
VideoPopupMenu(
size: 24,
iconSize: 14,
videoItem: videoItem,
),
] else ...[
const SizedBox(height: 24)
]
],
),
return Padding(
padding: crossAxisCount == 1
? const EdgeInsets.fromLTRB(9, 9, 9, 4)
: const EdgeInsets.fromLTRB(5, 8, 5, 4),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
videoItem.title,
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
if (crossAxisCount > 1) ...[
const SizedBox(height: 2),
VideoStat(videoItem: videoItem, crossAxisCount: crossAxisCount),
],
),
if (crossAxisCount == 1) const SizedBox(height: 4),
Row(
children: [
if (videoItem.goto == 'bangumi')
_buildBadge(videoItem.bangumiBadge, 'line', 9),
if (videoItem.rcmdReason != null)
_buildBadge(videoItem.rcmdReason, 'color'),
if (videoItem.goto == 'picture') _buildBadge('动态', 'line', 9),
if (videoItem.isFollowed == 1) _buildBadge('已关注', 'color'),
Expanded(
flex: crossAxisCount == 1 ? 0 : 1,
child: Text(
videoItem.owner.name,
maxLines: 1,
style: TextStyle(
fontSize: Theme.of(context).textTheme.labelMedium!.fontSize,
color: Theme.of(context).colorScheme.outline,
),
),
),
if (crossAxisCount == 1) ...[
const SizedBox(width: 10),
VideoStat(
videoItem: videoItem,
crossAxisCount: crossAxisCount,
),
const Spacer(),
],
if (videoItem.goto == 'av')
SizedBox(
width: 24,
height: 24,
child: IconButton(
padding: EdgeInsets.zero,
onPressed: () {
feedBack();
showModalBottomSheet(
context: context,
useRootNavigator: true,
isScrollControlled: true,
builder: (context) {
return MorePanel(
videoItem: videoItem,
blockUserCb: blockUserCb,
);
},
);
},
icon: Icon(
Icons.more_vert_outlined,
color: Theme.of(context).colorScheme.outline,
size: 14,
),
),
)
],
),
],
),
);
}
@ -331,15 +283,10 @@ class VideoStat extends StatelessWidget {
Widget build(BuildContext context) {
return Row(
children: [
StatView(
theme: 'gray',
view: videoItem.stat.view,
),
if (videoItem.stat.view != null) StatView(view: videoItem.stat.view),
const SizedBox(width: 8),
StatDanMu(
theme: 'gray',
danmu: videoItem.stat.danmu,
),
if (videoItem.stat.danmu != null)
StatDanMu(danmu: videoItem.stat.danmu),
if (videoItem is RecVideoItemModel) ...<Widget>[
crossAxisCount > 1 ? const Spacer() : const SizedBox(width: 8),
RichText(
@ -358,99 +305,101 @@ class VideoStat extends StatelessWidget {
}
}
class VideoPopupMenu extends StatelessWidget {
final double? size;
final double? iconSize;
class MorePanel extends StatelessWidget {
final dynamic videoItem;
const VideoPopupMenu({
Key? key,
required this.size,
required this.iconSize,
final Function? blockUserCb;
const MorePanel({
super.key,
required this.videoItem,
}) : super(key: key);
this.blockUserCb,
});
Future<dynamic> menuActionHandler(String type) async {
switch (type) {
case 'block':
Get.back();
blockUser();
break;
case 'watchLater':
var res = await UserHttp.toViewLater(bvid: videoItem.bvid as String);
SmartDialog.showToast(res['msg']);
Get.back();
break;
default:
}
}
void blockUser() async {
SmartDialog.show(
useSystem: true,
animationType: SmartAnimationType.centerFade_otherSlide,
builder: (BuildContext context) {
return AlertDialog(
title: const Text('提示'),
content: Text('确定拉黑:${videoItem.owner.name}(${videoItem.owner.mid})?'
'\n\n被拉黑的Up可以在隐私设置-黑名单管理中解除'),
actions: [
TextButton(
onPressed: () => SmartDialog.dismiss(),
child: Text(
'点错了',
style: TextStyle(color: Theme.of(context).colorScheme.outline),
),
),
TextButton(
onPressed: () async {
var res = await VideoHttp.relationMod(
mid: videoItem.owner.mid,
act: 5,
reSrc: 11,
);
SmartDialog.dismiss();
if (res['status']) {
blockUserCb?.call(videoItem.owner.mid);
}
SmartDialog.showToast(res['msg']);
},
child: const Text('确认'),
)
],
);
},
);
}
@override
Widget build(BuildContext context) {
return SizedBox(
width: size,
height: size,
child: PopupMenuButton<String>(
padding: EdgeInsets.zero,
icon: Icon(
Icons.more_vert_outlined,
color: Theme.of(context).colorScheme.outline,
size: iconSize,
),
position: PopupMenuPosition.under,
// constraints: const BoxConstraints(maxHeight: 35),
onSelected: (String type) {},
itemBuilder: (BuildContext context) => <PopupMenuEntry<String>>[
PopupMenuItem<String>(
onTap: () async {
var res =
await UserHttp.toViewLater(bvid: videoItem.bvid as String);
SmartDialog.showToast(res['msg']);
},
value: 'pause',
height: 40,
child: const Row(
children: [
Icon(Icons.watch_later_outlined, size: 16),
SizedBox(width: 6),
Text('稍后再看', style: TextStyle(fontSize: 13))
],
return Padding(
padding: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const DragHandle(),
ListTile(
onTap: () async => await menuActionHandler('block'),
minLeadingWidth: 0,
leading: const Icon(Icons.block, size: 19),
title: Text(
'拉黑up主 「${videoItem.owner.name}',
style: Theme.of(context).textTheme.titleSmall,
),
),
const PopupMenuDivider(),
PopupMenuItem<String>(
onTap: () async {
SmartDialog.show(
useSystem: true,
animationType: SmartAnimationType.centerFade_otherSlide,
builder: (BuildContext context) {
return AlertDialog(
title: const Text('提示'),
content: Text(
'确定拉黑:${videoItem.owner.name}(${videoItem.owner.mid})?'
'\n\n被拉黑的Up可以在隐私设置-黑名单管理中解除'),
actions: [
TextButton(
onPressed: () => SmartDialog.dismiss(),
child: Text(
'点错了',
style: TextStyle(
color: Theme.of(context).colorScheme.outline),
),
),
TextButton(
onPressed: () async {
var res = await VideoHttp.relationMod(
mid: videoItem.owner.mid,
act: 5,
reSrc: 11,
);
SmartDialog.dismiss();
SmartDialog.showToast(res['msg'] ?? '成功');
},
child: const Text('确认'),
)
],
);
},
);
},
value: 'pause',
height: 40,
child: Row(
children: [
const Icon(Icons.block, size: 16),
const SizedBox(width: 6),
Text('拉黑:${videoItem.owner.name}',
style: const TextStyle(fontSize: 13))
],
),
ListTile(
onTap: () async => await menuActionHandler('watchLater'),
minLeadingWidth: 0,
leading: const Icon(Icons.watch_later_outlined, size: 19),
title:
Text('添加至稍后再看', style: Theme.of(context).textTheme.titleSmall),
),
ListTile(
onTap: () =>
imageSaveDialog(context, videoItem, SmartDialog.dismiss),
minLeadingWidth: 0,
leading: const Icon(Icons.photo_outlined, size: 19),
title:
Text('查看视频封面', style: Theme.of(context).textTheme.titleSmall),
),
const SizedBox(height: 20),
],
),
);

View File

@ -104,7 +104,7 @@ class Api {
// 评论列表
// https://api.bilibili.com/x/v2/reply/main?csrf=6e22efc1a47225ea25f901f922b5cfdd&mode=3&oid=254175381&pagination_str=%7B%22offset%22:%22%22%7D&plat=1&seek_rpid=0&type=11
static const String replyList = '/x/v2/reply';
static const String replyList = '/x/v2/reply/main';
// 楼中楼
static const String replyReplyList = '/x/v2/reply/reply';
@ -175,7 +175,7 @@ class Api {
static const String delHistory = '/x/v2/history/delete';
// 搜索历史记录
static const String searchHistory = '/x/web-goblin/history/search';
static const String searchHistory = '/x/web-interface/history/search';
// 热搜
static const String hotSearchList =
@ -189,7 +189,7 @@ class Api {
'https://s.search.bilibili.com/main/suggest';
// 分类搜索
static const String searchByType = '/x/web-interface/search/type';
static const String searchByType = '/x/web-interface/wbi/search/type';
// 记录视频播放进度
// https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/video/report.md
@ -260,7 +260,8 @@ class Api {
static const String memberArchive = '/x/space/wbi/arc/search';
// 用户动态搜索
static const String memberDynamicSearch = '/x/space/dynamic/search';
static const String memberDynamicSearch =
'/x/polymer/web-dynamic/v1/feed/space/search';
// 用户动态
static const String memberDynamic = '/x/polymer/web-dynamic/v1/feed/space';
@ -301,10 +302,6 @@ class Api {
static const String bangumiList =
'/pgc/season/index/result?st=1&order=3&season_version=-1&spoken_language_type=-1&area=-1&is_finish=-1&copyright=-1&season_status=-1&season_month=-1&year=-1&style_id=-1&sort=0&season_type=1&pagesize=20&type=1';
// 我的订阅
static const String bangumiFollow =
'/x/space/bangumi/follow/list?type=1&follow_status=0&pn=1&ps=15&ts=1691544359969';
// 黑名单
static const String blackLst = '/x/relation/blacks';
@ -400,12 +397,24 @@ class Api {
'${HttpString.passBaseUrl}/x/passport-login/captcha?source=main_web';
// web端短信验证码
static const String smsCode =
static const String webSmsCode =
'${HttpString.passBaseUrl}/x/passport-login/web/sms/send';
// web端验证码登录
static const String webSmsLogin =
'${HttpString.passBaseUrl}/x/passport-login/web/login/sms';
// web端密码登录
static const String loginInByWebPwd =
'${HttpString.passBaseUrl}/x/passport-login/web/login';
// web端二维码
static const String qrCodeApi =
'${HttpString.passBaseUrl}/x/passport-login/web/qrcode/generate';
// 扫码登录
static const String loginInByQrcode =
'${HttpString.passBaseUrl}/x/passport-login/web/qrcode/poll';
// app端短信验证码
static const String appSmsCode =
@ -475,6 +484,8 @@ class Api {
static const getSeasonDetailApi =
'/x/polymer/web-space/seasons_archives_list';
static const getSeriesDetailApi = '/x/series/archives';
/// 获取未读动态数
static const getUnreadDynamic = '/x/web-interface/dynamic/entrance';
@ -484,11 +495,17 @@ class Api {
/// 激活buvid3
static const activateBuvidApi = '/x/internal/gaia-gateway/ExClimbWuzhi';
/// 获取字幕配置
static const getSubtitleConfig = '/x/player/wbi/v2';
/// 我的订阅
static const userSubFolder = '/x/v3/fav/folder/collected/list';
/// 我的订阅详情
static const userSubFolderDetail = '/x/space/fav/season/list';
/// 我的订阅详情 type 21
static const userSeasonList = '/x/space/fav/season/list';
/// 我的订阅详情 type 11
static const userResourceList = '/x/v3/fav/resource/list';
/// 表情
static const emojiList = '/x/emote/user/panel/web';
@ -499,4 +516,118 @@ class Api {
/// 发送私信
static const String sendMsg = '${HttpString.tUrl}/web_im/v1/web_im/send_msg';
/// 排行榜
static const String getRankApi = "/x/web-interface/ranking/v2";
/// 取消订阅
static const String cancelSub = '/x/v3/fav/season/unfav';
/// 动态转发
static const String dynamicForwardUrl = '/x/dynamic/feed/create/submit_check';
/// 创建动态
static const String dynamicCreate = '/x/dynamic/feed/create/dyn';
/// 删除收藏夹
static const String delFavFolder = '/x/v3/fav/folder/del';
/// 搜索结果计数
static const String searchCount = '/x/web-interface/wbi/search/all/v2';
/// 关闭会话
static const String removeSession =
'${HttpString.tUrl}/session_svr/v1/session_svr/remove_session';
/// 消息未读数
static const String unread = '${HttpString.tUrl}/x/im/web/msgfeed/unread';
/// 回复我的
static const String messageReplyAPi = '/x/msgfeed/reply';
/// 收到的赞
static const String messageLikeAPi = '/x/msgfeed/like';
/// 系统通知
static const String messageSystemAPi =
'${HttpString.messageBaseUrl}/x/sys-msg/query_unified_notify';
/// 系统通知 个人
static const String userMessageSystemAPi =
'${HttpString.messageBaseUrl}/x/sys-msg/query_user_notify';
/// 系统通知标记已读
static const String systemMarkRead =
'${HttpString.messageBaseUrl}/x/sys-msg/update_cursor';
/// 编辑收藏夹
static const String editFavFolder = '/x/v3/fav/folder/edit';
/// 新建收藏夹
static const String addFavFolder = '/x/v3/fav/folder/add';
/// 直播间弹幕信息
static const String getDanmuInfo =
'${HttpString.liveBaseUrl}/xlive/web-room/v1/index/getDanmuInfo';
/// 直播间发送弹幕
static const String sendLiveMsg = '${HttpString.liveBaseUrl}/msg/send';
/// 我的关注 - 正在直播
static const String getFollowingLive =
'${HttpString.liveBaseUrl}/xlive/web-ucenter/user/following';
/// 稍后再看&收藏夹视频列表
static const String mediaList = '/x/v2/medialist/resource/list';
/// 用户专栏
static const String opusList = '/x/polymer/web-dynamic/v1/opus/feed/space';
///
static const String getViewInfo = '/x/article/viewinfo';
/// 直播间记录
static const String liveRoomEntry =
'${HttpString.liveBaseUrl}/xlive/web-room/v1/index/roomEntryAction';
/// 用户信息
static const String accountInfo = '/x/member/web/account';
/// 更新用户信息
static const String updateAccountInfo = '/x/member/web/update';
/// 删除评论
static const String replyDel = '/x/v2/reply/del';
/// 图片上传
static const String uploadImage = '/x/dynamic/feed/draw/upload_bfs';
/// 更新追番状态
static const String updateBangumiStatus = '/pgc/web/follow/status/update';
/// 番剧点赞投币收藏状态
static const String bangumiActionStatus = '/pgc/season/episode/community';
/// @我的
static const String messageAtAPi = '/x/msgfeed/at?';
/// 订阅
static const String confirmSub = '/x/v3/fav/season/fav';
/// 订阅状态
static const String videoRelation = '/x/web-interface/archive/relation';
/// 获取空降区间
static const String getSkipSegments =
'${HttpString.sponsorBlockBaseUrl}/api/skipSegments';
/// 视频标签
static const String videoTag = '/x/tag/archive/tags';
/// 修复标题和海报
// /api/view?id=${aid} /all/video/av${aid} /video/av${aid}/
static const String fixTitleAndPic = '${HttpString.biliplusBaseUrl}/api/view';
/// 专栏详情
static const String opusDetail = '/x/polymer/web-dynamic/v1/opus/detail';
}

View File

@ -1,5 +1,8 @@
import 'dart:convert';
import '../models/bangumi/list.dart';
import 'index.dart';
import 'package:html/parser.dart' as html_parser;
import 'package:html/dom.dart' as html_dom;
class BangumiHttp {
static Future bangumiList({int? page}) async {
@ -18,8 +21,19 @@ class BangumiHttp {
}
}
static Future bangumiFollow({int? mid}) async {
var res = await Request().get(Api.bangumiFollow, data: {'vmid': mid});
static Future getRecentBangumi({
int? mid,
int type = 1,
int pn = 1,
int ps = 20,
}) async {
var res = await Request().get(Api.getRecentBangumiApi, data: {
'vmid': mid,
'type': type,
'follow_status': 0,
'pn': pn,
'ps': ps,
});
if (res.data['code'] == 0) {
return {
'status': true,
@ -33,4 +47,62 @@ class BangumiHttp {
};
}
}
// 获取追番状态
static Future bangumiStatus({required int seasonId}) async {
var res = await Request()
.get('https://www.bilibili.com/bangumi/play/ss$seasonId');
html_dom.Document document = html_parser.parse(res.data);
// 查找 id 为 __NEXT_DATA__ 的 script 元素
html_dom.Element? scriptElement =
document.querySelector('script#\\__NEXT_DATA__');
if (scriptElement != null) {
// 提取 script 元素的内容
String scriptContent = scriptElement.text;
final dynamic scriptContentJson = jsonDecode(scriptContent);
Map followState = scriptContentJson['props']['pageProps']['followState'];
return {
'status': true,
'data': {
'isFollowed': followState['isFollowed'],
'followStatus': followState['followStatus']
}
};
} else {
print('Script element with id "__NEXT_DATA__" not found.');
}
}
// 更新追番状态
static Future updateBangumiStatus({
required int seasonId,
required int status,
}) async {
var res = await Request().post(Api.updateBangumiStatus, data: {
'season_id': seasonId,
'status': status,
});
if (res.data['code'] == 0) {
return {'status': true, 'data': res.data['data']};
} else {
return {
'status': false,
'data': [],
'msg': res.data['message'],
};
}
}
// 获取番剧点赞投币收藏状态
static Future bangumiActionStatus({required int epId}) async {
var res = await Request().get(
Api.bangumiActionStatus,
data: {'ep_id': epId},
);
if (res.data['code'] == 0) {
return {'status': true, 'data': res.data['data']};
} else {
return {'status': false, 'data': [], 'msg': res.data['message']};
}
}
}

View File

@ -28,7 +28,7 @@ class BlackHttp {
static Future removeBlack({required int fid}) async {
var res = await Request().post(
Api.removeBlack,
queryParameters: {
data: {
'act': 6,
'csrf': await Request.getCsrf(),
'fid': fid,

View File

@ -1,6 +1,15 @@
import 'package:pilipala/models/common/invalid_video.dart';
import 'dart:convert';
import 'dart:math';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:pilipala/models/sponsor_block/segment.dart';
import 'index.dart';
class CommonHttp {
static final RegExp spmPrefixExp =
RegExp(r'<meta name="spm_prefix" content="([^"]+?)">');
static Future unReadDynamic() async {
var res = await Request().get(Api.getUnreadDynamic,
data: {'alltype_offset': 0, 'video_offset': '', 'article_offset': 0});
@ -14,4 +23,95 @@ class CommonHttp {
};
}
}
static Future querySkipSegments({required String bvid}) async {
var res = await Request().getWithoutCookie(Api.getSkipSegments, data: {
'videoID': bvid,
});
if (res.data is List && res.data.isNotEmpty) {
try {
return {
'status': true,
'data': res.data
.map<SegmentDataModel>((e) => SegmentDataModel.fromJson(e))
.toList(),
};
} catch (err) {
return {
'status': false,
'data': [],
'msg': 'sponsorBlock数据解析失败: $err',
};
}
} else {
return {
'status': false,
'data': [],
};
}
}
static Future fixVideoPicAndTitle({required int aid}) async {
var res = await Request().getWithoutCookie(Api.fixTitleAndPic, data: {
'id': aid,
});
if (res != null) {
if (res.data['code'] == -404) {
return {
'status': false,
'data': null,
'msg': '没有相关信息',
};
} else {
return {
'status': true,
'data': InvalidVideoModel.fromJson(res.data),
};
}
} else {
return {
'status': false,
'data': null,
'msg': '没有相关信息',
};
}
}
static Future buvidActivate() async {
try {
// 获取 HTML 数据
var html = await Request().get(Api.dynamicSpmPrefix);
// 提取 spmPrefix
String spmPrefix = spmPrefixExp.firstMatch(html.data)?.group(1) ?? '';
// 生成随机 PNG 结束部分
Random rand = Random();
String randPngEnd = base64.encode(
List<int>.generate(32, (_) => rand.nextInt(256))
..addAll(List<int>.filled(4, 0))
..addAll([73, 69, 78, 68])
..addAll(List<int>.generate(4, (_) => rand.nextInt(256))),
);
// 构建 JSON 数据
String jsonData = json.encode({
'3064': 1,
'39c8': '$spmPrefix.fp.risk',
'3c43': {
'adca': 'Linux',
'bfe9': randPngEnd.substring(randPngEnd.length - 50),
},
});
// 发送 POST 请求
await Request().post(
Api.activateBuvidApi,
data: {'payload': jsonData},
options: Options(contentType: 'application/json'),
);
} catch (err) {
debugPrint('buvidActivate error: $err');
}
}
}

View File

@ -5,6 +5,11 @@ class HttpString {
static const String appBaseUrl = 'https://app.bilibili.com';
static const String liveBaseUrl = 'https://api.live.bilibili.com';
static const String passBaseUrl = 'https://passport.bilibili.com';
static const String messageBaseUrl = 'https://message.bilibili.com';
static const String bangumiBaseUrl = 'https://bili.meark.me';
static const String sponsorBlockBaseUrl = 'https://www.bsbsb.top';
static const String biliplusBaseUrl = 'https://www.biliplus.com';
static const List<int> validateStatusCodes = [
302,
304,

View File

@ -17,7 +17,9 @@ class DanmakaHttp {
var response = await Request().get(
Api.webDanmaku,
data: params,
extra: {'resType': ResponseType.bytes},
options: Options(
responseType: ResponseType.bytes,
),
);
return DmSegMobileReply.fromBuffer(response.data);
}
@ -67,9 +69,6 @@ class DanmakaHttp {
var response = await Request().post(
Api.shootDanmaku,
data: params,
options: Options(
contentType: Headers.formUrlEncodedContentType,
),
);
if (response.statusCode != 200) {
return {

View File

@ -1,3 +1,5 @@
import 'dart:math';
import 'package:dio/dio.dart';
import '../models/dynamics/result.dart';
import '../models/dynamics/up.dart';
import 'index.dart';
@ -40,6 +42,7 @@ class DynamicsHttp {
'status': false,
'data': [],
'msg': res.data['message'],
'code': res.data['code'],
};
}
}
@ -67,7 +70,7 @@ class DynamicsHttp {
}) async {
var res = await Request().post(
Api.likeDynamic,
queryParameters: {
data: {
'dynamic_id': dynamicId,
'up': up,
'csrf': await Request.getCsrf(),
@ -89,7 +92,7 @@ class DynamicsHttp {
//
static Future dynamicDetail({
String? id,
required String id,
}) async {
var res = await Request().get(Api.dynamicDetail, data: {
'timezone_offset': -480,
@ -117,4 +120,120 @@ class DynamicsHttp {
};
}
}
static Future dynamicForward() async {
var res = await Request().post(
Api.dynamicForwardUrl,
queryParameters: {
'csrf': await Request.getCsrf(),
'x-bili-device-req-json': {'platform': 'web', 'device': 'pc'},
'x-bili-web-req-json': {'spm_id': '333.999'},
},
data: {
'attach_card': null,
'scene': 4,
'content': {
'conetents': [
{'raw_text': "2", 'type': 1, 'biz_id': ""}
]
}
},
);
if (res.data['code'] == 0) {
return {
'status': true,
'data': res.data['data'],
};
} else {
return {
'status': false,
'data': [],
'msg': res.data['message'],
};
}
}
static Future dynamicCreate({
required int mid,
required int scene,
int? oid,
String? dynIdStr,
String? rawText,
}) async {
DateTime now = DateTime.now();
int timestamp = now.millisecondsSinceEpoch ~/ 1000;
Random random = Random();
int randomNumber = random.nextInt(9000) + 1000;
String uploadId = '${mid}_${timestamp}_$randomNumber';
Map<String, dynamic> webRepostSrc = {
'dyn_id_str': dynIdStr ?? '',
};
/// 投稿转发
if (scene == 5) {
webRepostSrc = {
'revs_id': {'dyn_type': 8, 'rid': oid}
};
}
var res = await Request().post(
Api.dynamicCreate,
queryParameters: {
'platform': 'web',
'csrf': await Request.getCsrf(),
'x-bili-device-req-json': {'platform': 'web', 'device': 'pc'},
'x-bili-web-req-json': {'spm_id': '333.999'},
},
data: {
'dyn_req': {
'content': {
'contents': [
{'raw_text': rawText ?? '', 'type': 1, 'biz_id': ''}
]
},
'scene': scene,
'attach_card': null,
'upload_id': uploadId,
'meta': {
'app_meta': {'from': 'create.dynamic.web', 'mobi_app': 'web'}
}
},
'web_repost_src': webRepostSrc
},
options: Options(contentType: 'application/json'),
);
if (res.data['code'] == 0) {
return {
'status': true,
'data': res.data['data'],
};
} else {
return {
'status': false,
'data': [],
'msg': res.data['message'],
};
}
}
static Future opusDetail({
required int opusId,
}) async {
var res = await Request().get(
Api.opusDetail,
data: {'id': opusId},
);
if (res.data['code'] == 0) {
return {
'status': true,
'data': res.data['data'],
};
} else {
return {
'status': false,
'data': [],
'msg': res.data['message'],
};
}
}
}

67
lib/http/fav.dart Normal file
View File

@ -0,0 +1,67 @@
import 'index.dart';
class FavHttp {
/// 编辑收藏夹
static Future editFolder({
required String title,
required String intro,
required String mediaId,
String? cover,
int? privacy,
}) async {
var res = await Request().post(
Api.editFavFolder,
data: {
'title': title,
'intro': intro,
'media_id': mediaId,
'cover': cover ?? '',
'privacy': privacy ?? 0,
'csrf': await Request.getCsrf(),
},
);
if (res.data['code'] == 0) {
return {
'status': true,
'data': res.data['data'],
};
} else {
return {
'status': false,
'data': [],
'msg': res.data['message'],
};
}
}
/// 新建收藏夹
static Future addFolder({
required String title,
required String intro,
String? cover,
int? privacy,
}) async {
var res = await Request().post(
Api.addFavFolder,
data: {
'title': title,
'intro': intro,
'cover': cover ?? '',
'privacy': privacy ?? 0,
'csrf': await Request.getCsrf(),
},
);
if (res.data['code'] == 0) {
return {
'status': true,
'data': res.data['data'],
};
} else {
return {
'status': false,
'data': [],
'msg': res.data['message'],
};
}
}
}

View File

@ -21,7 +21,6 @@ class HtmlHttp {
}
try {
Document rootTree = parse(response.data);
// log(response.data.body.toString());
Element body = rootTree.body!;
Element appDom = body.querySelector('#app')!;
Element authorHeader = appDom.querySelector('.fixed-author-header')!;
@ -52,7 +51,6 @@ class HtmlHttp {
.className
.split(' ')[1]
.split('-')[2];
// List imgList = opusDetail.querySelectorAll('bili-album__preview__picture__img');
return {
'status': true,
'avatar': avatar,
@ -76,20 +74,10 @@ class HtmlHttp {
Element body = rootTree.body!;
Element appDom = body.querySelector('#app')!;
Element authorHeader = appDom.querySelector('.up-left')!;
// 头像
// String avatar =
// authorHeader.querySelector('.bili-avatar-img')!.attributes['data-src']!;
// print(avatar);
// avatar = 'https:${avatar.split('@')[0]}';
String uname = authorHeader.querySelector('.up-name')!.text.trim();
// 动态详情
Element opusDetail = appDom.querySelector('.article-content')!;
// 发布时间
// String updateTime =
// opusDetail.querySelector('.opus-module-author__pub__text')!.text;
// print(updateTime);
//
String opusContent =
opusDetail.querySelector('#read-article-holder')!.innerHtml;
RegExp digitRegExp = RegExp(r'\d+');

View File

@ -1,19 +1,14 @@
// ignore_for_file: avoid_print
import 'dart:async';
import 'dart:convert';
import 'dart:developer';
import 'dart:io';
import 'dart:math' show Random;
import 'package:cookie_jar/cookie_jar.dart';
import 'package:dio/dio.dart';
import 'package:dio/io.dart';
import 'package:dio_cookie_manager/dio_cookie_manager.dart';
// import 'package:dio_http2_adapter/dio_http2_adapter.dart';
import 'package:hive/hive.dart';
import 'package:pilipala/utils/id_utils.dart';
import '../utils/storage.dart';
import '../utils/utils.dart';
import 'api.dart';
import 'constants.dart';
import 'interceptor.dart';
@ -22,16 +17,17 @@ class Request {
static late CookieManager cookieManager;
static late final Dio dio;
factory Request() => _instance;
Box setting = GStrorage.setting;
static Box localCache = GStrorage.localCache;
Box setting = GStorage.setting;
static Box localCache = GStorage.localCache;
late bool enableSystemProxy;
late String systemProxyHost;
late String systemProxyPort;
static final RegExp spmPrefixExp = RegExp(r'<meta name="spm_prefix" content="([^"]+?)">');
static String? buvid;
/// 设置cookie
static setCookie() async {
Box userInfoCache = GStrorage.userInfo;
Box userInfoCache = GStorage.userInfo;
Box setting = GStorage.setting;
final String cookiePath = await Utils.getCookiePath();
final PersistCookieJar cookieJar = PersistCookieJar(
ignoreExpires: true,
@ -42,42 +38,58 @@ class Request {
final List<Cookie> cookie = await cookieManager.cookieJar
.loadForRequest(Uri.parse(HttpString.baseUrl));
final userInfo = userInfoCache.get('userInfoCache');
if (userInfo != null && userInfo.mid != null) {
final List<Cookie> cookie2 = await cookieManager.cookieJar
.loadForRequest(Uri.parse(HttpString.tUrl));
if (cookie2.isEmpty) {
try {
await Request().get(HttpString.tUrl);
} catch (e) {
log("setCookie, ${e.toString()}");
}
}
}
setOptionsHeaders(userInfo, userInfo != null && userInfo.mid != null);
try {
await buvidActivate();
} catch (e) {
log("setCookie, ${e.toString()}");
String baseUrlType = 'default';
if (setting.get(SettingBoxKey.enableGATMode, defaultValue: false)) {
baseUrlType = 'bangumi';
}
setBaseUrl(type: baseUrlType);
final String cookieString = cookie
.map((Cookie cookie) => '${cookie.name}=${cookie.value}')
.join('; ');
dio.options.headers['cookie'] = cookieString;
}
// 从cookie中获取 csrf token
static Future<String> getCsrf() async {
List<Cookie> cookies = await cookieManager.cookieJar
.loadForRequest(Uri.parse(HttpString.apiBaseUrl));
String token = '';
if (cookies.where((e) => e.name == 'bili_jct').isNotEmpty) {
token = cookies.firstWhere((e) => e.name == 'bili_jct').value;
}
.loadForRequest(Uri.parse(HttpString.baseUrl));
String token = cookies
.firstWhere((e) => e.name == 'bili_jct',
orElse: () => Cookie('bili_jct', ''))
.value;
return token;
}
static Future<String> getBuvid() async {
if (buvid != null) {
return buvid!;
}
final List<Cookie> cookies = await cookieManager.cookieJar
.loadForRequest(Uri.parse(HttpString.apiBaseUrl));
buvid = cookies
.firstWhere((cookie) => cookie.name == 'buvid3',
orElse: () => Cookie('buvid3', ''))
.value;
if (buvid == null || buvid!.isEmpty) {
try {
var result = await Request().get(
"${HttpString.apiBaseUrl}/x/frontend/finger/spi",
);
buvid = result["data"]["b_3"].toString();
} catch (e) {
// 处理请求错误
buvid = '';
print("Error fetching buvid: $e");
}
}
return buvid!;
}
static setOptionsHeaders(userInfo, bool status) {
if (status) {
dio.options.headers['x-bili-mid'] = userInfo.mid.toString();
@ -90,33 +102,6 @@ class Request {
dio.options.headers['referer'] = 'https://www.bilibili.com/';
}
static Future buvidActivate() async {
var html = await Request().get(Api.dynamicSpmPrefix);
String spmPrefix = spmPrefixExp.firstMatch(html.data)!.group(1)!;
Random rand = Random();
String rand_png_end = base64.encode(
List<int>.generate(32, (_) => rand.nextInt(256)) +
List<int>.filled(4, 0) +
[73, 69, 78, 68] +
List<int>.generate(4, (_) => rand.nextInt(256))
);
String jsonData = json.encode({
'3064': 1,
'39c8': '${spmPrefix}.fp.risk',
'3c43': {
'adca': 'Linux',
'bfe9': rand_png_end.substring(rand_png_end.length - 50),
},
});
await Request().post(
Api.activateBuvidApi,
data: {'payload': jsonData},
options: Options(contentType: 'application/json')
);
}
/*
* config it and create
*/
@ -142,15 +127,6 @@ class Request {
dio = Dio(options);
/// fix 第三方登录 302重定向 跟iOS代理问题冲突
// ..httpClientAdapter = Http2Adapter(
// ConnectionManager(
// idleTimeout: const Duration(milliseconds: 10000),
// onClientCreate: (_, ClientSetting config) =>
// config.onBadCertificate = (_) => true,
// ),
// );
/// 设置代理
if (enableSystemProxy) {
dio.httpClientAdapter = IOHttpClientAdapter(
@ -188,18 +164,15 @@ class Request {
/*
* get请求
*/
get(url, {data, options, cancelToken, extra}) async {
get(url, {data, Options? options, cancelToken, extra}) async {
Response response;
final Options options = Options();
ResponseType resType = ResponseType.json;
if (extra != null) {
resType = extra!['resType'] ?? ResponseType.json;
if (extra['ua'] != null) {
options.headers = {'user-agent': headerUa(type: extra['ua'])};
options ??= Options();
options.headers ??= <String, dynamic>{};
options.headers?['user-agent'] = headerUa(type: extra['ua']);
}
}
options.responseType = resType;
try {
response = await dio.get(
url,
@ -209,32 +182,44 @@ class Request {
);
return response;
} on DioException catch (e) {
Response errResponse = Response(
data: {
'message': await ApiInterceptor.dioError(e)
}, // 将自定义 Map 数据赋值给 Response 的 data 属性
return Response(
data: {'message': await ApiInterceptor.dioError(e)},
statusCode: 200,
requestOptions: RequestOptions(),
);
return errResponse;
}
}
/*
* get请求
*/
getWithoutCookie(url, {data}) {
return get(
url,
data: data,
options: Options(
headers: {
'cookie': 'buvid3= ; b_nut= ; sid= ',
'user-agent': headerUa(type: 'pc'),
},
),
);
}
/*
* post请求
*/
post(url, {data, queryParameters, options, cancelToken, extra}) async {
// print('post-data: $data');
Response response;
try {
response = await dio.post(
url,
data: data,
queryParameters: queryParameters,
options: options,
options:
options ?? Options(contentType: Headers.formUrlEncodedContentType),
cancelToken: cancelToken,
);
// print('post success: ${response.data}');
return response;
} on DioException catch (e) {
Response errResponse = Response(
@ -290,8 +275,21 @@ class Request {
}
} else {
headerUa =
'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';
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36';
}
return headerUa;
}
static setBaseUrl({String type = 'default'}) {
switch (type) {
case 'default':
dio.options.baseUrl = HttpString.apiBaseUrl;
break;
case 'bangumi':
dio.options.baseUrl = HttpString.bangumiBaseUrl;
break;
default:
dio.options.baseUrl = HttpString.apiBaseUrl;
}
}
}

View File

@ -3,8 +3,7 @@
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:dio/dio.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:hive/hive.dart';
import '../utils/storage.dart';
// import 'package:pilipala/utils/login.dart';
class ApiInterceptor extends Interceptor {
@override
@ -19,21 +18,10 @@ class ApiInterceptor extends Interceptor {
@override
void onResponse(Response response, ResponseInterceptorHandler handler) {
try {
if (response.statusCode == 302) {
final List<String> locations = response.headers['location']!;
if (locations.isNotEmpty) {
if (locations.first.startsWith('https://www.mcbbs.net')) {
final Uri uri = Uri.parse(locations.first);
final String? accessKey = uri.queryParameters['access_key'];
final String? mid = uri.queryParameters['mid'];
try {
Box localCache = GStrorage.localCache;
localCache.put(LocalCacheKey.accessKey,
<String, String?>{'mid': mid, 'value': accessKey});
} catch (_) {}
}
}
}
// 在响应之后处理数据
// if (response.data is Map && response.data['code'] == -101) {
// LoginUtils.loginOut();
// }
} catch (err) {
print('ApiInterceptor: $err');
}
@ -45,10 +33,16 @@ class ApiInterceptor extends Interceptor {
void onError(DioException err, ErrorInterceptorHandler handler) async {
// 处理网络请求错误
// handler.next(err);
SmartDialog.showToast(
await dioError(err),
displayType: SmartToastType.onlyRefresh,
);
String url = err.requestOptions.uri.toString();
final excludedPatterns = RegExp(r'heartbeat|seg\.so|online/total');
if (!excludedPatterns.hasMatch(url)) {
SmartDialog.showToast(
await dioError(err),
displayType: SmartToastType.onlyRefresh,
displayTime: const Duration(seconds: 1),
debounce: true,
);
}
super.onError(err, handler);
}
@ -70,28 +64,29 @@ class ApiInterceptor extends Interceptor {
return '发送请求超时,请检查网络设置';
case DioExceptionType.unknown:
final String res = await checkConnect();
return '$res,网络异常!';
return '$res ${error.error}';
}
}
static Future<String> checkConnect() async {
final ConnectivityResult connectivityResult =
final List<ConnectivityResult> connectivityResult =
await Connectivity().checkConnectivity();
switch (connectivityResult) {
case ConnectivityResult.mobile:
return '正在使用移动流量';
case ConnectivityResult.wifi:
return '正在使用wifi';
case ConnectivityResult.ethernet:
return '正在使用局域网';
case ConnectivityResult.vpn:
return '正在使用代理网络';
case ConnectivityResult.other:
return '正在使用其他网络';
case ConnectivityResult.none:
return '未连接到任何网络';
default:
return '';
if (connectivityResult.contains(ConnectivityResult.mobile)) {
return '正在使用移动流量';
} else if (connectivityResult.contains(ConnectivityResult.wifi)) {
return '正在使用wifi';
} else if (connectivityResult.contains(ConnectivityResult.ethernet)) {
return '正在使用局域网';
} else if (connectivityResult.contains(ConnectivityResult.vpn)) {
return '正在使用代理网络';
} else if (connectivityResult.contains(ConnectivityResult.bluetooth)) {
return '正在使用蓝牙网络';
} else if (connectivityResult.contains(ConnectivityResult.other)) {
return '正在使用其他网络';
} else if (connectivityResult.contains(ConnectivityResult.none)) {
return '未连接到任何网络';
} else {
return '';
}
}
}

View File

@ -1,3 +1,5 @@
import 'package:pilipala/models/live/follow.dart';
import '../models/live/item.dart';
import '../models/live/room_info.dart';
import '../models/live/room_info_h5.dart';
@ -65,4 +67,96 @@ class LiveHttp {
};
}
}
// 获取弹幕信息
static Future liveDanmakuInfo({roomId}) async {
var res = await Request().get(Api.getDanmuInfo, data: {
'id': roomId,
});
if (res.data['code'] == 0) {
return {
'status': true,
'data': res.data['data'],
};
} else {
return {
'status': false,
'data': [],
'msg': res.data['message'],
};
}
}
// 发送弹幕
static Future sendDanmaku({roomId, msg}) async {
var res = await Request().post(
Api.sendLiveMsg,
data: {
'bubble': 0,
'msg': msg,
'color': 16777215, // 颜色
'mode': 1, // 模式
'room_type': 0,
'jumpfrom': 71001, // 直播间来源
'reply_mid': 0,
'reply_attr': 0,
'replay_dmid': '',
'statistics': {"appId": 100, "platform": 5},
'fontsize': 25, // 字体大小
'rnd': DateTime.now().millisecondsSinceEpoch ~/ 1000, // 时间戳
'roomid': roomId,
'csrf': await Request.getCsrf(),
'csrf_token': await Request.getCsrf(),
},
);
if (res.data['code'] == 0) {
return {
'status': true,
'data': res.data['data'],
};
} else {
return {
'status': false,
'data': [],
'msg': res.data['message'],
};
}
}
// 我的关注 正在直播
static Future liveFollowing({int? pn, int? ps}) async {
var res = await Request().get(Api.getFollowingLive, data: {
'page': pn,
'page_size': ps,
'platform': 'web',
'ignoreRecord': 1,
'hit_ab': true,
});
if (res.data['code'] == 0) {
return {
'status': true,
'data': LiveFollowingModel.fromJson(res.data['data'])
};
} else {
return {
'status': false,
'data': [],
'msg': res.data['message'],
};
}
}
// 直播历史记录
static Future liveRoomEntry({required int roomId}) async {
await Request().post(
Api.liveRoomEntry,
data: {
'room_id': roomId,
'platform': 'pc',
'csrf_token': await Request.getCsrf(),
'csrf': await Request.getCsrf(),
'visit_id': '',
},
);
}
}

View File

@ -3,6 +3,7 @@ import 'dart:math';
import 'package:crypto/crypto.dart';
import 'package:dio/dio.dart';
import 'package:encrypt/encrypt.dart';
import 'package:pilipala/http/constants.dart';
import 'package:uuid/uuid.dart';
import '../models/login/index.dart';
import '../utils/login.dart';
@ -21,32 +22,32 @@ class LoginHttp {
}
}
static Future sendSmsCode({
int? cid,
required int tel,
required String token,
required String challenge,
required String validate,
required String seccode,
}) async {
var res = await Request().post(
Api.appSmsCode,
data: {
'cid': cid,
'tel': tel,
"source": "main_web",
'token': token,
'challenge': challenge,
'validate': validate,
'seccode': seccode,
},
options: Options(
contentType: Headers.formUrlEncodedContentType,
// headers: {'user-agent': ApiConstants.userAgent}
),
);
print(res);
}
// static Future sendSmsCode({
// int? cid,
// required int tel,
// required String token,
// required String challenge,
// required String validate,
// required String seccode,
// }) async {
// var res = await Request().post(
// Api.appSmsCode,
// data: {
// 'cid': cid,
// 'tel': tel,
// "source": "main_web",
// 'token': token,
// 'challenge': challenge,
// 'validate': validate,
// 'seccode': seccode,
// },
// options: Options(
// contentType: Headers.formUrlEncodedContentType,
// // headers: {'user-agent': ApiConstants.userAgent}
// ),
// );
// print(res);
// }
// web端验证码
static Future sendWebSmsCode({
@ -60,6 +61,7 @@ class LoginHttp {
Map data = {
'cid': cid,
'tel': tel,
"source": "main_web",
'token': token,
'challenge': challenge,
'validate': validate,
@ -67,17 +69,50 @@ class LoginHttp {
};
FormData formData = FormData.fromMap({...data});
var res = await Request().post(
Api.smsCode,
Api.webSmsCode,
data: formData,
options: Options(
contentType: Headers.formUrlEncodedContentType,
),
);
print(res);
if (res.data['code'] == 0) {
return {
'status': true,
'data': res.data['data'],
};
} else {
return {'status': false, 'data': [], 'msg': res.data['message']};
}
}
// web端验证码登录
static Future loginInByWebSmsCode() async {}
static Future loginInByWebSmsCode({
int? cid,
required int tel,
required int code,
required String captchaKey,
}) async {
// webSmsLogin
Map data = {
"cid": cid,
"tel": tel,
"code": code,
"source": "main_mini",
"keep": 0,
"captcha_key": captchaKey,
"go_url": HttpString.baseUrl
};
FormData formData = FormData.fromMap({...data});
var res = await Request().post(
Api.webSmsLogin,
data: formData,
);
if (res.data['code'] == 0) {
return {
'status': true,
'data': res.data['data'],
};
} else {
return {'status': false, 'data': [], 'msg': res.data['message']};
}
}
// web端密码登录
static Future liginInByWebPwd() async {}
@ -114,9 +149,6 @@ class LoginHttp {
var res = await Request().post(
Api.appSmsCode,
data: data,
options: Options(
contentType: Headers.formUrlEncodedContentType,
),
);
print(res);
}
@ -167,10 +199,82 @@ class LoginHttp {
var res = await Request().post(
Api.loginInByPwdApi,
data: data,
options: Options(
contentType: Headers.formUrlEncodedContentType,
),
);
print(res);
}
// web端密码登录
static Future loginInByWebPwd({
required int username,
required String password,
required String token,
required String challenge,
required String validate,
required String seccode,
}) async {
Map data = {
'username': username,
'password': password,
'keep': 0,
'token': token,
'challenge': challenge,
'validate': validate,
'seccode': seccode,
'source': 'main-fe-header',
"go_url": HttpString.baseUrl
};
FormData formData = FormData.fromMap({...data});
var res = await Request().post(
Api.loginInByWebPwd,
data: formData,
);
if (res.data['code'] == 0) {
if (res.data['data']['status'] == 0) {
return {
'status': true,
'data': res.data['data'],
};
} else {
return {
'status': false,
'code': 1,
'data': res.data['data'],
'msg': res.data['data']['message'],
};
}
} else {
return {
'status': false,
'data': [],
'msg': res.data['message'],
};
}
}
// web端登录二维码
static Future getWebQrcode() async {
var res = await Request().get(Api.qrCodeApi);
if (res.data['code'] == 0) {
return {
'status': true,
'data': res.data['data'],
};
} else {
return {'status': false, 'data': [], 'msg': res.data['message']};
}
}
// web端二维码轮询登录状态
static Future queryWebQrcodeStatus(String qrcodeKey) async {
var res = await Request()
.get(Api.loginInByQrcode, data: {'qrcode_key': qrcodeKey});
if (res.data['data']['code'] == 0) {
return {
'status': true,
'data': res.data['data'],
};
} else {
return {'status': false, 'data': [], 'msg': res.data['message']};
}
}
}

View File

@ -1,5 +1,11 @@
import 'dart:convert';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:hive/hive.dart';
import 'package:html/parser.dart';
import 'package:pilipala/models/member/article.dart';
import 'package:pilipala/models/member/like.dart';
import 'package:pilipala/models/user/info.dart';
import 'package:pilipala/utils/global_data_cache.dart';
import '../common/constants.dart';
import '../models/dynamics/result.dart';
import '../models/follow/result.dart';
@ -15,14 +21,20 @@ import 'index.dart';
class MemberHttp {
static Future memberInfo({
int? mid,
required int mid,
String token = '',
}) async {
String? wWebid;
if ((await getWWebid(mid: mid))['status']) {
wWebid = GlobalDataCache.wWebid;
}
Map params = await WbiSign().makSign({
'mid': mid,
'token': token,
'platform': 'web',
'web_location': 1550101,
...wWebid != null ? {'w_webid': wWebid} : {},
});
var res = await Request().get(
Api.memberInfo,
@ -79,6 +91,11 @@ class MemberHttp {
String order = 'pubdate',
bool orderAvoided = true,
}) async {
String? wWebid;
if ((await getWWebid(mid: mid!))['status']) {
wWebid = GlobalDataCache.wWebid;
}
String dmImgStr = Utils.base64EncodeRandomString(16, 64);
String dmCoverImgStr = Utils.base64EncodeRandomString(32, 128);
Map params = await WbiSign().makSign({
@ -95,12 +112,21 @@ class MemberHttp {
'dm_img_str': dmImgStr.substring(0, dmImgStr.length - 2),
'dm_cover_img_str': dmCoverImgStr.substring(0, dmCoverImgStr.length - 2),
'dm_img_inter': '{"ds":[],"wh":[0,0,0],"of":[0,0,0]}',
...order == 'charge'
? {
'order': 'pubdate',
'special_type': 'charging',
}
: {},
...wWebid != null ? {'w_webid': wWebid} : {},
});
var res = await Request().get(
Api.memberArchive,
data: params,
extra: {'ua': 'pc'},
);
if (res.data['code'] == 0) {
return {
'status': true,
@ -144,13 +170,17 @@ class MemberHttp {
}
// 搜索用户动态
static Future memberDynamicSearch({int? pn, int? ps, int? mid}) async {
var res = await Request().get(Api.memberDynamic, data: {
'keyword': '海拔',
'mid': mid,
'pn': pn,
'ps': ps,
'platform': 'web'
static Future memberDynamicSearch({
int? pn,
int? mid,
String? offset,
required String keyword,
}) async {
var res = await Request().get(Api.memberDynamicSearch, data: {
'host_mid': mid,
'page': pn,
'offset': offset,
'keyword': keyword,
});
if (res.data['code'] == 0) {
return {
@ -187,13 +217,15 @@ class MemberHttp {
// 设置分组
static Future addUsers(int? fids, String? tagids) async {
var res = await Request().post(Api.addUsers, queryParameters: {
'fids': fids,
'tagids': tagids ?? '0',
'csrf': await Request.getCsrf(),
}, data: {
'cross_domain': true
});
var res = await Request().post(
Api.addUsers,
data: {
'fids': fids,
'tagids': tagids ?? '0',
'csrf': await Request.getCsrf(),
},
queryParameters: {'cross_domain': true},
);
if (res.data['code'] == 0) {
return {'status': true, 'data': [], 'msg': '操作成功'};
} else {
@ -328,7 +360,9 @@ class MemberHttp {
if (res.data['code'] == 0) {
return {
'status': true,
'data': MemberSeasonsDataModel.fromJson(res.data['data']['items_lists'])
'data': res.data['data']['list']
.map<MemberLikeDataModel>((e) => MemberLikeDataModel.fromJson(e))
.toList(),
};
} else {
return {
@ -409,11 +443,14 @@ class MemberHttp {
static Future cookieToKey() async {
var authCodeRes = await getTVCode();
if (authCodeRes['status']) {
var res = await Request().post(Api.cookieToKey, queryParameters: {
'auth_code': authCodeRes['data'],
'build': 708200,
'csrf': await Request.getCsrf(),
});
var res = await Request().post(
Api.cookieToKey,
data: {
'auth_code': authCodeRes['data'],
'build': 708200,
'csrf': await Request.getCsrf(),
},
);
await Future.delayed(const Duration(milliseconds: 300));
await qrcodePoll(authCodeRes['data']);
if (res.data['code'] == 0) {
@ -445,11 +482,11 @@ class MemberHttp {
SmartDialog.dismiss();
if (res.data['code'] == 0) {
String accessKey = res.data['data']['access_token'];
Box localCache = GStrorage.localCache;
Box userInfoCache = GStrorage.userInfo;
var userInfo = userInfoCache.get('userInfoCache');
Box localCache = GStorage.localCache;
Box userInfoCache = GStorage.userInfo;
final UserInfoData? userInfo = userInfoCache.get('userInfoCache');
localCache.put(
LocalCacheKey.accessKey, {'mid': userInfo.mid, 'value': accessKey});
LocalCacheKey.accessKey, {'mid': userInfo!.mid, 'value': accessKey});
return {'status': true, 'data': [], 'msg': '操作成功'};
} else {
return {
@ -510,4 +547,96 @@ class MemberHttp {
};
}
}
static Future getSeriesDetail({
required int mid,
required int currentMid,
required int seriesId,
required int pn,
}) async {
var res = await Request().get(
Api.getSeriesDetailApi,
data: {
'mid': mid,
'series_id': seriesId,
'only_normal': true,
'sort': 'desc',
'pn': pn,
'ps': 30,
'current_mid': currentMid,
},
);
if (res.data['code'] == 0) {
try {
return {
'status': true,
'data': MemberSeasonsDataModel.fromJson(res.data['data'])
};
} catch (err) {
print(err);
}
} else {
return {
'status': false,
'data': [],
'msg': res.data['message'],
};
}
}
static Future getWWebid({required int mid}) async {
String? wWebid = GlobalDataCache.wWebid;
if (wWebid != null) {
return {'status': true, 'data': wWebid};
}
var res = await Request().get('https://space.bilibili.com/$mid/article');
String? headContent = parse(res.data).head?.outerHtml;
final regex = RegExp(
r'<script id="__RENDER_DATA__" type="application/json">(.*?)</script>');
if (headContent != null) {
final match = regex.firstMatch(headContent);
if (match != null && match.groupCount >= 1) {
final content = match.group(1);
String decodedString = Uri.decodeComponent(content!);
Map<String, dynamic> map = jsonDecode(decodedString);
GlobalDataCache.wWebid = map['access_id'];
return {'status': true, 'data': map['access_id']};
} else {
return {'status': false, 'data': '请检查登录状态'};
}
}
return {'status': false, 'data': '请检查登录状态'};
}
// 获取用户专栏
static Future getMemberArticle({
required int mid,
required int pn,
String? offset,
}) async {
String? wWebid;
if ((await getWWebid(mid: mid))['status']) {
wWebid = GlobalDataCache.wWebid;
}
Map params = await WbiSign().makSign({
'host_mid': mid,
'page': pn,
'offset': offset,
'web_location': 333.999,
...wWebid != null ? {'w_webid': wWebid} : {},
});
var res = await Request().get(Api.opusList, data: params);
if (res.data['code'] == 0) {
return {
'status': true,
'data': MemberArticleDataModel.fromJson(res.data['data'])
};
} else {
return {
'status': false,
'data': [],
'msg': res.data['message'] ?? '请求异常',
};
}
}
}

View File

@ -1,4 +1,10 @@
import 'dart:convert';
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:pilipala/models/msg/at.dart';
import 'package:pilipala/models/msg/like.dart';
import 'package:pilipala/models/msg/reply.dart';
import 'package:pilipala/models/msg/system.dart';
import '../models/msg/account.dart';
import '../models/msg/session.dart';
import '../utils/wbi_sign.dart';
@ -31,14 +37,14 @@ class MsgHttp {
} catch (err) {
return {
'status': false,
'date': [],
'data': [],
'msg': err.toString(),
};
}
} else {
return {
'status': false,
'date': [],
'data': [],
'msg': res.data['message'],
};
}
@ -59,7 +65,7 @@ class MsgHttp {
.toList(),
};
} catch (err) {
print('err🔟: $err');
debugPrint('err: $err');
}
} else {
return {
@ -122,68 +128,45 @@ class MsgHttp {
'data': res.data['data'],
};
} else {
return {
'status': false,
'date': [],
'msg': "message: ${res.data['message']},"
" msg: ${res.data['msg']},"
" code: ${res.data['code']}",
};
return {'status': false, 'date': [], 'msg': res.data['message']};
}
}
// 发送私信
static Future sendMsg({
int? senderUid,
int? receiverId,
required int senderUid,
required int receiverId,
int? receiverType,
int? msgType,
dynamic content,
}) async {
String csrf = await Request.getCsrf();
Map<String, dynamic> params = await WbiSign().makSign({
'msg[sender_uid]': senderUid,
'msg[receiver_id]': receiverId,
'msg[receiver_type]': receiverType ?? 1,
'msg[msg_type]': msgType ?? 1,
'msg[msg_status]': 0,
'msg[dev_id]': getDevId(),
'msg[timestamp]': DateTime.now().millisecondsSinceEpoch ~/ 1000,
'msg[new_face_version]': 0,
'msg[content]': content,
'from_firework': 0,
'build': 0,
'mobi_app': 'web',
'csrf_token': csrf,
'csrf': csrf,
});
var res =
await Request().post(Api.sendMsg, queryParameters: <String, dynamic>{
...params,
'csrf_token': csrf,
'csrf': csrf,
}, data: {
'w_sender_uid': params['msg[sender_uid]'],
'w_receiver_id': params['msg[receiver_id]'],
'w_dev_id': params['msg[dev_id]'],
'w_rid': params['w_rid'],
'wts': params['wts'],
'csrf_token': csrf,
'csrf': csrf,
});
var res = await Request().post(
Api.sendMsg,
data: {
'msg[sender_uid]': senderUid,
'msg[receiver_id]': receiverId,
'msg[receiver_type]': 1,
'msg[msg_type]': 1,
'msg[msg_status]': 0,
'msg[content]': jsonEncode(content),
'msg[timestamp]': DateTime.now().millisecondsSinceEpoch ~/ 1000,
'msg[new_face_version]': 1,
'msg[dev_id]': getDevId(),
'from_firework': 0,
'build': 0,
'mobi_app': 'web',
'csrf_token': csrf,
'csrf': csrf,
},
);
if (res.data['code'] == 0) {
return {
'status': true,
'data': res.data['data'],
};
} else {
return {
'status': false,
'date': [],
'msg': "message: ${res.data['message']},"
" msg: ${res.data['msg']},"
" code: ${res.data['code']}",
};
return {'status': false, 'date': [], 'msg': res.data['message']};
}
}
@ -220,4 +203,176 @@ class MsgHttp {
}
return s.join();
}
static Future removeSession({
int? talkerId,
}) async {
String csrf = await Request.getCsrf();
Map params = await WbiSign().makSign({
'talker_id': talkerId,
'session_type': 1,
'build': 0,
'mobi_app': 'web',
'csrf_token': csrf,
'csrf': csrf
});
var res = await Request().get(Api.removeSession, data: params);
if (res.data['code'] == 0) {
return {
'status': true,
'data': res.data['data'],
};
} else {
return {'status': false, 'date': [], 'msg': res.data['message']};
}
}
static Future unread() async {
var res = await Request().get(Api.unread);
if (res.data['code'] == 0) {
return {
'status': true,
'data': res.data['data'],
};
} else {
return {'status': false, 'date': [], 'msg': res.data['message']};
}
}
// 回复我的
static Future messageReply({
int? id,
int? replyTime,
}) async {
var params = {
if (id != null) 'id': id,
if (replyTime != null) 'reply_time': replyTime,
};
var res = await Request().get(Api.messageReplyAPi, data: params);
if (res.data['code'] == 0) {
try {
return {
'status': true,
'data': MessageReplyModel.fromJson(res.data['data']),
};
} catch (err) {
return {'status': false, 'date': [], 'msg': err.toString()};
}
} else {
return {'status': false, 'date': [], 'msg': res.data['message']};
}
}
// 收到的赞
static Future messageLike({
int? id,
int? likeTime,
}) async {
var params = {
if (id != null) 'id': id,
if (likeTime != null) 'like_time': likeTime,
};
var res = await Request().get(Api.messageLikeAPi, data: params);
if (res.data['code'] == 0) {
try {
return {
'status': true,
'data': MessageLikeModel.fromJson(res.data['data']),
};
} catch (err) {
return {'status': false, 'data': [], 'msg': err.toString()};
}
} else {
return {'status': false, 'data': [], 'msg': res.data['message']};
}
}
static Future messageSystem() async {
var res = await Request().get(Api.messageSystemAPi, data: {
'csrf': await Request.getCsrf(),
'page_size': 20,
'build': 0,
'mobi_app': 'web',
});
if (res.data['code'] == 0) {
try {
return {
'status': true,
'data': res.data['data']['system_notify_list']
?.map<MessageSystemModel>(
(e) => MessageSystemModel.fromJson(e))
.toList() ??
[],
};
} catch (err) {
return {'status': false, 'date': [], 'msg': err.toString()};
}
} else {
return {'status': false, 'date': [], 'msg': res.data['message']};
}
}
// 系统消息标记已读
static Future systemMarkRead(int cursor) async {
String csrf = await Request.getCsrf();
var res = await Request().get(Api.systemMarkRead, data: {
'csrf': csrf,
'cursor': cursor,
});
if (res.data['code'] == 0) {
return {
'status': true,
};
} else {
return {
'status': false,
'msg': res.data['message'],
};
}
}
static Future messageSystemAccount() async {
var res = await Request().get(Api.userMessageSystemAPi, data: {
'csrf': await Request.getCsrf(),
'page_size': 20,
'build': 0,
'mobi_app': 'web',
});
if (res.data['code'] == 0) {
try {
return {
'status': true,
'data': res.data['data']['system_notify_list']
?.map<MessageSystemModel>(
(e) => MessageSystemModel.fromJson(e))
.toList() ??
[],
};
} catch (err) {
return {'status': false, 'date': [], 'msg': err.toString()};
}
} else {
return {'status': false, 'date': [], 'msg': res.data['message']};
}
}
// @我的
static Future messageAt() async {
var res = await Request().get(Api.messageAtAPi, data: {
'build': 0,
'mobi_app': 'web',
});
if (res.data['code'] == 0) {
try {
return {
'status': true,
'data': MessageAtModel.fromJson(res.data['data']),
};
} catch (err) {
return {'status': false, 'data': [], 'msg': err.toString()};
}
} else {
return {'status': false, 'data': [], 'msg': res.data['message']};
}
}
}

122
lib/http/read.dart Normal file
View File

@ -0,0 +1,122 @@
import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:html/parser.dart';
import 'package:pilipala/models/read/opus.dart';
import 'package:pilipala/models/read/read.dart';
import 'package:pilipala/utils/wbi_sign.dart';
import 'index.dart';
class ReadHttp {
static List<String> extractScriptContents(String htmlContent) {
RegExp scriptRegExp = RegExp(r'<script>([\s\S]*?)<\/script>');
Iterable<Match> matches = scriptRegExp.allMatches(htmlContent);
List<String> scriptContents = [];
for (Match match in matches) {
String scriptContent = match.group(1)!;
scriptContents.add(scriptContent);
}
return scriptContents;
}
// 解析专栏 opus格式
static Future parseArticleOpus({required String id}) async {
var res = await Request().get('https://www.bilibili.com/opus/$id', extra: {
'ua': 'pc',
});
String? headContent = parse(res.data).head?.outerHtml;
var document = parse(headContent);
var linkTags = document.getElementsByTagName('link');
bool isCv = false;
String cvId = '';
for (var linkTag in linkTags) {
var attributes = linkTag.attributes;
if (attributes.containsKey('rel') &&
attributes['rel'] == 'canonical' &&
attributes.containsKey('data-vue-meta') &&
attributes['data-vue-meta'] == 'true') {
final String cvHref = linkTag.attributes['href']!;
RegExp regex = RegExp(r'cv(\d+)');
RegExpMatch? match = regex.firstMatch(cvHref);
if (match != null) {
cvId = match.group(1)!;
} else {
print('No match found.');
}
isCv = true;
break;
}
}
String scriptContent =
extractScriptContents(parse(res.data).body!.outerHtml)[0];
int startIndex = scriptContent.indexOf('{');
int endIndex = scriptContent.lastIndexOf('};');
String jsonContent = scriptContent.substring(startIndex, endIndex + 1);
// 解析JSON字符串为Map
Map<String, dynamic> jsonData = json.decode(jsonContent);
return {
'status': true,
'data': OpusDataModel.fromJson(jsonData),
'isCv': isCv,
'cvId': cvId,
};
}
// 解析专栏 cv格式
static Future parseArticleCv({required String id}) async {
var res = await Request().get(
'https://www.bilibili.com/read/cv$id',
extra: {'ua': 'pc'},
options: Options(
headers: {
'cookie': 'opus-goback=1',
},
),
);
String scriptContent =
extractScriptContents(parse(res.data).body!.outerHtml)[0];
int startIndex = scriptContent.indexOf('{');
int endIndex = scriptContent.lastIndexOf('};');
String jsonContent = scriptContent.substring(startIndex, endIndex + 1);
// 解析JSON字符串为Map
Map<String, dynamic> jsonData = json.decode(jsonContent);
return {
'status': true,
'data': ReadDataModel.fromJson(jsonData),
};
}
//
static Future getViewInfo({required String id}) async {
Map params = await WbiSign().makSign({
'id': id,
'mobi_app': 'pc',
'from': 'web',
'gaia_source': 'main_web',
'web_location': 333.976,
});
var res = await Request().get(
Api.getViewInfo,
data: {
'id': id,
'mobi_app': 'pc',
'from': 'web',
'gaia_source': 'main_web',
'web_location': 333.976,
'w_rid': params['w_rid'],
'wts': params['wts'],
},
);
if (res.data['code'] == 0) {
return {
'status': true,
'data': res.data['data'],
};
} else {
return {
'status': false,
'data': [],
'msg': res.data['message'],
};
}
}
}

View File

@ -1,3 +1,8 @@
import 'dart:convert';
import 'dart:io';
import 'package:dio/dio.dart';
import 'package:image_picker/image_picker.dart';
import '../models/video/reply/data.dart';
import '../models/video/reply/emote.dart';
import 'api.dart';
@ -6,35 +11,29 @@ import 'init.dart';
class ReplyHttp {
static Future replyList({
required int oid,
required int pageNum,
required String nextOffset,
required int type,
int? ps,
int sort = 1,
}) async {
var res = await Request().get(Api.replyList, data: {
'oid': oid,
'pn': pageNum,
'type': type,
'sort': sort,
'ps': ps ?? 20
'pagination_str': jsonEncode({'offset': nextOffset}),
'mode': sort + 2,
});
if (res.data['code'] == 0) {
return {
'status': true,
'data': ReplyData.fromJson(res.data['data']),
'code': 200,
};
} else {
Map errMap = {
-400: '请求错误',
-404: '无此项',
12002: '当前页面评论功能已关闭',
12009: '评论主体的type不合法',
12061: 'UP主已关闭评论区',
};
return {
'status': false,
'date': [],
'msg': errMap[res.data['code']] ?? res.data['message'],
'code': res.data['code'],
'msg': res.data['message'],
};
}
}
@ -57,19 +56,13 @@ class ReplyHttp {
if (res.data['code'] == 0) {
return {
'status': true,
'data': ReplyData.fromJson(res.data['data']),
'data': ReplyReplyData.fromJson(res.data['data']),
};
} else {
Map errMap = {
-400: '请求错误',
-404: '无此项',
12002: '评论区已关闭',
12009: '评论主体的type不合法',
};
return {
'status': false,
'date': [],
'msg': errMap[res.data['code']] ?? '请求异常',
'msg': res.data['message'],
};
}
}
@ -83,7 +76,7 @@ class ReplyHttp {
}) async {
var res = await Request().post(
Api.likeReply,
queryParameters: {
data: {
'type': type,
'oid': oid,
'rpid': rpid,
@ -120,4 +113,65 @@ class ReplyHttp {
};
}
}
static Future replyDel({
required int type, //replyType
required int oid,
required int rpid,
}) async {
var res = await Request().post(
Api.replyDel,
queryParameters: {
'type': type, //type.index
'oid': oid,
'rpid': rpid,
'csrf': await Request.getCsrf(),
},
);
if (res.data['code'] == 0) {
return {'status': true, 'msg': '删除成功'};
} else {
return {'status': false, 'msg': res.data['message']};
}
}
// 图片上传
static Future uploadImage(
{required XFile xFile, String type = 'new_dyn'}) async {
var formData = FormData.fromMap({
'file_up': await xFileToMultipartFile(xFile),
'biz': type,
'csrf': await Request.getCsrf(),
'category': 'daily',
});
var res = await Request().post(
Api.uploadImage,
data: formData,
);
if (res.data['code'] == 0) {
var data = res.data['data'];
data['img_src'] = data['image_url'];
data['img_width'] = data['image_width'];
data['img_height'] = data['image_height'];
data.remove('image_url');
data.remove('image_width');
data.remove('image_height');
return {
'status': true,
'data': data,
};
} else {
return {
'status': false,
'date': [],
'msg': res.data['message'],
};
}
}
static Future<MultipartFile> xFileToMultipartFile(XFile xFile) async {
var file = File(xFile.path);
var bytes = await file.readAsBytes();
return MultipartFile.fromBytes(bytes, filename: xFile.name);
}
}

View File

@ -1,5 +1,7 @@
import 'dart:convert';
import 'package:hive/hive.dart';
import 'package:pilipala/models/search/all.dart';
import 'package:pilipala/utils/wbi_sign.dart';
import '../models/bangumi/info.dart';
import '../models/common/search_type.dart';
import '../models/search/hot.dart';
@ -9,7 +11,7 @@ import '../utils/storage.dart';
import 'index.dart';
class SearchHttp {
static Box setting = GStrorage.setting;
static Box setting = GStorage.setting;
static Future hotSearchList() async {
var res = await Request().get(Api.hotSearchList);
if (res.data is String) {
@ -73,6 +75,7 @@ class SearchHttp {
required page,
String? order,
int? duration,
int? tids,
}) async {
var reqData = {
'search_type': searchType.type,
@ -82,9 +85,14 @@ class SearchHttp {
'page': page,
if (order != null) 'order': order,
if (duration != null) 'duration': duration,
if (tids != null && tids != -1) 'tids': tids,
};
var res = await Request().get(Api.searchByType, data: reqData);
if (res.data['code'] == 0 && res.data['data']['numPages'] > 0) {
if (res.data['code'] == 0) {
if (res.data['data']['numPages'] == 0) {
// 我想返回数据使得可以通过data.list 取值,结果为[]
return {'status': true, 'data': Data()};
}
Object data;
try {
switch (searchType) {
@ -121,9 +129,7 @@ class SearchHttp {
return {
'status': false,
'data': [],
'msg': res.data['data'] != null && res.data['data']['numPages'] == 0
? '没有相关数据'
: res.data['message'],
'msg': res.data['message'],
};
}
}
@ -137,7 +143,11 @@ class SearchHttp {
}
final dynamic res =
await Request().get(Api.ab2c, data: <String, dynamic>{...data});
return res.data['data'].first['cid'];
if (res.data['code'] == 0) {
return res.data['data'].first['cid'];
} else {
return -1;
}
}
static Future<Map<String, dynamic>> bangumiInfo(
@ -163,4 +173,48 @@ class SearchHttp {
};
}
}
static Future<Map<String, dynamic>> ab2cWithPic(
{int? aid, String? bvid}) async {
Map<String, dynamic> data = {};
if (aid != null) {
data['aid'] = aid;
} else if (bvid != null) {
data['bvid'] = bvid;
}
final dynamic res =
await Request().get(Api.ab2c, data: <String, dynamic>{...data});
return {
'cid': res.data['data'].first['cid'],
'pic': res.data['data'].first['first_frame'],
};
}
static Future<Map<String, dynamic>> searchCount(
{required String keyword}) async {
Map<String, dynamic> data = {
'keyword': keyword,
'web_location': 333.999,
};
Map params = await WbiSign().makSign(data);
final dynamic res = await Request().get(Api.searchCount, data: params);
if (res.data['code'] == 0) {
return {
'status': true,
'data': SearchAllModel.fromJson(res.data['data']),
};
} else {
return {
'status': false,
'data': [],
'msg': '请求错误 🙅',
};
}
}
}
class Data {
List<dynamic> list;
Data({this.list = const []});
}

View File

@ -1,5 +1,8 @@
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import '../common/constants.dart';
import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:html/parser.dart';
import 'package:pilipala/models/video/later.dart';
import '../models/model_hot_video_item.dart';
import '../models/user/fav_detail.dart';
import '../models/user/fav_folder.dart';
@ -57,12 +60,15 @@ class UserHttp {
if (res.data['data'] != null) {
data = FavFolderData.fromJson(res.data['data']);
return {'status': true, 'data': data};
} else {
return {'status': false, 'msg': '收藏夹为空'};
}
} else {
return {
'status': false,
'data': [],
'msg': res.data['message'] ?? '账号未登录'
'msg': res.data['message'],
'code': res.data['code'],
};
}
}
@ -111,7 +117,12 @@ class UserHttp {
'data': {'list': list, 'count': res.data['data']['count']}
};
} else {
return {'status': false, 'data': [], 'msg': res.data['message']};
return {
'status': false,
'data': [],
'msg': res.data['message'],
'code': res.data['code'],
};
}
}
@ -126,7 +137,12 @@ class UserHttp {
if (res.data['code'] == 0) {
return {'status': true, 'data': HistoryData.fromJson(res.data['data'])};
} else {
return {'status': false, 'data': [], 'msg': res.data['message']};
return {
'status': false,
'data': [],
'msg': res.data['message'],
'code': res.data['code'],
};
}
}
@ -135,7 +151,7 @@ class UserHttp {
// 暂停switchStatus传true 否则false
var res = await Request().post(
Api.pauseHistory,
queryParameters: {
data: {
'switch': switchStatus,
'jsonp': 'jsonp',
'csrf': await Request.getCsrf(),
@ -154,7 +170,7 @@ class UserHttp {
static Future clearHistory() async {
var res = await Request().post(
Api.clearHistory,
queryParameters: {
data: {
'jsonp': 'jsonp',
'csrf': await Request.getCsrf(),
},
@ -172,7 +188,7 @@ class UserHttp {
}
var res = await Request().post(
Api.toViewLater,
queryParameters: data,
data: data,
);
if (res.data['code'] == 0) {
return {'status': true, 'msg': 'yeah稍后再看'};
@ -191,7 +207,7 @@ class UserHttp {
params[aid != null ? 'aid' : 'viewed'] = aid ?? true;
var res = await Request().post(
Api.toViewDel,
queryParameters: params,
data: params,
);
if (res.data['code'] == 0) {
return {'status': true, 'msg': 'yeah成功移除'};
@ -200,30 +216,11 @@ class UserHttp {
}
}
// 获取用户凭证 失效
static Future thirdLogin() async {
var res = await Request().get(
'https://passport.bilibili.com/login/app/third',
data: {
'appkey': Constants.appKey,
'api': Constants.thirdApi,
'sign': Constants.thirdSign,
},
);
try {
if (res.data['code'] == 0 && res.data['data']['has_login'] == 1) {
Request().get(res.data['data']['confirm_uri']);
}
} catch (err) {
SmartDialog.showNotify(msg: '获取用户凭证: $err', notifyType: NotifyType.error);
}
}
// 清空稍后再看
static Future toViewClear() async {
var res = await Request().post(
Api.toViewClear,
queryParameters: {
data: {
'jsonp': 'jsonp',
'csrf': await Request.getCsrf(),
},
@ -239,7 +236,7 @@ class UserHttp {
static Future delHistory(kid) async {
var res = await Request().post(
Api.delHistory,
queryParameters: {
data: {
'kid': kid,
'jsonp': 'jsonp',
'csrf': await Request.getCsrf(),
@ -265,30 +262,6 @@ class UserHttp {
return {'status': false, 'msg': res.data['message']};
}
}
// // 相互关系查询
// static Future relationSearch(int mid) async {
// Map params = await WbiSign().makSign({
// 'mid': mid,
// 'token': '',
// 'platform': 'web',
// 'web_location': 1550101,
// });
// var res = await Request().get(
// Api.relationSearch,
// data: {
// 'mid': mid,
// 'w_rid': params['w_rid'],
// 'wts': params['wts'],
// },
// );
// if (res.data['code'] == 0) {
// // relation 主动状态
// // 被动状态
// return {'status': true, 'data': res.data['data']};
// } else {
// return {'status': false, 'msg': res.data['message']};
// }
// }
// 搜索历史记录
static Future searchHistory(
@ -326,16 +299,21 @@ class UserHttp {
'data': SubFolderModelData.fromJson(res.data['data'])
};
} else {
return {'status': false, 'msg': res.data['message']};
return {
'status': false,
'data': [],
'msg': res.data['message'],
'code': res.data['code'],
};
}
}
static Future userSubFolderDetail({
static Future userSeasonList({
required int seasonId,
required int pn,
required int ps,
}) async {
var res = await Request().get(Api.userSubFolderDetail, data: {
var res = await Request().get(Api.userSeasonList, data: {
'season_id': seasonId,
'ps': ps,
'pn': pn,
@ -349,4 +327,223 @@ class UserHttp {
return {'status': false, 'msg': res.data['message']};
}
}
static Future userResourceList({
required int seasonId,
required int pn,
required int ps,
}) async {
var res = await Request().get(Api.userResourceList, data: {
'media_id': seasonId,
'ps': ps,
'pn': pn,
'keyword': '',
'order': 'mtime',
'type': 0,
'tid': 0,
'platform': 'web',
});
if (res.data['code'] == 0) {
try {
return {
'status': true,
'data': SubDetailModelData.fromJson(res.data['data'])
};
} catch (err) {
return {'status': false, 'msg': err};
}
} else {
return {'status': false, 'msg': res.data['message']};
}
}
// 取消订阅
static Future cancelSub({required int seasonId}) async {
var res = await Request().post(
Api.cancelSub,
data: {
'platform': 'web',
'season_id': seasonId,
'csrf': await Request.getCsrf(),
},
);
if (res.data['code'] == 0) {
return {'status': true};
} else {
return {'status': false, 'msg': res.data['message']};
}
}
// 删除文件夹
static Future delFavFolder({required int mediaIds}) async {
var res = await Request().post(
Api.delFavFolder,
data: {
'media_ids': mediaIds,
'platform': 'web',
'csrf': await Request.getCsrf(),
},
);
if (res.data['code'] == 0) {
return {'status': true};
} else {
return {'status': false, 'msg': res.data['message']};
}
}
static List<String> extractScriptContents(String htmlContent) {
RegExp scriptRegExp = RegExp(r'<script>([\s\S]*?)<\/script>');
Iterable<Match> matches = scriptRegExp.allMatches(htmlContent);
List<String> scriptContents = [];
for (Match match in matches) {
String scriptContent = match.group(1)!;
scriptContents.add(scriptContent);
}
return scriptContents;
}
// 稍后再看列表
static Future getMediaList({
required int type,
required int bizId,
required int ps,
int? oid,
}) async {
var res = await Request().get(
Api.mediaList,
data: {
'mobi_app': 'web',
'type': type,
'biz_id': bizId,
'oid': oid ?? '',
'otype': 2,
'ps': ps,
'direction': false,
'desc': true,
'sort_field': 1,
'tid': 0,
'with_current': false,
},
);
if (res.data['code'] == 0) {
return {
'status': true,
'data': res.data['data']['media_list'] != null
? res.data['data']['media_list']
.map<MediaVideoItemModel>(
(e) => MediaVideoItemModel.fromJson(e))
.toList()
: []
};
} else {
return {'status': false, 'msg': res.data['message']};
}
}
// 解析收藏夹视频
static Future parseFavVideo({
required int mediaId,
required int oid,
required String bvid,
}) async {
var res = await Request().get(
'https://www.bilibili.com/list/ml$mediaId',
data: {
'oid': mediaId,
'bvid': bvid,
},
);
String scriptContent =
extractScriptContents(parse(res.data).body!.outerHtml)[0];
int startIndex = scriptContent.indexOf('{');
int endIndex = scriptContent.lastIndexOf('};');
String jsonContent = scriptContent.substring(startIndex, endIndex + 1);
// 解析JSON字符串为Map
Map<String, dynamic> jsonData = json.decode(jsonContent);
return {
'status': true,
'data': jsonData['resourceList']
.map<MediaVideoItemModel>((e) => MediaVideoItemModel.fromJson(e))
.toList()
};
}
static Future getAccountInfo() async {
var res = await Request().get(
Api.accountInfo,
data: {'web_location': 333.33},
);
if (res.data['code'] == 0) {
return {
'status': true,
'data': res.data['data'],
};
} else {
return {
'status': false,
'data': {},
'mag': res.data['message'],
};
}
}
static Future updateAccountInfo({
required String uname,
required String sign,
required String sex,
required String birthday,
}) async {
var res = await Request().post(
Api.updateAccountInfo,
data: {
'uname': uname,
'usersign': sign,
'sex': sex,
'birthday': birthday,
'csrf': await Request.getCsrf(),
},
options: Options(contentType: Headers.formUrlEncodedContentType),
);
if (res.data['code'] == 0) {
return {
'status': true,
'msg': '更新成功',
};
} else {
return {
'status': false,
'msg': res.data['message'],
};
}
}
// 解析up投稿
static Future parseUpArchiveVideo({
required int mid,
required int oid,
required String bvid,
String sortField = 'pubtime',
}) async {
var res = await Request().get(
'https://www.bilibili.com/list/$mid',
data: {
'oid': oid,
'bvid': bvid,
'sort_field': sortField,
},
);
String scriptContent =
extractScriptContents(parse(res.data).body!.outerHtml)[0];
int startIndex = scriptContent.indexOf('{');
int endIndex = scriptContent.lastIndexOf('};');
String jsonContent = scriptContent.substring(startIndex, endIndex + 1);
// 解析JSON字符串为Map
Map<String, dynamic> jsonData = json.decode(jsonContent);
return {
'status': true,
'data': jsonData['resourceList']
.map<MediaVideoItemModel>((e) => MediaVideoItemModel.fromJson(e))
.toList()
};
}
}

View File

@ -1,5 +1,9 @@
import 'dart:convert';
import 'dart:developer';
import 'package:dio/dio.dart';
import 'package:hive/hive.dart';
import 'package:pilipala/utils/id_utils.dart';
import 'package:pilipala/models/video/tags.dart';
import '../common/constants.dart';
import '../models/common/reply_type.dart';
import '../models/home/rcmd/result.dart';
@ -8,9 +12,11 @@ import '../models/model_rec_video_item.dart';
import '../models/user/fav_folder.dart';
import '../models/video/ai.dart';
import '../models/video/play/url.dart';
import '../models/video/subTitile/result.dart';
import '../models/video_detail_res.dart';
import '../utils/recommend_filter.dart';
import '../utils/storage.dart';
import '../utils/subtitle.dart';
import '../utils/wbi_sign.dart';
import 'api.dart';
import 'init.dart';
@ -20,11 +26,11 @@ import 'init.dart';
/// 返回{'status': bool, 'data': List}
/// view层根据 status 判断渲染逻辑
class VideoHttp {
static Box localCache = GStrorage.localCache;
static Box setting = GStrorage.setting;
static Box localCache = GStorage.localCache;
static Box setting = GStorage.setting;
static bool enableRcmdDynamic =
setting.get(SettingBoxKey.enableRcmdDynamic, defaultValue: true);
static Box userInfoCache = GStrorage.userInfo;
static Box userInfoCache = GStorage.userInfo;
// 首页推荐视频
static Future rcmdVideoList({required int ps, required int freshIdx}) async {
@ -33,7 +39,7 @@ class VideoHttp {
Api.recommendListWeb,
data: {
'version': 1,
'feed_version': 'V8',
'feed_version': 'V3',
'homepage_ver': 1,
'ps': ps,
'fresh_idx': freshIdx,
@ -68,47 +74,45 @@ class VideoHttp {
// 添加额外的loginState变量模拟未登录状态
static Future rcmdVideoListApp(
{bool loginStatus = true, required int freshIdx}) async {
try {
var res = await Request().get(
Api.recommendListApp,
data: {
'idx': freshIdx,
'flush': '5',
'column': '4',
'device': 'pad',
'device_type': 0,
'device_name': 'vivo',
'pull': freshIdx == 0 ? 'true' : 'false',
'appkey': Constants.appKey,
'access_key': loginStatus
? (localCache.get(LocalCacheKey.accessKey,
defaultValue: {})['value'] ??
'')
: ''
},
);
if (res.data['code'] == 0) {
List<RecVideoItemAppModel> list = [];
List<int> blackMidsList =
setting.get(SettingBoxKey.blackMidsList, defaultValue: [-1]);
for (var i in res.data['data']['items']) {
// 屏蔽推广和拉黑用户
if (i['card_goto'] != 'ad_av' &&
(!enableRcmdDynamic ? i['card_goto'] != 'picture' : true) &&
(i['args'] != null &&
!blackMidsList.contains(i['args']['up_mid']))) {
RecVideoItemAppModel videoItem = RecVideoItemAppModel.fromJson(i);
if (!RecommendFilter.filter(videoItem)) {
list.add(videoItem);
}
var res = await Request().get(
Api.recommendListApp,
data: {
'idx': freshIdx,
'flush': '5',
'column': '4',
'device': 'pad',
'device_type': 0,
'device_name': 'vivo',
'pull': freshIdx == 0 ? 'true' : 'false',
'appkey': Constants.appKey,
'access_key': loginStatus
? (localCache
.get(LocalCacheKey.accessKey, defaultValue: {})['value'] ??
'')
: ''
},
);
if (res.data['code'] == 0) {
List<RecVideoItemAppModel> list = [];
List<int> blackMidsList =
setting.get(SettingBoxKey.blackMidsList, defaultValue: [-1]);
for (var i in res.data['data']['items']) {
// 屏蔽推广和拉黑用户
if (i['card_goto'] != 'ad_av' &&
i['card_goto'] != 'ad_web_s' &&
i['card_goto'] != 'ad_web' &&
(!enableRcmdDynamic ? i['card_goto'] != 'picture' : true) &&
(i['args'] != null &&
!blackMidsList.contains(i['args']['up_mid']))) {
RecVideoItemAppModel videoItem = RecVideoItemAppModel.fromJson(i);
if (!RecommendFilter.filter(videoItem)) {
list.add(videoItem);
}
}
return {'status': true, 'data': list};
} else {
return {'status': false, 'data': [], 'msg': res.data['message']};
}
} catch (err) {
return {'status': false, 'data': [], 'msg': err.toString()};
return {'status': true, 'data': list};
} else {
return {'status': false, 'data': [], 'msg': res.data['message']};
}
}
@ -190,22 +194,15 @@ class VideoHttp {
// 视频信息 标题、简介
static Future videoIntro({required String bvid}) async {
var res = await Request().get(Api.videoIntro, data: {'bvid': bvid});
VideoDetailResponse result = VideoDetailResponse.fromJson(res.data);
if (result.code == 0) {
if (res.data['code'] == 0) {
VideoDetailResponse result = VideoDetailResponse.fromJson(res.data);
return {'status': true, 'data': result.data!};
} else {
Map errMap = {
-400: '请求错误',
-403: '权限不足',
-404: '视频资源失效',
62002: '稿件不可见',
62004: '稿件审核中',
};
return {
'status': false,
'data': null,
'code': result.code,
'msg': errMap[result.code] ?? '请求异常',
'code': res.data['code'],
'msg': res.data['message'],
};
}
}
@ -252,7 +249,7 @@ class VideoHttp {
static Future coinVideo({required String bvid, required int multiply}) async {
var res = await Request().post(
Api.coinVideo,
queryParameters: {
data: {
'bvid': bvid,
'multiply': multiply,
'select_like': 0,
@ -280,7 +277,7 @@ class VideoHttp {
static Future oneThree({required String bvid}) async {
var res = await Request().post(
Api.oneThree,
queryParameters: {
data: {
'bvid': bvid,
'csrf': await Request.getCsrf(),
},
@ -296,7 +293,7 @@ class VideoHttp {
static Future likeVideo({required String bvid, required bool type}) async {
var res = await Request().post(
Api.likeVideo,
queryParameters: {
data: {
'bvid': bvid,
'like': type ? 1 : 2,
'csrf': await Request.getCsrf(),
@ -312,13 +309,16 @@ class VideoHttp {
// (取消)收藏
static Future favVideo(
{required int aid, String? addIds, String? delIds}) async {
var res = await Request().post(Api.favVideo, queryParameters: {
'rid': aid,
'type': 2,
'add_media_ids': addIds ?? '',
'del_media_ids': delIds ?? '',
'csrf': await Request.getCsrf(),
});
var res = await Request().post(
Api.favVideo,
data: {
'rid': aid,
'type': 2,
'add_media_ids': addIds ?? '',
'del_media_ids': delIds ?? '',
'csrf': await Request.getCsrf(),
},
);
if (res.data['code'] == 0) {
return {'status': true, 'data': res.data['data']};
} else {
@ -352,20 +352,37 @@ class VideoHttp {
required String message,
int? root,
int? parent,
List<Map<dynamic, dynamic>>? pictures,
}) async {
if (message == '') {
return {'status': false, 'data': [], 'msg': '请输入评论内容'};
}
var res = await Request().post(Api.replyAdd, queryParameters: {
'type': type.index,
var params = <String, dynamic>{
'plat': 1,
'oid': oid,
'type': type.index,
'root': root == null || root == 0 ? '' : root,
'parent': parent == null || parent == 0 ? '' : parent,
'message': message,
'at_name_to_mid': {},
if (pictures != null) 'pictures': jsonEncode(pictures),
'gaia_source': 'main_web',
'csrf': await Request.getCsrf(),
});
log(res.toString());
};
Map sign = await WbiSign().makSign(params);
params.remove('wts');
params.remove('w_rid');
FormData formData = FormData.fromMap({...params});
var res = await Request().post(
Api.replyAdd,
queryParameters: {
'w_rid': sign['w_rid'],
'wts': sign['wts'],
},
data: formData,
);
if (res.data['code'] == 0) {
log(res.toString());
return {'status': true, 'data': res.data['data']};
} else {
return {'status': false, 'data': [], 'msg': res.data['message']};
@ -385,42 +402,57 @@ class VideoHttp {
// 操作用户关系
static Future relationMod(
{required int mid, required int act, required int reSrc}) async {
var res = await Request().post(Api.relationMod, queryParameters: {
'fid': mid,
'act': act,
're_src': reSrc,
'csrf': await Request.getCsrf(),
});
var res = await Request().post(
Api.relationMod,
data: {
'fid': mid,
'act': act,
're_src': reSrc,
'csrf': await Request.getCsrf(),
},
);
if (res.data['code'] == 0) {
return {'status': true, 'data': res.data['data']};
if (act == 5) {
List<int> blackMidsList =
setting.get(SettingBoxKey.blackMidsList, defaultValue: [-1]);
blackMidsList.add(mid);
setting.put(SettingBoxKey.blackMidsList, blackMidsList);
}
return {'status': true, 'data': res.data['data'], 'msg': '成功'};
} else {
return {'status': false, 'data': []};
return {'status': false, 'data': [], 'msg': res.data['message']};
}
}
// 视频播放进度
static Future heartBeat({bvid, cid, progress, realtime}) async {
await Request().post(Api.heartBeat, queryParameters: {
// 'aid': aid,
'bvid': bvid,
'cid': cid,
// 'epid': '',
// 'sid': '',
// 'mid': '',
'played_time': progress,
// 'realtime': realtime,
// 'type': '',
// 'sub_type': '',
'csrf': await Request.getCsrf(),
});
await Request().post(
Api.heartBeat,
data: {
// 'aid': aid,
'bvid': bvid,
'cid': cid,
// 'epid': '',
// 'sid': '',
// 'mid': '',
'played_time': progress,
// 'realtime': realtime,
// 'type': '',
// 'sub_type': '',
'csrf': await Request.getCsrf(),
},
);
}
// 添加追番
static Future bangumiAdd({int? seasonId}) async {
var res = await Request().post(Api.bangumiAdd, queryParameters: {
'season_id': seasonId,
'csrf': await Request.getCsrf(),
});
var res = await Request().post(
Api.bangumiAdd,
data: {
'season_id': seasonId,
'csrf': await Request.getCsrf(),
},
);
if (res.data['code'] == 0) {
return {'status': true, 'msg': res.data['result']['toast']};
} else {
@ -430,10 +462,13 @@ class VideoHttp {
// 取消追番
static Future bangumiDel({int? seasonId}) async {
var res = await Request().post(Api.bangumiDel, queryParameters: {
'season_id': seasonId,
'csrf': await Request.getCsrf(),
});
var res = await Request().post(
Api.bangumiDel,
data: {
'season_id': seasonId,
'csrf': await Request.getCsrf(),
},
);
if (res.data['code'] == 0) {
return {'status': true, 'msg': res.data['result']['toast']};
} else {
@ -475,4 +510,117 @@ class VideoHttp {
return {'status': false, 'data': []};
}
}
static Future getSubtitle({int? cid, String? bvid, String? aid}) async {
var res = await Request().get(Api.getSubtitleConfig, data: {
'cid': cid,
if (bvid != null) 'bvid': bvid,
if (aid != null) 'aid': aid,
});
try {
if (res.data['code'] == 0) {
return {
'status': true,
'data': SubTitlteModel.fromJson(res.data['data']),
};
} else {
return {'status': false, 'data': [], 'msg': res.data['msg']};
}
} catch (err) {
return {'status': false, 'data': [], 'msg': res.data['msg']};
}
}
// 视频排行
static Future getRankVideoList(int rid) async {
try {
var rankApi = "${Api.getRankApi}?rid=$rid&type=all";
var res = await Request().get(rankApi);
if (res.data['code'] == 0) {
List<HotVideoItemModel> list = [];
List<int> blackMidsList =
setting.get(SettingBoxKey.blackMidsList, defaultValue: [-1]);
for (var i in res.data['data']['list']) {
if (!blackMidsList.contains(i['owner']['mid'])) {
list.add(HotVideoItemModel.fromJson(i));
}
}
return {'status': true, 'data': list};
} else {
return {'status': false, 'data': [], 'msg': res.data['message']};
}
} catch (err) {
return {'status': false, 'data': [], 'msg': err};
}
}
// 获取字幕内容
static Future<Map<String, dynamic>> getSubtitleContent(url) async {
var res = await Request().get('https:$url');
final String content =
await SubTitleUtils.convertToWebVTT(res.data['body']);
final List body = res.data['body'];
return {'content': content, 'body': body};
}
static Future<Map<String, dynamic>> getSubscribeStatus(
{required dynamic bvid}) async {
var res = await Request().get(
Api.videoRelation,
data: {
'aid': IdUtils.bv2av(bvid),
'bvid': bvid,
},
);
if (res.data['code'] == 0) {
return {
'status': true,
'data': res.data['data'],
};
} else {
return {
'status': false,
'msg': res.data['message'],
};
}
}
static Future seasonFav({
required bool isFav,
required dynamic seasonId,
}) async {
var res = await Request().post(
isFav ? Api.cancelSub : Api.confirmSub,
data: {
'platform': 'web',
'season_id': seasonId,
'csrf': await Request.getCsrf(),
},
);
if (res.data['code'] == 0) {
return {
'status': true,
};
} else {
return {
'status': false,
'msg': res.data['message'],
};
}
}
// 获取视频标签
static Future getVideoTag({required String bvid}) async {
var res = await Request().get(Api.videoTag, data: {'bvid': bvid});
if (res.data['code'] == 0) {
return {
'status': true,
'data': res.data['data'].map<VideoTagItem>((e) {
return VideoTagItem.fromJson(e);
}).toList()
};
} else {
return {'status': false, 'data': [], 'msg': res.data['message']};
}
}
}

View File

@ -1,5 +1,6 @@
import 'dart:io';
import 'package:device_info_plus/device_info_plus.dart';
import 'package:flutter/services.dart';
import 'package:flutter_displaymode/flutter_displaymode.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
@ -9,6 +10,7 @@ import 'package:flutter/material.dart';
import 'package:dynamic_color/dynamic_color.dart';
import 'package:hive/hive.dart';
import 'package:pilipala/common/widgets/custom_toast.dart';
import 'package:pilipala/http/common.dart';
import 'package:pilipala/http/init.dart';
import 'package:pilipala/models/common/color_type.dart';
import 'package:pilipala/models/common/theme_type.dart';
@ -19,8 +21,9 @@ import 'package:pilipala/pages/main/view.dart';
import 'package:pilipala/services/service_locator.dart';
import 'package:pilipala/utils/app_scheme.dart';
import 'package:pilipala/utils/data.dart';
import 'package:pilipala/utils/global_data_cache.dart';
import 'package:pilipala/utils/storage.dart';
import 'package:media_kit/media_kit.dart'; // Provides [Player], [Media], [Playlist] etc.
import 'package:media_kit/media_kit.dart';
import 'package:pilipala/utils/recommend_filter.dart';
import 'package:catcher_2/catcher_2.dart';
import './services/loggeer.dart';
@ -28,50 +31,43 @@ import './services/loggeer.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
MediaKit.ensureInitialized();
SystemChrome.setPreferredOrientations(
[DeviceOrientation.portraitUp, DeviceOrientation.portraitDown])
.then((_) async {
await GStrorage.init();
await setupServiceLocator();
Request();
await Request.setCookie();
RecommendFilter();
await SystemChrome.setPreferredOrientations(
[DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]);
await GStorage.init();
clearLogs();
Request();
await Request.setCookie();
// 异常捕获 logo记录
final Catcher2Options debugConfig = Catcher2Options(
SilentReportMode(),
[
FileHandler(await getLogsPath()),
ConsoleHandler(
enableDeviceParameters: false,
enableApplicationParameters: false,
)
],
);
// 异常捕获 logo记录
final Catcher2Options releaseConfig = Catcher2Options(
SilentReportMode(),
[FileHandler(await getLogsPath())],
);
final Catcher2Options releaseConfig = Catcher2Options(
SilentReportMode(),
[FileHandler(await getLogsPath())],
);
Catcher2(
releaseConfig: releaseConfig,
runAppFunction: () {
runApp(const MyApp());
},
);
Catcher2(
debugConfig: debugConfig,
releaseConfig: releaseConfig,
runAppFunction: () {
runApp(const MyApp());
},
);
// 小白条、导航栏沉浸
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
// 小白条、导航栏沉浸
if (Platform.isAndroid) {
final androidInfo = await DeviceInfoPlugin().androidInfo;
if (androidInfo.version.sdkInt >= 29) {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
}
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
systemNavigationBarColor: Colors.transparent,
systemNavigationBarDividerColor: Colors.transparent,
statusBarColor: Colors.transparent,
systemNavigationBarContrastEnforced: false,
));
Data.init();
PiliSchame.init();
});
}
PiliSchame.init();
await GlobalDataCache.initialize();
CommonHttp.buvidActivate();
}
class MyApp extends StatelessWidget {
@ -79,7 +75,7 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
Box setting = GStrorage.setting;
Box setting = GStorage.setting;
// 主题色
Color defaultColor =
colorThemeTypes[setting.get(SettingBoxKey.customColor, defaultValue: 0)]
@ -112,6 +108,39 @@ class MyApp extends StatelessWidget {
} catch (_) {}
}
if (Platform.isAndroid) {
return AndroidApp(
brandColor: brandColor,
isDynamicColor: isDynamicColor,
currentThemeValue: currentThemeValue,
textScale: textScale,
);
} else {
return OtherApp(
brandColor: brandColor,
currentThemeValue: currentThemeValue,
textScale: textScale,
);
}
}
}
class AndroidApp extends StatelessWidget {
const AndroidApp({
super.key,
required this.brandColor,
required this.isDynamicColor,
required this.currentThemeValue,
required this.textScale,
});
final Color brandColor;
final bool isDynamicColor;
final ThemeType currentThemeValue;
final double textScale;
@override
Widget build(BuildContext context) {
return DynamicColorBuilder(
builder: ((ColorScheme? lightDynamic, ColorScheme? darkDynamic) {
ColorScheme? lightColorScheme;
@ -131,71 +160,153 @@ class MyApp extends StatelessWidget {
brightness: Brightness.dark,
);
}
// 图片缓存
// PaintingBinding.instance.imageCache.maximumSizeBytes = 1000 << 20;
return GetMaterialApp(
title: 'PiLiPaLa',
theme: ThemeData(
// fontFamily: 'HarmonyOS',
colorScheme: currentThemeValue == ThemeType.dark
? darkColorScheme
: lightColorScheme,
useMaterial3: true,
snackBarTheme: SnackBarThemeData(
actionTextColor: lightColorScheme.primary,
backgroundColor: lightColorScheme.secondaryContainer,
closeIconColor: lightColorScheme.secondary,
contentTextStyle: TextStyle(color: lightColorScheme.secondary),
elevation: 20,
),
pageTransitionsTheme: const PageTransitionsTheme(
builders: <TargetPlatform, PageTransitionsBuilder>{
TargetPlatform.android: ZoomPageTransitionsBuilder(
allowEnterRouteSnapshotting: false,
),
},
),
),
darkTheme: ThemeData(
// fontFamily: 'HarmonyOS',
colorScheme: currentThemeValue == ThemeType.light
? lightColorScheme
: darkColorScheme,
useMaterial3: true,
snackBarTheme: SnackBarThemeData(
actionTextColor: darkColorScheme.primary,
backgroundColor: darkColorScheme.secondaryContainer,
closeIconColor: darkColorScheme.secondary,
contentTextStyle: TextStyle(color: darkColorScheme.secondary),
elevation: 20,
),
),
localizationsDelegates: const [
GlobalCupertinoLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],
locale: const Locale("zh", "CN"),
supportedLocales: const [Locale("zh", "CN"), Locale("en", "US")],
fallbackLocale: const Locale("zh", "CN"),
getPages: Routes.getPages,
home: const MainApp(),
builder: (BuildContext context, Widget? child) {
return FlutterSmartDialog(
toastBuilder: (String msg) => CustomToast(msg: msg),
child: MediaQuery(
data: MediaQuery.of(context)
.copyWith(textScaler: TextScaler.linear(textScale)),
child: child!,
),
);
},
navigatorObservers: [
VideoDetailPage.routeObserver,
SearchPage.routeObserver,
],
return BuildMainApp(
lightColorScheme: lightColorScheme,
darkColorScheme: darkColorScheme,
currentThemeValue: currentThemeValue,
textScale: textScale,
);
}),
);
}
}
class OtherApp extends StatelessWidget {
const OtherApp({
super.key,
required this.brandColor,
required this.currentThemeValue,
required this.textScale,
});
final Color brandColor;
final ThemeType currentThemeValue;
final double textScale;
@override
Widget build(BuildContext context) {
return BuildMainApp(
lightColorScheme: ColorScheme.fromSeed(
seedColor: brandColor,
brightness: Brightness.light,
),
darkColorScheme: ColorScheme.fromSeed(
seedColor: brandColor,
brightness: Brightness.dark,
),
currentThemeValue: currentThemeValue,
textScale: textScale,
);
}
}
class BuildMainApp extends StatelessWidget {
const BuildMainApp({
super.key,
required this.lightColorScheme,
required this.darkColorScheme,
required this.currentThemeValue,
required this.textScale,
});
final ColorScheme lightColorScheme;
final ColorScheme darkColorScheme;
final ThemeType currentThemeValue;
final double textScale;
@override
Widget build(BuildContext context) {
Box setting = GStorage.setting;
/// 纯黑模式主题配置
ColorScheme? pureDarkColorScheme;
final bool enablePureBlack =
setting.get(SettingBoxKey.enablePureBlack, defaultValue: false);
if (enablePureBlack) {
pureDarkColorScheme = darkColorScheme.copyWith(
background: Colors.black,
surface: Colors.black,
onPrimary: Colors.black,
onSecondary: Colors.black,
);
}
final SnackBarThemeData snackBarTheme = SnackBarThemeData(
actionTextColor: lightColorScheme.primary,
backgroundColor: lightColorScheme.secondaryContainer,
closeIconColor: lightColorScheme.secondary,
contentTextStyle: TextStyle(color: lightColorScheme.secondary),
elevation: 20,
);
AppBarTheme appBarTheme(ColorScheme colorScheme) {
return AppBarTheme(
backgroundColor: colorScheme.surface,
foregroundColor: colorScheme.onSurface,
elevation: 0,
titleSpacing: 0,
scrolledUnderElevation: 0,
// titleTextStyle: TextStyle(
// fontSize: Theme.of(context).textTheme.titleLarge!.fontSize),
);
}
ThemeData buildThemeData(ColorScheme colorScheme) {
return ThemeData(
colorScheme: colorScheme,
snackBarTheme: snackBarTheme,
appBarTheme: appBarTheme(colorScheme),
pageTransitionsTheme: const PageTransitionsTheme(
builders: <TargetPlatform, PageTransitionsBuilder>{
TargetPlatform.android: ZoomPageTransitionsBuilder(
allowEnterRouteSnapshotting: false,
),
},
),
);
}
return GetMaterialApp(
title: 'PiliPala',
theme: buildThemeData(
currentThemeValue == ThemeType.dark
? pureDarkColorScheme ?? darkColorScheme
: lightColorScheme,
),
darkTheme: buildThemeData(
currentThemeValue == ThemeType.light
? lightColorScheme
: pureDarkColorScheme ?? darkColorScheme,
),
localizationsDelegates: const [
GlobalCupertinoLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],
locale: const Locale("zh", "CN"),
supportedLocales: const [Locale("zh", "CN"), Locale("en", "US")],
fallbackLocale: const Locale("zh", "CN"),
getPages: Routes.getPages,
home: const MainApp(),
builder: (BuildContext context, Widget? child) {
return FlutterSmartDialog(
toastBuilder: (String msg) => CustomToast(msg: msg),
child: MediaQuery(
data: MediaQuery.of(context)
.copyWith(textScaler: TextScaler.linear(textScale)),
child: child!,
),
);
},
navigatorObservers: [
VideoDetailPage.routeObserver,
SearchPage.routeObserver,
],
onReady: () async {
RecommendFilter();
Data.init();
setupServiceLocator();
},
);
}
}

View File

@ -144,6 +144,7 @@ class EpisodeItem {
this.link,
this.longTitle,
this.pubTime,
this.pubdate,
this.pv,
this.releaseDate,
this.rights,
@ -155,6 +156,7 @@ class EpisodeItem {
this.subtitle,
this.title,
this.vid,
this.stat,
});
int? aid;
@ -173,6 +175,7 @@ class EpisodeItem {
String? link;
String? longTitle;
int? pubTime;
int? pubdate;
int? pv;
String? releaseDate;
Map? rights;
@ -184,6 +187,7 @@ class EpisodeItem {
String? subtitle;
String? title;
String? vid;
String? stat;
EpisodeItem.fromJson(Map<String, dynamic> json) {
aid = json['aid'];
@ -202,6 +206,7 @@ class EpisodeItem {
link = json['link'];
longTitle = json['long_title'];
pubTime = json['pub_time'];
pubdate = json['pub_time'];
pv = json['pv'];
releaseDate = json['release_date'];
rights = json['rights'];
@ -211,7 +216,7 @@ class EpisodeItem {
skip = json['skip'];
status = json['status'];
subtitle = json['subtitle'];
title = json['title'];
title = json['long_title'];
vid = json['vid'];
}
}

View File

@ -30,6 +30,7 @@ class BangumiListItemModel {
BangumiListItemModel({
this.badge,
this.badgeType,
this.pic,
this.cover,
// this.firstEp,
this.indexShow,
@ -46,10 +47,12 @@ class BangumiListItemModel {
this.title,
this.titleIcon,
this.progress,
this.progressIndex,
});
String? badge;
int? badgeType;
String? pic;
String? cover;
String? indexShow;
int? isFinish;
@ -64,12 +67,13 @@ class BangumiListItemModel {
String? subTitle;
String? title;
String? titleIcon;
String? progress;
int? progressIndex;
BangumiListItemModel.fromJson(Map<String, dynamic> json) {
badge = json['badge'] == '' ? null : json['badge'];
badgeType = json['badge_type'];
pic = json['cover'];
cover = json['cover'];
indexShow = json['index_show'];
isFinish = json['is_finish'];
@ -84,7 +88,9 @@ class BangumiListItemModel {
subTitle = json['sub_title'];
title = json['title'];
titleIcon = json['title_icon'];
progress = json['progress'];
progressIndex = int.parse(
RegExp(r'第(\d+)话').firstMatch(json['progress'] ?? '第1话')?.group(1) ??
'0');
}
}

View File

@ -0,0 +1,93 @@
// 操作类型的枚举值:点赞 不喜欢 收藏 投币 稍后再看 下载封面 后台播放 听视频 分享 下载视频
import 'package:flutter/material.dart';
import 'package:get/get.dart';
enum ActionType {
like,
coin,
collect,
watchLater,
share,
dislike,
downloadCover,
copyLink,
// backgroundPlay,
// listenVideo,
// downloadVideo,
}
extension ActionTypeExtension on ActionType {
String get value => [
'like',
'coin',
'collect',
'watchLater',
'share',
'dislike',
'downloadCover',
'copyLink',
// 'backgroundPlay',
// 'listenVideo',
// 'downloadVideo',
][index];
String get label => [
'点赞视频',
'投币',
'收藏视频',
'稍后再看',
'视频分享',
'不喜欢',
'下载封面',
'复制链接',
// '后台播放',
// '听视频',
// '下载视频',
][index];
}
List<Map> actionMenuConfig = [
{
'icon': const Icon(Icons.thumb_up_alt_outlined),
'label': '点赞视频',
'value': ActionType.like,
},
{
'icon': Image.asset(
'assets/images/coin.png',
width: 26,
color: IconTheme.of(Get.context!).color!.withOpacity(0.65),
),
'label': '投币',
'value': ActionType.coin,
},
{
'icon': const Icon(Icons.star_border),
'label': '收藏视频',
'value': ActionType.collect,
},
{
'icon': const Icon(Icons.watch_later_outlined),
'label': '稍后再看',
'value': ActionType.watchLater,
},
{
'icon': const Icon(Icons.share),
'label': '视频分享',
'value': ActionType.share,
},
{
'icon': const Icon(Icons.thumb_down_alt_outlined),
'label': '不喜欢',
'value': ActionType.dislike,
},
{
'icon': const Icon(Icons.image_outlined),
'label': '下载封面',
'value': ActionType.downloadCover,
},
{
'icon': const Icon(Icons.link_outlined),
'label': '复制链接',
'value': ActionType.copyLink,
},
];

View File

@ -0,0 +1,18 @@
enum CommentRangeType {
video,
bangumi,
// dynamic,
}
extension ActionTypeExtension on CommentRangeType {
String get value => [
'video',
'bangumi',
// 'dynamic',
][index];
String get label => [
'视频',
'番剧',
// '动态',
][index];
}

View File

@ -7,5 +7,5 @@ enum DynamicsType {
extension BusinessTypeExtension on DynamicsType {
String get values => ['all', 'video', 'pgc', 'article'][index];
String get labels => ['全部', '视频', '', '专栏'][index];
String get labels => ['全部', '投稿', '', '专栏'][index];
}

View File

@ -4,9 +4,12 @@ enum FullScreenGestureMode {
/// 从下滑到上
fromBottomtoTop,
/// 关闭手势
none,
}
extension FullScreenGestureModeExtension on FullScreenGestureMode {
String get values => ['fromToptoBottom', 'fromBottomtoTop'][index];
String get labels => ['从上往下滑进入全屏', '从下往上滑进入全屏'][index];
String get values => ['fromToptoBottom', 'fromBottomtoTop', 'none'][index];
String get labels => ['从上往下滑进入全屏', '从下往上滑进入全屏', '关闭手势'][index];
}

View File

@ -0,0 +1,73 @@
class InvalidVideoModel {
final int? id;
final int? ver;
final int? aid;
final String? lastupdate;
final int? lastupdatets;
final String? title;
final String? description;
final String? pic;
final int? tid;
final String? typename;
final int? created;
final String? createdAt;
final String? author;
final int? mid;
final String? play;
final String? coins;
final String? review;
final String? videoReview;
final String? favorites;
final String? tag;
final List<String>? tagList;
InvalidVideoModel({
this.id,
this.ver,
this.aid,
this.lastupdate,
this.lastupdatets,
this.title,
this.description,
this.pic,
this.tid,
this.typename,
this.created,
this.createdAt,
this.author,
this.mid,
this.play,
this.coins,
this.review,
this.videoReview,
this.favorites,
this.tag,
this.tagList,
});
factory InvalidVideoModel.fromJson(Map<String, dynamic> json) {
return InvalidVideoModel(
id: json['id'],
ver: json['ver'],
aid: json['aid'],
lastupdate: json['lastupdate'],
lastupdatets: json['lastupdatets'],
title: json['title'],
description: json['description'],
pic: json['pic'],
tid: json['tid'],
typename: json['typename'],
created: json['created'],
createdAt: json['created_at'],
author: json['author'],
mid: json['mid'],
play: json['play'],
coins: json['coins'],
review: json['review'],
videoReview: json['video_review'],
favorites: json['favorites'],
tag: json['tag'],
tagList: json['tag'].toString().split(',').toList(),
);
}
}

View File

@ -1,43 +1,64 @@
import 'package:flutter/material.dart';
import 'package:pilipala/pages/mine/index.dart';
import '../../pages/dynamics/index.dart';
import '../../pages/home/index.dart';
import '../../pages/rank/index.dart';
const defaultNavigationBars = [
List defaultNavigationBars = [
{
'id': 0,
'icon': Icon(
'icon': const Icon(
Icons.home_outlined,
size: 21,
),
'selectIcon': Icon(
'selectIcon': const Icon(
Icons.home,
size: 21,
),
'label': "首页",
'count': 0,
'page': const HomePage(),
},
{
'id': 1,
'icon': Icon(
'icon': const Icon(
Icons.trending_up,
size: 21,
),
'selectIcon': const Icon(
Icons.trending_up_outlined,
size: 21,
),
'label': "排行榜",
'count': 0,
'page': const RankPage(),
},
{
'id': 2,
'icon': const Icon(
Icons.motion_photos_on_outlined,
size: 21,
),
'selectIcon': Icon(
'selectIcon': const Icon(
Icons.motion_photos_on,
size: 21,
),
'label': "动态",
'count': 0,
'page': const DynamicsPage(),
},
{
'id': 2,
'icon': Icon(
Icons.video_collection_outlined,
'id': 3,
'icon': const Icon(
Icons.person_outline,
size: 20,
),
'selectIcon': Icon(
Icons.video_collection,
'selectIcon': const Icon(
Icons.person,
size: 21,
),
'label': "媒体库",
'label': "我的",
'count': 0,
}
'page': const MinePage(),
},
];

View File

@ -0,0 +1,222 @@
import 'package:flutter/material.dart';
import 'package:pilipala/pages/rank/zone/index.dart';
enum RandType {
all,
creation,
animation,
music,
dance,
game,
knowledge,
technology,
sport,
car,
life,
food,
animal,
madness,
fashion,
entertainment,
film,
origin,
rookie
}
extension RankTypeDesc on RandType {
String get description => [
'全站',
'国创相关',
'动画',
'音乐',
'舞蹈',
'游戏',
'知识',
'科技',
'运动',
'汽车',
'生活',
'美食',
'动物圈',
'鬼畜',
'时尚',
'娱乐',
'影视'
][index];
String get id => [
'all',
'creation',
'animation',
'music',
'dance',
'game',
'knowledge',
'technology',
'sport',
'car',
'life',
'food',
'animal',
'madness',
'fashion',
'entertainment',
'film'
][index];
}
List tabsConfig = [
{
'icon': const Icon(
Icons.live_tv_outlined,
size: 15,
),
'label': '全站',
'type': RandType.all,
'page': const ZonePage(rid: 0),
},
{
'icon': const Icon(
Icons.live_tv_outlined,
size: 15,
),
'label': '国创相关',
'type': RandType.creation,
'page': const ZonePage(rid: 168),
},
{
'icon': const Icon(
Icons.live_tv_outlined,
size: 15,
),
'label': '动画',
'type': RandType.animation,
'page': const ZonePage(rid: 1),
},
{
'icon': const Icon(
Icons.live_tv_outlined,
size: 15,
),
'label': '音乐',
'type': RandType.music,
'page': const ZonePage(rid: 3),
},
{
'icon': const Icon(
Icons.live_tv_outlined,
size: 15,
),
'label': '舞蹈',
'type': RandType.dance,
'page': const ZonePage(rid: 129),
},
{
'icon': const Icon(
Icons.live_tv_outlined,
size: 15,
),
'label': '游戏',
'type': RandType.game,
'page': const ZonePage(rid: 4),
},
{
'icon': const Icon(
Icons.live_tv_outlined,
size: 15,
),
'label': '知识',
'type': RandType.knowledge,
'page': const ZonePage(rid: 36),
},
{
'icon': const Icon(
Icons.live_tv_outlined,
size: 15,
),
'label': '科技',
'type': RandType.technology,
'page': const ZonePage(rid: 188),
},
{
'icon': const Icon(
Icons.live_tv_outlined,
size: 15,
),
'label': '运动',
'type': RandType.sport,
'page': const ZonePage(rid: 234),
},
{
'icon': const Icon(
Icons.live_tv_outlined,
size: 15,
),
'label': '汽车',
'type': RandType.car,
'page': const ZonePage(rid: 223),
},
{
'icon': const Icon(
Icons.live_tv_outlined,
size: 15,
),
'label': '生活',
'type': RandType.life,
'page': const ZonePage(rid: 160),
},
{
'icon': const Icon(
Icons.live_tv_outlined,
size: 15,
),
'label': '美食',
'type': RandType.food,
'page': const ZonePage(rid: 211),
},
{
'icon': const Icon(
Icons.live_tv_outlined,
size: 15,
),
'label': '动物圈',
'type': RandType.animal,
'page': const ZonePage(rid: 217),
},
{
'icon': const Icon(
Icons.live_tv_outlined,
size: 15,
),
'label': '鬼畜',
'type': RandType.madness,
'page': const ZonePage(rid: 119),
},
{
'icon': const Icon(
Icons.live_tv_outlined,
size: 15,
),
'label': '时尚',
'type': RandType.fashion,
'page': const ZonePage(rid: 155),
},
{
'icon': const Icon(
Icons.live_tv_outlined,
size: 15,
),
'label': '娱乐',
'type': RandType.entertainment,
'page': const ZonePage(rid: 5),
},
{
'icon': const Icon(
Icons.live_tv_outlined,
size: 15,
),
'label': '影视',
'type': RandType.film,
'page': const ZonePage(rid: 181),
}
];

View File

@ -28,7 +28,7 @@ extension SearchTypeExtension on SearchType {
String get label => ['视频', '番剧', '直播间', '用户', '专栏'][index];
}
// 搜索类型为视频、专栏及相簿
// 搜索类型为视频时
enum ArchiveFilterType {
totalrank,
click,
@ -44,3 +44,21 @@ extension ArchiveFilterTypeExtension on ArchiveFilterType {
String get description =>
['默认排序', '播放多', '新发布', '弹幕多', '收藏多', '评论多', '最多喜欢'][index];
}
// 搜索类型为专栏时
enum ArticleFilterType {
// 综合排序
totalrank,
// 最新发布
pubdate,
// 最多点击
click,
// 最多喜欢
attention,
// 最多评论
scores,
}
extension ArticleFilterTypeExtension on ArticleFilterType {
String get description => ['综合排序', '最新发布', '最多点击', '最多喜欢', '最多评论'][index];
}

View File

@ -0,0 +1,5 @@
enum VideoEpidoesType {
videoEpisode,
videoPart,
bangumiEpisode,
}

View File

@ -5,10 +5,12 @@ class DynamicsDataModel {
this.hasMore,
this.items,
this.offset,
this.total,
});
bool? hasMore;
List<DynamicItemModel>? items;
String? offset;
int? total;
DynamicsDataModel.fromJson(Map<String, dynamic> json) {
hasMore = json['has_more'];
@ -16,6 +18,7 @@ class DynamicsDataModel {
.map<DynamicItemModel>((e) => DynamicItemModel.fromJson(e))
.toList();
offset = json['offset'];
total = json['total'];
}
}
@ -414,6 +417,8 @@ class DynamicMajorModel {
this.none,
this.type,
this.courses,
this.common,
this.music,
});
DynamicArchiveModel? archive;
@ -429,6 +434,8 @@ class DynamicMajorModel {
// MAJOR_TYPE_OPUS 图文/文章
String? type;
Map? courses;
Map? common;
Map? music;
DynamicMajorModel.fromJson(Map<String, dynamic> json) {
archive = json['archive'] != null
@ -452,6 +459,8 @@ class DynamicMajorModel {
json['none'] != null ? DynamicNoneModel.fromJson(json['none']) : null;
type = json['type'];
courses = json['courses'] ?? {};
common = json['common'] ?? {};
music = json['music'] ?? {};
}
}

View File

@ -34,7 +34,7 @@ class RecVideoItemAppModel {
String? title;
int? isFollowed;
RcmdOwner? owner;
RcmdReason? rcmdReason;
String? rcmdReason;
String? goto;
int? param;
String? uri;
@ -62,24 +62,19 @@ class RecVideoItemAppModel {
duration =
json['player_args'] != null ? json['player_args']['duration'] : -1;
//duration = json['cover_right_text'];
title = json['title'];
title = json['title'] ?? '获取标题失败';
owner = RcmdOwner.fromJson(json);
rcmdReason = json['rcmd_reason_style'] != null
? RcmdReason.fromJson(json['rcmd_reason_style'])
: null;
rcmdReason = json['bottom_rcmd_reason'] ?? json['top_rcmd_reason'];
// 由于app端api并不会直接返回与owner的关注状态
// 所以借用推荐原因是否为“已关注”、“新关注”等判别关注状态从而与web端接口等效
isFollowed = rcmdReason != null &&
rcmdReason!.content != null &&
rcmdReason!.content!.contains('关注')
? 1
: 0;
RegExp regex = RegExp(r'已关注|新关注');
isFollowed = regex.hasMatch(rcmdReason ?? '') ? 1 : 0;
// 如果是就无需再显示推荐原因交由view统一处理即可
if (isFollowed == 1) {
rcmdReason = null;
}
goto = json['goto'];
param = int.parse(json['param']);
param = int.parse(json['param'] ?? '-1');
uri = json['uri'];
talkBack = json['talk_back'];

127
lib/models/live/follow.dart Normal file
View File

@ -0,0 +1,127 @@
class LiveFollowingModel {
int? count;
List<LiveFollowingItemModel>? list;
int? liveCount;
int? neverLivedCount;
List? neverLivedFaces;
int? pageSize;
String? title;
int? totalPage;
LiveFollowingModel({
this.count,
this.list,
this.liveCount,
this.neverLivedCount,
this.neverLivedFaces,
this.pageSize,
this.title,
this.totalPage,
});
LiveFollowingModel.fromJson(Map<String, dynamic> json) {
count = json['count'];
if (json['list'] != null) {
list = <LiveFollowingItemModel>[];
json['list'].forEach((v) {
list!.add(LiveFollowingItemModel.fromJson(v));
});
}
liveCount = json['live_count'];
neverLivedCount = json['never_lived_count'];
if (json['never_lived_faces'] != null) {
neverLivedFaces = <dynamic>[];
json['never_lived_faces'].forEach((v) {
neverLivedFaces!.add(v);
});
}
pageSize = json['pageSize'];
title = json['title'];
totalPage = json['totalPage'];
}
}
class LiveFollowingItemModel {
int? roomId;
int? uid;
String? uname;
String? title;
String? face;
int? liveStatus;
int? recordNum;
String? recentRecordId;
int? isAttention;
int? clipNum;
int? fansNum;
String? areaName;
String? areaValue;
String? tags;
String? recentRecordIdV2;
int? recordNumV2;
int? recordLiveTime;
String? areaNameV2;
String? roomNews;
String? watchIcon;
String? textSmall;
String? cover;
String? pic;
int? parentAreaId;
int? areaId;
LiveFollowingItemModel({
this.roomId,
this.uid,
this.uname,
this.title,
this.face,
this.liveStatus,
this.recordNum,
this.recentRecordId,
this.isAttention,
this.clipNum,
this.fansNum,
this.areaName,
this.areaValue,
this.tags,
this.recentRecordIdV2,
this.recordNumV2,
this.recordLiveTime,
this.areaNameV2,
this.roomNews,
this.watchIcon,
this.textSmall,
this.cover,
this.pic,
this.parentAreaId,
this.areaId,
});
LiveFollowingItemModel.fromJson(Map<String, dynamic> json) {
roomId = json['roomid'];
uid = json['uid'];
uname = json['uname'];
title = json['title'];
face = json['face'];
liveStatus = json['live_status'];
recordNum = json['record_num'];
recentRecordId = json['recent_record_id'];
isAttention = json['is_attention'];
clipNum = json['clipnum'];
fansNum = json['fans_num'];
areaName =
json['area_name'] == '' ? json['area_name_v2'] : json['area_name'];
areaValue = json['area_value'];
tags = json['tags'];
recentRecordIdV2 = json['recent_record_id_v2'];
recordNumV2 = json['record_num_v2'];
recordLiveTime = json['record_live_time'];
areaNameV2 = json['area_name_v2'];
roomNews = json['room_news'];
watchIcon = json['watch_icon'];
textSmall = json['text_small'];
cover = json['room_cover'];
pic = json['room_cover'];
parentAreaId = json['parent_area_id'];
areaId = json['area_id'];
}
}

View File

@ -0,0 +1,101 @@
class LiveMessageModel {
// 消息类型
final LiveMessageType type;
// 用户名
final String userName;
// 信息
final String? message;
// 数据
final dynamic data;
final String? face;
final int? uid;
final Map<String, dynamic>? emots;
// 颜色
final LiveMessageColor color;
LiveMessageModel({
required this.type,
required this.userName,
required this.message,
required this.color,
this.data,
this.face,
this.uid,
this.emots,
});
}
class LiveSuperChatMessage {
final String backgroundBottomColor;
final String backgroundColor;
final DateTime endTime;
final String face;
final String message;
final String price;
final DateTime startTime;
final String userName;
LiveSuperChatMessage({
required this.backgroundBottomColor,
required this.backgroundColor,
required this.endTime,
required this.face,
required this.message,
required this.price,
required this.startTime,
required this.userName,
});
}
enum LiveMessageType {
// 普通留言
chat,
// 醒目留言
superChat,
//
online,
// 加入
join,
// 关注
follow,
}
class LiveMessageColor {
final int r, g, b;
LiveMessageColor(this.r, this.g, this.b);
static LiveMessageColor get white => LiveMessageColor(255, 255, 255);
static LiveMessageColor numberToColor(int intColor) {
var obj = intColor.toRadixString(16);
LiveMessageColor color = LiveMessageColor.white;
if (obj.length == 4) {
obj = "00$obj";
}
if (obj.length == 6) {
var R = int.parse(obj.substring(0, 2), radix: 16);
var G = int.parse(obj.substring(2, 4), radix: 16);
var B = int.parse(obj.substring(4, 6), radix: 16);
color = LiveMessageColor(R, G, B);
}
if (obj.length == 8) {
var R = int.parse(obj.substring(2, 4), radix: 16);
var G = int.parse(obj.substring(4, 6), radix: 16);
var B = int.parse(obj.substring(6, 8), radix: 16);
//var A = int.parse(obj.substring(0, 2), radix: 16);
color = LiveMessageColor(R, G, B);
}
return color;
}
@override
String toString() {
return "#${r.toRadixString(16).padLeft(2, '0')}${g.toRadixString(16).padLeft(2, '0')}${b.toRadixString(16).padLeft(2, '0')}";
}
}

View File

@ -0,0 +1,43 @@
enum LiveQuality {
dolby,
super4K,
origin,
bluRay,
superHD,
smooth,
flunt,
}
extension LiveQualityCode on LiveQuality {
static final List<int> _codeList = [
30000,
20000,
10000,
400,
250,
150,
80,
];
int get code => _codeList[index];
static LiveQuality? fromCode(int code) {
final index = _codeList.indexOf(code);
if (index != -1) {
return LiveQuality.values[index];
}
return null;
}
}
extension VideoQualityDesc on LiveQuality {
static final List<String> _descList = [
'杜比',
'4K',
'原画',
'蓝光',
'超清',
'高清',
'流畅',
];
get description => _descList[index];
}

View File

@ -1,11 +1,13 @@
class RoomInfoModel {
RoomInfoModel({
this.roomId,
this.isPortrait,
this.liveStatus,
this.liveTime,
this.playurlInfo,
});
int? roomId;
bool? isPortrait;
int? liveStatus;
int? liveTime;
PlayurlInfo? playurlInfo;
@ -13,6 +15,7 @@ class RoomInfoModel {
RoomInfoModel.fromJson(Map<String, dynamic> json) {
roomId = json['room_id'];
liveStatus = json['live_status'];
isPortrait = json['is_portrait'];
liveTime = json['live_time'];
playurlInfo = PlayurlInfo.fromJson(json['playurl_info']);
}

View File

@ -0,0 +1,46 @@
class MemberArticleDataModel {
MemberArticleDataModel({
this.hasMore,
this.items,
this.offset,
this.updateNum,
});
bool? hasMore;
List<MemberArticleItemModel>? items;
String? offset;
int? updateNum;
MemberArticleDataModel.fromJson(Map<String, dynamic> json) {
hasMore = json['has_more'];
items = json['items']
.map<MemberArticleItemModel>((e) => MemberArticleItemModel.fromJson(e))
.toList();
offset = json['offset'];
updateNum = json['update_num'];
}
}
class MemberArticleItemModel {
MemberArticleItemModel({
this.content,
this.cover,
this.jumpUrl,
this.opusId,
this.stat,
});
String? content;
Map? cover;
String? jumpUrl;
String? opusId;
Map? stat;
MemberArticleItemModel.fromJson(Map<String, dynamic> json) {
content = json['content'];
cover = json['cover'];
jumpUrl = json['jump_url'];
opusId = json['opus_id'];
stat = json['stat'];
}
}

View File

@ -8,6 +8,7 @@ class MemberInfoModel {
this.level,
this.isFollowed,
this.topPhoto,
this.silence,
this.official,
this.vip,
this.liveRoom,
@ -21,6 +22,7 @@ class MemberInfoModel {
int? level;
bool? isFollowed;
String? topPhoto;
int? silence;
Map? official;
Vip? vip;
LiveRoom? liveRoom;
@ -34,6 +36,7 @@ class MemberInfoModel {
level = json['level'];
isFollowed = json['is_followed'];
topPhoto = json['top_photo'];
silence = json['silence'] ?? 0;
official = json['official'];
vip = Vip.fromJson(json['vip']);
liveRoom =
@ -47,18 +50,23 @@ class Vip {
this.status,
this.dueDate,
this.label,
this.nicknameColor,
});
int? type;
int? status;
int? dueDate;
Map? label;
int? nicknameColor;
Vip.fromJson(Map<String, dynamic> json) {
type = json['type'];
status = json['status'];
dueDate = json['due_date'];
label = json['label'];
nicknameColor = json['nickname_color'] == ''
? null
: int.parse("0xFF${json['nickname_color'].replaceAll('#', '')}");
}
}

210
lib/models/member/like.dart Normal file
View File

@ -0,0 +1,210 @@
class MemberLikeDataModel {
MemberLikeDataModel({
this.aid,
this.videos,
this.tid,
this.tname,
this.pic,
this.title,
this.pubdate,
this.ctime,
this.desc,
this.state,
this.duration,
this.redirectUrl,
this.rights,
this.owner,
this.stat,
this.dimension,
this.cover43,
this.bvid,
this.interVideo,
this.resourceType,
this.subtitle,
this.enableVt,
});
final int? aid;
final int? videos;
final int? tid;
final String? tname;
final String? pic;
final String? title;
final int? pubdate;
final int? ctime;
final String? desc;
final int? state;
final int? duration;
final String? redirectUrl;
final Rights? rights;
final Owner? owner;
final Stat? stat;
final Dimension? dimension;
final String? cover43;
final String? bvid;
final bool? interVideo;
final String? resourceType;
final String? subtitle;
final int? enableVt;
factory MemberLikeDataModel.fromJson(Map<String, dynamic> json) =>
MemberLikeDataModel(
aid: json["aid"],
videos: json["videos"],
tid: json["tid"],
tname: json["tname"],
pic: json["pic"],
title: json["title"],
pubdate: json["pubdate"],
ctime: json["ctime"],
desc: json["desc"],
state: json["state"],
duration: json["duration"],
redirectUrl: json["redirect_url"],
rights: Rights.fromJson(json["rights"]),
owner: Owner.fromJson(json["owner"]),
stat: Stat.fromJson(json["stat"]),
dimension: Dimension.fromJson(json["dimension"]),
cover43: json["cover43"],
bvid: json["bvid"],
interVideo: json["inter_video"],
resourceType: json["resource_type"],
subtitle: json["subtitle"],
enableVt: json["enable_vt"],
);
}
class Dimension {
Dimension({
required this.width,
required this.height,
required this.rotate,
});
final int width;
final int height;
final int rotate;
factory Dimension.fromJson(Map<String, dynamic> json) => Dimension(
width: json["width"],
height: json["height"],
rotate: json["rotate"],
);
}
class Owner {
Owner({
required this.mid,
required this.name,
required this.face,
});
final int mid;
final String name;
final String face;
factory Owner.fromJson(Map<String, dynamic> json) => Owner(
mid: json["mid"],
name: json["name"],
face: json["face"],
);
}
class Rights {
Rights({
required this.bp,
required this.elec,
required this.download,
required this.movie,
required this.pay,
required this.hd5,
required this.noReprint,
required this.autoplay,
required this.ugcPay,
required this.isCooperation,
required this.ugcPayPreview,
required this.noBackground,
required this.arcPay,
required this.payFreeWatch,
});
final int bp;
final int elec;
final int download;
final int movie;
final int pay;
final int hd5;
final int noReprint;
final int autoplay;
final int ugcPay;
final int isCooperation;
final int ugcPayPreview;
final int noBackground;
final int arcPay;
final int payFreeWatch;
factory Rights.fromJson(Map<String, dynamic> json) => Rights(
bp: json["bp"],
elec: json["elec"],
download: json["download"],
movie: json["movie"],
pay: json["pay"],
hd5: json["hd5"],
noReprint: json["no_reprint"],
autoplay: json["autoplay"],
ugcPay: json["ugc_pay"],
isCooperation: json["is_cooperation"],
ugcPayPreview: json["ugc_pay_preview"],
noBackground: json["no_background"],
arcPay: json["arc_pay"],
payFreeWatch: json["pay_free_watch"],
);
}
class Stat {
Stat({
required this.aid,
required this.view,
required this.danmaku,
required this.reply,
required this.favorite,
required this.coin,
required this.share,
required this.nowRank,
required this.hisRank,
required this.like,
required this.dislike,
required this.vt,
required this.vv,
});
final int aid;
final int view;
final int danmaku;
final int reply;
final int favorite;
final int coin;
final int share;
final int nowRank;
final int hisRank;
final int like;
final int dislike;
final int vt;
final int vv;
factory Stat.fromJson(Map<String, dynamic> json) => Stat(
aid: json["aid"],
view: json["view"],
danmaku: json["danmaku"],
reply: json["reply"],
favorite: json["favorite"],
coin: json["coin"],
share: json["share"],
nowRank: json["now_rank"],
hisRank: json["his_rank"],
like: json["like"],
dislike: json["dislike"],
vt: json["vt"],
vv: json["vv"],
);
}

View File

@ -2,18 +2,32 @@ class MemberSeasonsDataModel {
MemberSeasonsDataModel({
this.page,
this.seasonsList,
this.seriesList,
});
Map? page;
List<MemberSeasonsList>? seasonsList;
List<MemberArchiveItem>? seriesList;
MemberSeasonsDataModel.fromJson(Map<String, dynamic> json) {
page = json['page'];
seasonsList = json['seasons_list'] != null
var tempList1 = json['seasons_list'] != null
? json['seasons_list']
.map<MemberSeasonsList>((e) => MemberSeasonsList.fromJson(e))
.toList()
: [];
var tempList2 = json['series_list'] != null
? json['series_list']
.map<MemberSeasonsList>((e) => MemberSeasonsList.fromJson(e))
.toList()
: [];
seriesList = json['archives'] != null
? json['archives']
.map<MemberArchiveItem>((e) => MemberArchiveItem.fromJson(e))
.toList()
: [];
seasonsList = [...tempList1, ...tempList2];
}
}
@ -86,6 +100,8 @@ class MamberMeta {
this.ptime,
this.seasonId,
this.total,
this.seriesId,
this.category,
});
String? cover;
@ -95,6 +111,8 @@ class MamberMeta {
int? ptime;
int? seasonId;
int? total;
int? seriesId;
int? category;
MamberMeta.fromJson(Map<String, dynamic> json) {
cover = json['cover'];
@ -104,5 +122,7 @@ class MamberMeta {
ptime = json['ptime'];
seasonId = json['season_id'];
total = json['total'];
seriesId = json['series_id'];
category = json['category'];
}
}

View File

@ -23,6 +23,7 @@ class HotVideoItemModel {
this.dimension,
this.shortLinkV2,
this.firstFrame,
this.cover,
this.pubLocation,
this.seasontype,
this.isOgv,
@ -50,6 +51,7 @@ class HotVideoItemModel {
Dimension? dimension;
String? shortLinkV2;
String? firstFrame;
String? cover;
String? pubLocation;
int? seasontype;
bool? isOgv;
@ -77,6 +79,7 @@ class HotVideoItemModel {
dimension = Dimension.fromMap(json['dimension']);
shortLinkV2 = json["short_link_v2"];
firstFrame = json["first_frame"];
cover = json["first_frame"];
pubLocation = json["pub_location"];
seasontype = json["seasontype"];
isOgv = json["isOgv"];

View File

@ -1,19 +1,12 @@
import 'package:hive/hive.dart';
part 'model_owner.g.dart';
@HiveType(typeId: 3)
class Owner {
Owner({
this.mid,
this.name,
this.face,
});
@HiveField(0)
int? mid;
@HiveField(1)
String? name;
@HiveField(2)
String? face;
Owner.fromJson(Map<String, dynamic> json) {

View File

@ -1,47 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'model_owner.dart';
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class OwnerAdapter extends TypeAdapter<Owner> {
@override
final int typeId = 3;
@override
Owner read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return Owner(
mid: fields[0] as int?,
name: fields[1] as String?,
face: fields[2] as String?,
);
}
@override
void write(BinaryWriter writer, Owner obj) {
writer
..writeByte(3)
..writeByte(0)
..write(obj.mid)
..writeByte(1)
..write(obj.name)
..writeByte(2)
..write(obj.face);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is OwnerAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}

View File

@ -1,9 +1,5 @@
import './model_owner.dart';
import 'package:hive/hive.dart';
part 'model_rec_video_item.g.dart';
@HiveType(typeId: 0)
class RecVideoItemModel {
RecVideoItemModel({
this.id,
@ -21,32 +17,19 @@ class RecVideoItemModel {
this.rcmdReason,
});
@HiveField(0)
int? id = -1;
@HiveField(1)
String? bvid = '';
@HiveField(2)
int? cid = -1;
@HiveField(3)
String? goto = '';
@HiveField(4)
String? uri = '';
@HiveField(5)
String? pic = '';
@HiveField(6)
String? title = '';
@HiveField(7)
int? duration = -1;
@HiveField(8)
int? pubdate = -1;
@HiveField(9)
Owner? owner;
@HiveField(10)
Stat? stat;
@HiveField(11)
int? isFollowed;
@HiveField(12)
RcmdReason? rcmdReason;
String? rcmdReason;
RecVideoItemModel.fromJson(Map<String, dynamic> json) {
id = json["id"];
@ -61,26 +44,20 @@ class RecVideoItemModel {
owner = Owner.fromJson(json["owner"]);
stat = Stat.fromJson(json["stat"]);
isFollowed = json["is_followed"] ?? 0;
rcmdReason = json["rcmd_reason"] != null
? RcmdReason.fromJson(json["rcmd_reason"])
: RcmdReason(content: '');
rcmdReason = json["rcmd_reason"]?['content'];
}
}
@HiveType(typeId: 1)
class Stat {
Stat({
this.view,
this.like,
this.danmu,
});
@HiveField(0)
int? view;
@HiveField(1)
int? like;
@HiveField(2)
int? danmu;
int? view;
int? like;
int? danmu;
Stat.fromJson(Map<String, dynamic> json) {
// 无需在model中转换以保留原始数据在view层处理即可
view = json["view"];
@ -88,20 +65,3 @@ class Stat {
danmu = json['danmaku'];
}
}
@HiveType(typeId: 2)
class RcmdReason {
RcmdReason({
this.reasonType,
this.content,
});
@HiveField(0)
int? reasonType;
@HiveField(1)
String? content = '';
RcmdReason.fromJson(Map<String, dynamic> json) {
reasonType = json["reason_type"];
content = json["content"] ?? '';
}
}

View File

@ -1,154 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'model_rec_video_item.dart';
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class RecVideoItemModelAdapter extends TypeAdapter<RecVideoItemModel> {
@override
final int typeId = 0;
@override
RecVideoItemModel read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return RecVideoItemModel(
id: fields[0] as int?,
bvid: fields[1] as String?,
cid: fields[2] as int?,
goto: fields[3] as String?,
uri: fields[4] as String?,
pic: fields[5] as String?,
title: fields[6] as String?,
duration: fields[7] as int?,
pubdate: fields[8] as int?,
owner: fields[9] as Owner?,
stat: fields[10] as Stat?,
isFollowed: fields[11] as int?,
rcmdReason: fields[12] as RcmdReason?,
);
}
@override
void write(BinaryWriter writer, RecVideoItemModel obj) {
writer
..writeByte(13)
..writeByte(0)
..write(obj.id)
..writeByte(1)
..write(obj.bvid)
..writeByte(2)
..write(obj.cid)
..writeByte(3)
..write(obj.goto)
..writeByte(4)
..write(obj.uri)
..writeByte(5)
..write(obj.pic)
..writeByte(6)
..write(obj.title)
..writeByte(7)
..write(obj.duration)
..writeByte(8)
..write(obj.pubdate)
..writeByte(9)
..write(obj.owner)
..writeByte(10)
..write(obj.stat)
..writeByte(11)
..write(obj.isFollowed)
..writeByte(12)
..write(obj.rcmdReason);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is RecVideoItemModelAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}
class StatAdapter extends TypeAdapter<Stat> {
@override
final int typeId = 1;
@override
Stat read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return Stat(
view: fields[0] as int?,
like: fields[1] as int?,
danmu: fields[2] as int?,
);
}
@override
void write(BinaryWriter writer, Stat obj) {
writer
..writeByte(3)
..writeByte(0)
..write(obj.view)
..writeByte(1)
..write(obj.like)
..writeByte(2)
..write(obj.danmu);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is StatAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}
class RcmdReasonAdapter extends TypeAdapter<RcmdReason> {
@override
final int typeId = 2;
@override
RcmdReason read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return RcmdReason(
reasonType: fields[0] as int?,
content: fields[1] as String?,
);
}
@override
void write(BinaryWriter writer, RcmdReason obj) {
writer
..writeByte(2)
..writeByte(0)
..write(obj.reasonType)
..writeByte(1)
..write(obj.content);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is RcmdReasonAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}

140
lib/models/msg/at.dart Normal file
View File

@ -0,0 +1,140 @@
class MessageAtModel {
Cursor? cursor;
List<MessageAtItems>? items;
MessageAtModel({this.cursor, this.items});
MessageAtModel.fromJson(Map<String, dynamic> json) {
cursor = json['cursor'] != null ? Cursor.fromJson(json['cursor']) : null;
if (json['items'] != null) {
items = <MessageAtItems>[];
json['items'].forEach((v) {
items!.add(MessageAtItems.fromJson(v));
});
}
}
}
class Cursor {
Cursor({
this.id,
this.isEnd,
this.time,
});
int? id;
bool? isEnd;
int? time;
Cursor.fromJson(Map<String, dynamic> json) {
id = json['id'];
isEnd = json['isEnd'];
time = json['time'];
}
}
class MessageAtItems {
int? id;
int? atTime;
User? user;
MessageAtItem? item;
MessageAtItems({this.id, this.atTime, this.user, this.item});
MessageAtItems.fromJson(Map<String, dynamic> json) {
id = json['id'];
atTime = json['at_time'];
user = json['user'] != null ? User.fromJson(json['user']) : null;
item = json['item'] != null ? MessageAtItem.fromJson(json['item']) : null;
}
}
class MessageAtItem {
String? type;
String? business;
int? businessId;
String? title;
String? image;
String? uri;
int? subjectId;
int? rootId;
int? targetId;
int? sourceId;
String? sourceContent;
String? nativeUri;
List<User>? atDetails;
List<dynamic>? topicDetails;
bool? hideReplyButton;
MessageAtItem({
this.type,
this.business,
this.businessId,
this.title,
this.image,
this.uri,
this.subjectId,
this.rootId,
this.targetId,
this.sourceId,
this.sourceContent,
this.nativeUri,
this.atDetails,
this.topicDetails,
this.hideReplyButton,
});
MessageAtItem.fromJson(Map<String, dynamic> json) {
type = json['type'];
business = json['business'];
businessId = json['business_id'];
title = json['title'];
image = json['image'];
uri = json['uri'];
subjectId = json['subject_id'];
rootId = json['root_id'];
targetId = json['target_id'];
sourceId = json['source_id'];
sourceContent = json['source_content'];
nativeUri = json['native_uri'];
if (json['at_details'] != null) {
atDetails = <User>[];
json['at_details'].forEach((v) {
atDetails!.add(User.fromJson(v));
});
}
if (json['topic_details'] != null) {
topicDetails = <dynamic>[];
json['topic_details'].forEach((v) {
topicDetails!.add(v);
});
}
hideReplyButton = json['hide_reply_button'];
}
}
class User {
int? mid;
int? fans;
String? nickname;
String? avatar;
String? midLink;
bool? follow;
User(
{this.mid,
this.fans,
this.nickname,
this.avatar,
this.midLink,
this.follow});
User.fromJson(Map<String, dynamic> json) {
mid = json['mid'];
fans = json['fans'];
nickname = json['nickname'];
avatar = json['avatar'];
midLink = json['mid_link'];
follow = json['follow'];
}
}

Some files were not shown because too many files have changed in this diff Show More