基于自定义规则的番剧采集APP,支持流媒体在线观看,支持弹幕,支持实时超分辨率。
chore: modify some icons in video page (#778)
ErBW_s74d7bd3d8bfa
diff --git a/assets/images/danmaku_off.svg b/assets/images/danmaku_off.svgnew file mode 100644index 00000000..e5ec3b75--- /dev/null+++ b/assets/images/danmaku_off.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" data-pointer="none" viewBox="0 0 24 24"><path fill="#FFFFFF" 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.813a179.14 179.14 0 0 0-6.064-.131c-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.975 99.78 99.78 0 0 1-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"/></svg>\ No newline at end of filediff --git a/assets/images/danmaku_setting.svg b/assets/images/danmaku_setting.svgnew file mode 100644index 00000000..d1daeaef--- /dev/null+++ b/assets/images/danmaku_setting.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" data-pointer="none" viewBox="0 0 24 24"><path fill="#FFFFFF" fill-rule="evenodd" d="m15.645 4.881 1.06-1.473a.998.998 0 1 0-1.622-1.166L13.22 4.835a110.67 110.67 0 0 0-1.1-.007h-.131c-.47 0-.975.004-1.515.012L8.783 2.3A.998.998 0 0 0 7.12 3.408l.988 1.484c-.688.019-1.418.042-2.188.069a4.013 4.013 0 0 0-3.83 3.44c-.165 1.15-.245 2.545-.245 4.185 0 1.965.115 3.67.35 5.116a4.012 4.012 0 0 0 3.763 3.363 99.78 99.78 0 0 0 5.513.141.988.988 0 0 0 0-1.975 97.58 97.58 0 0 1-5.416-.139 2.037 2.037 0 0 1-1.91-1.708c-.216-1.324-.325-2.924-.325-4.798 0-1.563.076-2.864.225-3.904.14-.977.96-1.713 1.945-1.747 2.444-.087 4.465-.13 6.063-.131 1.598 0 3.62.044 6.064.13.96.034 1.71.81 1.855 1.814.075.524.113 1.962.141 3.065v.002c.005.183.01.07.014-.038.004-.096.008-.189.011-.081a.987.987 0 1 0 1.974-.069c-.004-.105-.007-.009-.011.09a2.175 2.175 0 0 1-.007.135l-.002.01a.574.574 0 0 1-.005-.091v-.027c-.03-1.118-.073-2.663-.16-3.276-.273-1.906-1.783-3.438-3.74-3.507-.905-.032-1.752-.058-2.543-.079Zm-3.113 4.703h-1.307v4.643h2.2v.04l.651-1.234c.113-.215.281-.389.482-.509v-.11h.235c.137-.049.283-.074.433-.074h1.553V9.584h-1.264a8.5 8.5 0 0 0 .741-1.405l-1.078-.381c-.24.631-.501 1.23-.806 1.786h-1.503l.686-.305a8.613 8.613 0 0 0-.806-1.394l-1.034.348c.294.392.566.839.817 1.35Zm-1.7 5.502h2.16l-.564 1.068h-1.595v-1.068Zm-2.498-1.863.152-1.561h1.96V8.289H7.277v.969h2.048v1.435h-1.84l-.306 3.51h2.254c0 1.155-.043 1.906-.12 2.255-.076.348-.38.523-.925.523-.305 0-.61-.022-.893-.055l.294 1.056.061.005c.282.02.546.039.81.039.991-.065 1.547-.414 1.677-1.046.11-.631.175-1.883.175-3.757H8.334Zm5.09-.8v.85h-1.188v-.85h1.187Zm-1.188-.955h1.187v-.893h-1.187v.893Zm2.322.007v-.893h1.241v.893h-1.241Zm.528 2.757a1.26 1.26 0 0 1 1.087-.627l4.003-.009a1.26 1.26 0 0 1 1.094.63l1.721 2.982c.226.39.225.872-.001 1.263l-1.743 3a1.26 1.26 0 0 1-1.086.628l-4.003.009a1.26 1.26 0 0 1-1.094-.63l-1.722-2.982a1.26 1.26 0 0 1 .002-1.263l1.742-3Zm1.967.858a1.26 1.26 0 0 0-1.08.614l-.903 1.513a1.26 1.26 0 0 0-.002 1.289l.885 1.492c.227.384.64.62 1.086.618l2.192-.005a1.26 1.26 0 0 0 1.08-.615l.904-1.518a1.26 1.26 0 0 0 .001-1.288l-.884-1.489a1.26 1.26 0 0 0-1.086-.616l-2.193.005Zm2.517 2.76a1.4 1.4 0 1 1-2.8 0 1.4 1.4 0 0 1 2.8 0Z" clip-rule="evenodd"/></svg>\ No newline at end of filediff --git a/assets/images/live.png b/assets/images/live.pngdeleted file mode 100644index 2547e137..00000000Binary files a/assets/images/live.png and /dev/null differdiff --git a/assets/images/playing.gif b/assets/images/playing.gifnew file mode 100644index 00000000..20e7d6ceBinary files /dev/null and b/assets/images/playing.gif differdiff --git a/lib/pages/player/player_item_panel.dart b/lib/pages/player/player_item_panel.dartindex 3ed9b5ef..714d95db 100644--- a/lib/pages/player/player_item_panel.dart+++ b/lib/pages/player/player_item_panel.dart@@ -1,6 +1,7 @@import 'package:flutter/material.dart';import 'package:flutter_mobx/flutter_mobx.dart';import 'package:flutter_modular/flutter_modular.dart';+import 'package:flutter_svg/flutter_svg.dart';import 'package:kazumi/bean/widget/embedded_native_control_area.dart';import 'package:kazumi/utils/utils.dart';import 'package:kazumi/pages/video/video_controller.dart';@@ -307,6 +308,14 @@ class _PlayerItemPanelState extends State<PlayerItemPanel> {@overrideWidget build(BuildContext context) {+ final svgString = danmakuOnSvg.replaceFirst(+ '#00AEEC',+ Theme.of(context)+ .colorScheme+ .primary+ .toARGB32()+ .toRadixString(16)+ .substring(2));return Observer(builder: (context) {return Stack(alignment: Alignment.center,@@ -830,11 +839,15 @@ class _PlayerItemPanelState extends State<PlayerItemPanel> {children: [IconButton(color: Colors.white,- icon: Icon(playerController- .danmakuOn- ? Icons.subtitles_rounded- : Icons- .subtitles_off_rounded),+ icon: playerController.danmakuOn+ ? SvgPicture.string(+ svgString,+ height: 24,+ )+ : SvgPicture.asset(+ 'assets/images/danmaku_off.svg',+ height: 24,+ ),onPressed: () {widget.handleDanmaku();},@@ -844,7 +857,6 @@ class _PlayerItemPanelState extends State<PlayerItemPanel> {: '打开弹幕(d)',),IconButton(- tooltip: '弹幕设置',onPressed: () {widget.keyboardFocus.requestFocus();@@ -877,8 +889,10 @@ class _PlayerItemPanelState extends State<PlayerItemPanel> {});},color: Colors.white,- icon: const Icon(- Icons.tune_rounded),+ icon: SvgPicture.asset(+ 'assets/images/danmaku_setting.svg',+ height: 24,+ ),),if (isSpaceEnough) danmakuTextField,],@@ -890,9 +904,15 @@ class _PlayerItemPanelState extends State<PlayerItemPanel> {if (!Utils.isDesktop()) ...[IconButton(color: Colors.white,- icon: Icon(playerController.danmakuOn- ? Icons.subtitles_rounded- : Icons.subtitles_off_rounded),+ icon: playerController.danmakuOn+ ? SvgPicture.string(+ svgString,+ height: 24,+ )+ : SvgPicture.asset(+ 'assets/images/danmaku_off.svg',+ height: 24,+ ),onPressed: () {widget.handleDanmaku();},@@ -902,7 +922,6 @@ class _PlayerItemPanelState extends State<PlayerItemPanel> {),if (playerController.danmakuOn) ...[IconButton(- tooltip: '弹幕设置',onPressed: () {showModalBottomSheet(isScrollControlled: true,@@ -928,7 +947,10 @@ class _PlayerItemPanelState extends State<PlayerItemPanel> {});},color: Colors.white,- icon: const Icon(Icons.tune_rounded),+ icon: SvgPicture.asset(+ 'assets/images/danmaku_setting.svg',+ height: 24,+ ),),Expanded(child: danmakuTextField),],diff --git a/lib/pages/player/smallest_player_item_panel.dart b/lib/pages/player/smallest_player_item_panel.dartindex 5560326c..754a7766 100644--- a/lib/pages/player/smallest_player_item_panel.dart+++ b/lib/pages/player/smallest_player_item_panel.dart@@ -1,6 +1,7 @@import 'package:flutter/material.dart';import 'package:flutter_mobx/flutter_mobx.dart';import 'package:flutter_modular/flutter_modular.dart';+import 'package:flutter_svg/svg.dart';import 'package:kazumi/utils/utils.dart';import 'package:kazumi/pages/video/video_controller.dart';import 'package:kazumi/bean/dialog/dialog_helper.dart';@@ -160,6 +161,14 @@ class _SmallestPlayerItemPanelState extends State<SmallestPlayerItemPanel> {@overrideWidget build(BuildContext context) {+ final svgString = danmakuOnSvg.replaceFirst(+ '#00AEEC',+ Theme.of(context)+ .colorScheme+ .primary+ .toARGB32()+ .toRadixString(16)+ .substring(2));return Observer(builder: (context) {return Stack(alignment: Alignment.center,@@ -369,9 +378,15 @@ class _SmallestPlayerItemPanelState extends State<SmallestPlayerItemPanel> {// 弹幕开关IconButton(color: Colors.white,- icon: Icon(playerController.danmakuOn- ? Icons.subtitles_rounded- : Icons.subtitles_off_rounded),+ icon: playerController.danmakuOn+ ? SvgPicture.string(+ svgString,+ height: 24,+ )+ : SvgPicture.asset(+ 'assets/images/danmaku_off.svg',+ height: 24,+ ),onPressed: () {widget.handleDanmaku();},@@ -534,11 +549,13 @@ class _SmallestPlayerItemPanelState extends State<SmallestPlayerItemPanel> {16: MediaQuery.of(context).size.width),clipBehavior: Clip.antiAlias,- context: context,builder: (context) {- return DanmakuSettingsSheet(- danmakuController:- playerController.danmakuController);- });+ context: context,+ builder: (context) {+ return DanmakuSettingsSheet(+ danmakuController:+ playerController.danmakuController);+ },+ );},child: const Padding(padding: EdgeInsets.fromLTRB(0, 10, 10, 10),diff --git a/lib/pages/video/video_page.dart b/lib/pages/video/video_page.dartindex df5c4d3e..76518eb8 100644--- a/lib/pages/video/video_page.dart+++ b/lib/pages/video/video_page.dart@@ -728,7 +728,7 @@ class _VideoPageState extends State<VideoPage>currentRoad ==videoPageController.currentRoad) ...<Widget>[Image.asset(- 'assets/images/live.png',+ 'assets/images/playing.gif',color: Theme.of(context).colorScheme.primary,height: 12,),diff --git a/lib/utils/constants.dart b/lib/utils/constants.dartindex a53871d6..61be8fcc 100644--- a/lib/utils/constants.dart+++ b/lib/utils/constants.dart@@ -214,3 +214,10 @@ const List<double> danAreaList = [0.75,1.0,];++const String danmakuOnSvg = '''+ <svg xmlns="http://www.w3.org/2000/svg" data-pointer="none" viewBox="0 0 24 24">+ <path fill="#FFFFFF" fill-rule="evenodd" d="M11.989 4.828c-.47 0-.975.004-1.515.012l-1.71-2.566a1.008 1.008 0 0 0-1.678 1.118l.999 1.5c-.681.018-1.403.04-2.164.068a4.013 4.013 0 0 0-3.83 3.44c-.165 1.15-.245 2.545-.245 4.185 0 1.965.115 3.67.35 5.116a4.012 4.012 0 0 0 3.763 3.363l.906.046c1.205.063 1.808.095 3.607.095a.988.988 0 0 0 0-1.975c-1.758 0-2.339-.03-3.501-.092l-.915-.047a2.037 2.037 0 0 1-1.91-1.708c-.216-1.324-.325-2.924-.325-4.798 0-1.563.076-2.864.225-3.904.14-.977.96-1.713 1.945-1.747 2.444-.087 4.465-.13 6.063-.131 1.598 0 3.62.044 6.064.13.96.034 1.71.81 1.855 1.814.075.524.113 1.962.141 3.065v.002c.01.342.017.65.025.88a.987.987 0 1 0 1.974-.068c-.008-.226-.016-.523-.025-.856v-.027c-.03-1.118-.073-2.663-.16-3.276-.273-1.906-1.783-3.438-3.74-3.507-.9-.032-1.743-.058-2.531-.078l1.05-1.46a1.008 1.008 0 0 0-1.638-1.177l-1.862 2.59c-.38-.004-.744-.007-1.088-.007h-.13Zm.521 4.775h-1.32v4.631h2.222v.847h-2.618v1.078h2.618l.003.678c.36.026.714.163 1.01.407h.11v-1.085h2.694v-1.078h-2.695v-.847H16.8v-4.63h-1.276a8.59 8.59 0 0 0 .748-1.42L15.183 7.8a14.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.294h-3.2v.98H9.33v1.43H7.472l-.308 3.453h2.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.005c.285.02.551.04.818.04 1.001-.067 1.562-.419 1.694-1.057.11-.638.176-1.903.176-3.795h-2.2Zm7.458.11v-.858h-1.254v.858h1.254Zm-2.376-.858v.858h-1.199v-.858h1.2Zm-1.199-.946h1.2v-.902h-1.2v.902Zm2.321 0v-.902h1.254v.902h-1.254Z" clip-rule="evenodd"/>+ <path fill="#00AEEC" fill-rule="evenodd" d="M22.846 14.627a1 1 0 0 0-1.412.075l-5.091 5.703-2.216-2.275-.097-.086-.008-.005a1 1 0 0 0-1.322 1.493l2.963 3.041.093.083.007.005a1 1 0 0 0 1.354-.124l5.81-6.505.08-.102.005-.008a1 1 0 0 0-.166-1.295Z" clip-rule="evenodd"/>+ </svg>+ ''';diff --git a/pubspec.lock b/pubspec.lockindex 4ccefe47..44d7aa2b 100644--- a/pubspec.lock+++ b/pubspec.lock@@ -505,6 +505,14 @@ packages:url: "https://pub.dev"source: hostedversion: "4.0.1"+ flutter_svg:+ dependency: "direct main"+ description:+ name: flutter_svg+ sha256: c200fd79c918a40c5cd50ea0877fa13f81bdaf6f0a5d3dbcc2a13e3285d6aa1b+ url: "https://pub.dev"+ source: hosted+ version: "2.0.17"flutter_test:dependency: "direct dev"description: flutter@@ -907,6 +915,14 @@ packages:url: "https://pub.dev"source: hostedversion: "1.9.1"+ path_parsing:+ dependency: transitive+ description:+ name: path_parsing+ sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca"+ url: "https://pub.dev"+ source: hosted+ version: "1.1.0"path_provider:dependency: "direct main"description:@@ -1416,6 +1432,30 @@ packages:url: "https://pub.dev"source: hostedversion: "4.5.1"+ vector_graphics:+ dependency: transitive+ description:+ name: vector_graphics+ sha256: "44cc7104ff32563122a929e4620cf3efd584194eec6d1d913eb5ba593dbcf6de"+ url: "https://pub.dev"+ source: hosted+ version: "1.1.18"+ vector_graphics_codec:+ dependency: transitive+ description:+ name: vector_graphics_codec+ sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146"+ url: "https://pub.dev"+ source: hosted+ version: "1.1.13"+ vector_graphics_compiler:+ dependency: transitive+ description:+ name: vector_graphics_compiler+ sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad"+ url: "https://pub.dev"+ source: hosted+ version: "1.1.16"vector_math:dependency: transitivedescription:diff --git a/pubspec.yaml b/pubspec.yamlindex 611673b3..323243e7 100644--- a/pubspec.yaml+++ b/pubspec.yaml@@ -81,6 +81,7 @@ dependencies:path: anyscreen_brightness_platform_interface: anysynchronized: any+ flutter_svg: ^2.0.17antlr4: ^4.13.2webview_windows:git: