Skip to content

Commit

Permalink
fix(new version)
Browse files Browse the repository at this point in the history
  • Loading branch information
liuchuancong committed Jul 25, 2024
1 parent e0f4fee commit 9708a4c
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 44 deletions.
6 changes: 3 additions & 3 deletions assets/version.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "1.7.2",
"version_num": 10506,
"version_desc": "-Fix:修复抖音直播弹幕",
"version": "1.7.3",
"version_num": 10507,
"version_desc": "-Fix:修复斗鱼分类.\n -Add: Tv添加MPV播放器,VLC播放器. \n -Intro: 如果无法播放请切换播放器后重启App重试即可。",
"prerelease":false,
"download_url": "https://github.com/liuchuancong/pure_live/releases"
}
2 changes: 1 addition & 1 deletion inno.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "纯粹直播"
#define MyAppVersion "1.0.0.63"
#define MyAppVersion "1.0.0.64"
#define MyAppPublisher "My Company, Inc."
#define MyAppExeName "pure_live.exe"
#define MyAppAssocName MyAppName + " File"
Expand Down
6 changes: 3 additions & 3 deletions inno1.iss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "����ֱ��"
#define MyAppVersion "1.0.0.63"
#define MyAppName "纯粹直播"
#define MyAppVersion "1.0.0.64"
#define MyAppPublisher "My Company, Inc."
#define MyAppExeName "pure_live.exe"
#define MyAppAssocName MyAppName + " File"
Expand All @@ -23,7 +23,7 @@ DisableProgramGroupPage=yes
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
OutputDir=E:\project\pure_live_release
OutputBaseFilename=����ֱ��
OutputBaseFilename=纯粹直播
Compression=lzma
SolidCompression=yes
WizardStyle=modern
Expand Down
2 changes: 1 addition & 1 deletion lib/common/utils/version_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'dart:convert';
import 'package:http/http.dart' as http;

class VersionUtil {
static const String version = '1.7.2';
static const String version = '1.7.3';
static const String projectUrl = 'https://github.com/liuchuancong/pure_live';
static const String releaseUrl = 'https://api.github.com/repos/liuchuancong/pure_live/releases';
static const String issuesUrl = 'https://github.com/liuchuancong/pure_live/issues';
Expand Down
25 changes: 16 additions & 9 deletions lib/core/site/douyu_site.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,20 @@ class DouyuSite implements LiveSite {
@override
Future<List<LiveCategory>> getCategores(int page, int pageSize) async {
List<LiveCategory> categories = [
LiveCategory(id: "PCgame", name: "网游竞技", children: []),
LiveCategory(id: "djry", name: "单机热游", children: []),
LiveCategory(id: "syxx", name: "手游休闲", children: []),
LiveCategory(id: "yl", name: "娱乐天地", children: []),
LiveCategory(id: "yz", name: "颜值", children: []),
LiveCategory(id: "kjwh", name: "科技文化", children: []),
LiveCategory(id: "yp", name: "语言互动", children: []),
LiveCategory(id: "1", name: "推荐分类", children: []),
LiveCategory(id: "3", name: "网游竞技", children: []),
LiveCategory(id: "4", name: "单机热游", children: []),
LiveCategory(id: "5", name: "手游休闲", children: []),
LiveCategory(id: "6", name: "FPS射击", children: []),
LiveCategory(id: "7", name: "卡牌棋牌", children: []),
LiveCategory(id: "8", name: "体育游戏", children: []),
LiveCategory(id: "9", name: "经典怀旧", children: []),
LiveCategory(id: "10", name: "娱乐天地", children: []),
LiveCategory(id: "11", name: "颜值", children: []),
LiveCategory(id: "12", name: "科技文化", children: []),
LiveCategory(id: "13", name: "语音互动", children: []),
LiveCategory(id: "14", name: "语音直播", children: []),
LiveCategory(id: "15", name: "正能量", children: []),
];

for (var item in categories) {
Expand All @@ -47,8 +54,8 @@ class DouyuSite implements LiveSite {
}

Future<List<LiveArea>> getSubCategories(LiveCategory liveCategory) async {
var result = await HttpClient.instance.getJson("https://www.douyu.com/japi/weblist/api/getC2List",
queryParameters: {"shortName": liveCategory.id, "offset": 0, "limit": 200});
var result = await HttpClient.instance.getJson("https://www.douyu.com/japi/weblist/apinc/getC2List",
queryParameters: {"shortName": liveCategory.name, "customClassId": liveCategory.id, "offset": 0, "limit": 200});

List<LiveArea> subs = [];
for (var item in result["data"]["list"]) {
Expand Down
24 changes: 11 additions & 13 deletions lib/modules/live_play/live_play_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class LivePlayController extends StateController {
}
bool doubleExit = Get.find<SettingsService>().doubleExit.value;
if (!doubleExit) {
videoController!.destory();
disPoserPlayer();
return Future.value(true);
}
int nowExitTime = DateTime.now().millisecondsSinceEpoch;
Expand All @@ -112,21 +112,15 @@ class LivePlayController extends StateController {
SmartDialog.showToast(S.current.double_click_to_exit);
return await Future.value(false);
}
videoController!.destory();
disPoserPlayer();
return await Future.value(true);
}

@override
void onClose() {
videoController?.dispose();
liveDanmaku.stop();
super.onClose();
}

@override
void onInit() {
super.onInit();
// 发现房间ID 会变化 使用静态列表ID 对比

log('onInit', name: 'LivePlayController');
currentPlayRoom.value = room;
onInitPlayerState(firstLoad: true);
isFirstLoad.listen((p0) {
Expand Down Expand Up @@ -165,7 +159,6 @@ class LivePlayController extends StateController {
}
}
});
super.onInit();
}

void resetRoom(Site site, String roomId) async {
Expand All @@ -179,7 +172,7 @@ class LivePlayController extends StateController {
isFirstLoad.value = true;
getVideoSuccess.value = false;
loadTimeOut.value = false;
Timer(const Duration(milliseconds: 1000), () {
Timer(const Duration(milliseconds: 2000), () {
log('resetRoom', name: 'LivePlayController');
onInitPlayerState(firstLoad: true);
});
Expand Down Expand Up @@ -269,7 +262,6 @@ class LivePlayController extends StateController {
videoController = null;
liveDanmaku.stop();
success.value = false;
liveDanmaku.stop();
}

handleCurrentLineAndQuality({
Expand Down Expand Up @@ -516,4 +508,10 @@ class LivePlayController extends StateController {
await launchUrlString(webUrl, mode: LaunchMode.externalApplication);
}
}

@override
void dispose() {
disPoserPlayer();
super.dispose();
}
}
2 changes: 1 addition & 1 deletion lib/modules/live_play/live_play_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:wakelock_plus/wakelock_plus.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:pure_live/modules/live_play/live_play_controller.dart';

class LivePlayPage extends GetWidget<LivePlayController> {
class LivePlayPage extends GetView<LivePlayController> {
LivePlayPage({super.key});

final SettingsService settings = Get.find<SettingsService>();
Expand Down
16 changes: 10 additions & 6 deletions lib/modules/live_play/widgets/video_player/video_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -365,17 +365,21 @@ class VideoController with ChangeNotifier {

void refresh() {
destory();
livePlayController.onInitPlayerState(reloadDataType: ReloadDataType.refreash);
Timer(const Duration(seconds: 2), () {
livePlayController.onInitPlayerState(reloadDataType: ReloadDataType.refreash);
});
}

void changeLine({bool active = false}) async {
// 播放错误 不一定是线路问题 先切换路线解决 后面尝试通知用户切换播放器
await destory();
livePlayController.onInitPlayerState(
reloadDataType: ReloadDataType.changeLine,
line: currentLineIndex,
active: active,
);
Timer(const Duration(seconds: 2), () {
livePlayController.onInitPlayerState(
reloadDataType: ReloadDataType.changeLine,
line: currentLineIndex,
active: active,
);
});
}

destory() async {
Expand Down
1 change: 0 additions & 1 deletion lib/routes/app_pages.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ class AppPages {
GetPage(
name: RoutePath.kLivePlay,
page: () => LivePlayPage(),
preventDuplicates: true,
bindings: [LivePlayBinding()],
),
//账号设置
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.7.2
version: 1.7.3

environment:
sdk: '>=3.0.6 <4.0.0'
Expand Down Expand Up @@ -218,7 +218,7 @@ msix_config:
display_name: 纯粹直播
# publisher_display_name: puretech.com
# identity_name: com.puretech.purelive
msix_version: 1.0.0.63
msix_version: 1.0.0.64
logo_path: assets/icons/icon.png
# capabilities: internetClient
certificate_path: assets/keystore/CERTIFICATE.pfx
Expand Down
8 changes: 4 additions & 4 deletions pure_live_rename.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
target_files = ['app-arm64-v8a-release.apk','app-armeabi-v7a-release.apk','app-release.apk','pure_live.msix']
build_path = []
buildcellctions = []
target_win_app_name = 'E:/project/pure_live/build/windows/x64/runner/Release/'
target_apk_dir_name = 'E:/project/pure_live/build/app/outputs/flutter-apk/'
# target_win_app_name = 'D:/flutter/pure_live/build/windows/x64/runner/Release/'
# target_apk_dir_name = 'D:/flutter/pure_live/build/app/outputs/flutter-apk/'
# target_win_app_name = 'E:/project/pure_live/build/windows/x64/runner/Release/'
# target_apk_dir_name = 'E:/project/pure_live/build/app/outputs/flutter-apk/'
target_win_app_name = 'D:/flutter/pure_live/build/windows/x64/runner/Release/'
target_apk_dir_name = 'D:/flutter/pure_live/build/app/outputs/flutter-apk/'
files = []
dirArr = ['安卓_手机高版本.apk','安卓_手机低版本.apk','安卓_手机All.apk','win10以上系统下载.msix']
def traversal_dirs(path):
Expand Down

0 comments on commit 9708a4c

Please sign in to comment.