Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
committed Jan 2, 2025
1 parent 0c73f12 commit e8c3842
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 224 deletions.
2 changes: 1 addition & 1 deletion package/general/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"cmake.sourceDirectory": "/home/galaxeus/Documents/galaxeus/app/general/package/general/example/linux"
"cmake.ignoreCMakeListsMissing": true
}
5 changes: 5 additions & 0 deletions package/general/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.0.38

- New Version 0.0.38


## 0.0.37

- New Version 0.0.37
Expand Down
6 changes: 3 additions & 3 deletions package/general/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ dependencies:
path: '../'
media_kit_video: '^1.2.5'
local_auth: '^2.2.0'
telegram_client: '^0.8.31'
general_lib: '^0.0.53'
general_lib_flutter: '^0.0.34'
telegram_client: '^0.8.32'
general_lib: '^0.0.54'
general_lib_flutter: '^0.0.35'
dev_dependencies:
flutter_test:
sdk: 'flutter'
Expand Down
252 changes: 71 additions & 181 deletions package/general/lib/api/api.dart

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package/general/lib/api/docs/readme/readme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ code android/app/src/main/AndroidManifest.xml
<!-- Permissions options for the `notification` group -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.USE_BIOMETRIC"/>
<!-- if you need more permission -->
Expand Down Expand Up @@ -134,7 +135,6 @@ code android/app/src/main/AndroidManifest.xml
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
<uses-permission android:name="android.permission.USE_BIOMETRIC"/>
<uses-permission android:name="android.permission.READ_SMS"/>
<uses-permission android:name="android.permission.SEND_SMS"/>
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
Expand Down
21 changes: 6 additions & 15 deletions package/general/lib/cli/cli.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,20 @@ Future<void> generalLibraryCli({
}

if (command == "init") {
await generalLibraryApi
.create(newName: ".", directoryBase: Directory.current)
.listen((event) {
await generalLibraryApi.create(newName: ".", directoryBase: Directory.current).listen((event) {
printed(event);
}).asFuture();
exit(0);
}

if (command == "setup") {
await generalLibraryApi
.setup(directoryBase: Directory.current)
.listen((event) {
await generalLibraryApi.setup(directoryBase: Directory.current).listen((event) {
printed(event);
}).asFuture();
exit(0);
}
if (command == "patch") {
await generalLibraryApi
.patch(directoryBase: Directory.current)
.listen((event) {
await generalLibraryApi.patch(directoryBase: Directory.current).listen((event) {
printed(event);
}).asFuture();
exit(0);
Expand All @@ -69,19 +63,16 @@ Future<void> generalLibraryCli({

Progress progress = logger.progress("message");
void printed(GeneralLibraryApiStatus event) {
if (event.serverUniverseApiStatusType ==
GeneralLibraryApiStatusType.progress_start) {
if (event.serverUniverseApiStatusType == GeneralLibraryApiStatusType.progress_start) {
progress.cancel();
progress = logger.progress(event.value);
return;
}
if (event.serverUniverseApiStatusType ==
GeneralLibraryApiStatusType.progress) {
if (event.serverUniverseApiStatusType == GeneralLibraryApiStatusType.progress) {
progress.update(event.value);
return;
}
if (event.serverUniverseApiStatusType ==
GeneralLibraryApiStatusType.progress_complete) {
if (event.serverUniverseApiStatusType == GeneralLibraryApiStatusType.progress_complete) {
progress.complete(event.value);

// progress.cancel();
Expand Down
30 changes: 11 additions & 19 deletions package/general/lib/core/player/player_core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,20 @@ class GeneralLibraryPlayerBase implements GeneralLibraryCore {
static List<GeneralLibraryPlayerControllerBase> players = [];

GeneralLibraryPlayerBase();

static bool _staticEnsureInitialized = false;
static void staticEnsureInitialized({
String? libmpv,
}) {
if (_staticEnsureInitialized) {
return;
}
_staticEnsureInitialized = true;
try {
MediaKit.ensureInitialized(
libmpv: libmpv,
);
} catch (e) {
_staticEnsureInitialized = false;
if (Dart.executable_type == ExecutableType.gui) {
} else {
rethrow;
Expand All @@ -64,23 +69,13 @@ class GeneralLibraryPlayerBase implements GeneralLibraryCore {
void ensureInitialized({
String? libmpv,
}) {
try {
MediaKit.ensureInitialized(
libmpv: libmpv,
);
} catch (e) {
if (Dart.executable_type == ExecutableType.gui) {
} else {
rethrow;
}
}
staticEnsureInitialized(libmpv: libmpv);
}

GeneralLibraryPlayerControllerBase createPlayer({
required String player_id,
}) {
GeneralLibraryPlayerControllerBase generalLibraryPlayerControllerBaseDart =
GeneralLibraryPlayerControllerBase(
GeneralLibraryPlayerControllerBase generalLibraryPlayerControllerBaseDart = GeneralLibraryPlayerControllerBase(
player_id: player_id,
);
players.add(
Expand All @@ -89,10 +84,8 @@ class GeneralLibraryPlayerBase implements GeneralLibraryCore {
return generalLibraryPlayerControllerBaseDart;
}

GeneralLibraryPlayerControllerBase createPlayerWithoutAdd(
{required String player_id}) {
GeneralLibraryPlayerControllerBase generalLibraryPlayerControllerBaseDart =
GeneralLibraryPlayerControllerBase(
GeneralLibraryPlayerControllerBase createPlayerWithoutAdd({required String player_id}) {
GeneralLibraryPlayerControllerBase generalLibraryPlayerControllerBaseDart = GeneralLibraryPlayerControllerBase(
player_id: player_id,
);

Expand All @@ -114,8 +107,7 @@ class GeneralLibraryPlayerBase implements GeneralLibraryCore {
return null;
}

GeneralLibraryPlayerControllerBase? getPlayerForce(
{required String player_id}) {
GeneralLibraryPlayerControllerBase? getPlayerForce({required String player_id}) {
try {
return players.singleWhere((element) => element.player_id == player_id);
} catch (e) {}
Expand Down
8 changes: 4 additions & 4 deletions package/general/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'general'
description: |
General is Library for help you integrate any package commong used like audio, video, permission, location
gamepad, local auth fingerprint, biometric, camera, and many more only use one library
version: '0.0.37'
version: '0.0.38'
homepage: 'https://github.com/azkadev/general'
repository: 'https://github.com/azkadev/general'
issue_tracker: 'https://t.me/DEVELOPER_GLOBAL_PUBLIC'
Expand All @@ -22,10 +22,10 @@ executables:
environment:
sdk: '>=3.6.0 <4.0.0'
dependencies:
general_lib: '^0.0.53'
general_lib: '^0.0.54'
media_kit_fork: '^0.0.1'
path: '^1.9.0'
io_universe: '^0.0.2'
io_universe: '^0.0.3'
mason_logger: '^0.3.1'
html: 'any'
collection: '^1.19.0'
Expand All @@ -38,7 +38,7 @@ dependencies:
flutter_tts: '^4.2.0'
permission_handler: '^11.3.1'
speech_to_text: '^7.0.0'
general_lib_flutter: '^0.0.34'
general_lib_flutter: '^0.0.35'
media_kit_video_fork: '^0.0.1'
local_auth: '^2.3.0'
wakelock_plus: '^1.2.8'
Expand Down

0 comments on commit e8c3842

Please sign in to comment.