Skip to content

Commit

Permalink
Merge branch 'v1.4.0' into translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Kara-Zor-El authored Apr 3, 2024
2 parents b50db61 + bc32124 commit e9c2ca9
Show file tree
Hide file tree
Showing 20 changed files with 135 additions and 106 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "submodules/jellyfin_api"]
path = submodules/jellyfin_api
url = https://github.com/Kara-Zor-El/jellyfin_api
[submodule "submodules/jellybook_epub_view"]
path = submodules/jellybook_epub_view
url = https://github.com/Kara-Zor-El/jellybook_epub_view
[submodule "submodules/tentacle"]
path = submodules/tentacle
url = https://github.com/TentacleOrg/Tentacle
39 changes: 20 additions & 19 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ PODS:
- Flutter
- connectivity_plus (0.0.1):
- Flutter
- FlutterMacOS
- ReachabilitySwift
- device_info_plus (0.0.1):
- Flutter
Expand All @@ -26,14 +27,14 @@ PODS:
- Flutter
- permission_handler_apple (9.3.0):
- Flutter
- ReachabilitySwift (5.0.0)
- Sentry/HybridSDK (8.20.0):
- SentryPrivate (= 8.20.0)
- ReachabilitySwift (5.2.1)
- Sentry/HybridSDK (8.21.0):
- SentryPrivate (= 8.21.0)
- sentry_flutter (0.0.1):
- Flutter
- FlutterMacOS
- Sentry/HybridSDK (= 8.20.0)
- SentryPrivate (8.20.0)
- Sentry/HybridSDK (= 8.21.0)
- SentryPrivate (8.21.0)
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
Expand All @@ -43,15 +44,15 @@ PODS:
- unrar_file (0.0.1):
- Flutter
- UnrarKit
- UnrarKit (2.9):
- UnrarKit/unrar-lib (= 2.9)
- UnrarKit/unrar-lib (2.9)
- UnrarKit (2.10):
- UnrarKit/unrar-lib (= 2.10)
- UnrarKit/unrar-lib (2.10)
- url_launcher_ios (0.0.1):
- Flutter

DEPENDENCIES:
- audioplayers_darwin (from `.symlinks/plugins/audioplayers_darwin/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_background_service_ios (from `.symlinks/plugins/flutter_background_service_ios/ios`)
Expand Down Expand Up @@ -80,7 +81,7 @@ EXTERNAL SOURCES:
audioplayers_darwin:
:path: ".symlinks/plugins/audioplayers_darwin/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:
Expand Down Expand Up @@ -116,27 +117,27 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
audioplayers_darwin: 877d9a4d06331c5c374595e46e16453ac7eafa40
connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d
connectivity_plus: e2dad488011aeb593e219360e804c43cc1af5770
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_background_service_ios: e30e0d3ee69e4cee66272d0c78eacd48c2e94aac
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
image_picker_ios: 99dfe1854b4fa34d0364e74a78448a0151025425
image_picker_ios: b545a5f16c0fa88e3ecbbce3ed4de45567a8ec18
isar_flutter_libs: b69f437aeab9c521821c3f376198c4371fa21073
open_filex: 6e26e659846ec990262224a12ef1c528bb4edbe4
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
pdfx: 7b876b09de8b7a0bf444a4f82b439ffcff4ee1ec
permission_handler_apple: 036b856153a2b1f61f21030ff725f3e6fece2b78
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
Sentry: a8d7b373b9f9868442b02a0c425192f693103cbf
sentry_flutter: 03e7660857a8cdb236e71456a7e8447b65c8a788
SentryPrivate: 006b24af16828441f70e2ab6adf241bd0a8ad130
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
ReachabilitySwift: 5ae15e16814b5f9ef568963fb2c87aeb49158c66
Sentry: ebc12276bd17613a114ab359074096b6b3725203
sentry_flutter: dff1df05dc39c83d04f9330b36360fc374574c5e
SentryPrivate: d651efb234cf385ec9a1cdd3eff94b5e78a0e0fe
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
unrar_file: ead248ffb2e777cb67f083bc1bb1fb45d4157dbd
UnrarKit: 99e3f0222a98a212188e1a6975dcf5aa798d26dd
url_launcher_ios: bbd758c6e7f9fd7b5b1d4cde34d2b95fcce5e812
UnrarKit: 62f535c7a34ec52d2514b9b148f33dcfa9a9dc39
url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586

PODFILE CHECKSUM: 261aa5270d0bfaacfc50eed5f8260a8d156ff8c5

Expand Down
18 changes: 18 additions & 0 deletions ios/Runner.xcodeproj/project.pbxproj
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
4703B9E427D52C737F4084E3 /* [CP] Embed Pods Frameworks */,
2FA329B8FEA619317B636C63 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -199,6 +200,23 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
2FA329B8FEA619317B636C63 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
Expand Down
4 changes: 2 additions & 2 deletions lib/providers/fetchBooks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import 'package:dio/dio.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:openapi/openapi.dart';
import 'package:tentacle/tentacle.dart';
import 'package:built_collection/built_collection.dart';
import 'package:sentry_flutter/sentry_flutter.dart';

Expand Down Expand Up @@ -46,7 +46,7 @@ Future<void> getComics(String comicsId) async {
]);

// turn into built list
final api = Openapi(basePathOverride: url).getItemsApi();
final api = Tentacle(basePathOverride: url).getItemsApi();
Response<BaseItemDtoQueryResult>? response;
bool useSentry = prefs.getBool('useSentry') ?? false;
try {
Expand Down
4 changes: 2 additions & 2 deletions lib/providers/fetchCategories.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// The purpose of this file is to fetch the categories from the database

import 'package:shared_preferences/shared_preferences.dart';
import 'package:openapi/openapi.dart';
import 'package:tentacle/tentacle.dart';
import 'package:jellybook/providers/fetchBooks.dart';
import 'package:jellybook/providers/folderProvider.dart';
import 'package:jellybook/models/entry.dart';
Expand Down Expand Up @@ -50,7 +50,7 @@ Future<(List<Entry>, List<Folder>)> getServerCategories({
logger.d("got prefs");
Map<String, String> headers =
getHeaders(url, client, device, deviceId, version, token);
final api = Openapi(basePathOverride: url).getUserViewsApi();
final api = Tentacle(basePathOverride: url).getUserViewsApi();
var response;
try {
response = await api.getUserViews(
Expand Down
6 changes: 3 additions & 3 deletions lib/providers/login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:package_info_plus/package_info_plus.dart' as package_info;
import 'package:isar/isar.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:jellybook/models/login.dart';
import 'package:openapi/openapi.dart';
import 'package:tentacle/tentacle.dart';
import 'package:device_info_plus/device_info_plus.dart';
import 'package:jellybook/variables.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
Expand Down Expand Up @@ -95,12 +95,12 @@ class LoginProvider {
"URL is not valid. Please check the URL and try again.";
}

final api = Openapi(basePathOverride: _url);
final api = Tentacle(basePathOverride: _url);
final apiInstance = api.getUserApi();
Response<AuthenticationResult> response;

try {
// use the authenticateUserByNameRequest from openapi/lib/src/model/authenticate_user_by_name_request.g.dart
// use the authenticateUserByNameRequest from tentacle/lib/src/model/authenticate_user_by_name_request.g.dart
var authenticateUserByNameRequest = AuthenticateUserByNameRequest((b) => b
..username = username
..pw = password);
Expand Down
4 changes: 2 additions & 2 deletions lib/providers/updateLike.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import 'package:isar/isar.dart';
import 'package:jellybook/models/entry.dart';
import 'package:openapi/openapi.dart';
import 'package:tentacle/tentacle.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:package_info_plus/package_info_plus.dart' as p_info;
import 'package:jellybook/variables.dart';
Expand Down Expand Up @@ -38,7 +38,7 @@ Future<void> updateLike(String id) async {
'Host': server.substring(server.indexOf("//") + 2, server.length),
'Content-Length': '0',
};
final api = Openapi(basePathOverride: server).getUserLibraryApi();
final api = Tentacle(basePathOverride: server).getUserLibraryApi();
logger.d(url);
bool useSentry = prefs.getBool('useSentry') ?? false;
if (entries?.isFavorited == false) {
Expand Down
4 changes: 2 additions & 2 deletions lib/providers/updatePagenum.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// the purpose of this file is to update the page number of the current page on jellyfin
import 'package:openapi/openapi.dart';
import 'package:tentacle/tentacle.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:package_info_plus/package_info_plus.dart' as p_info;
import 'package:jellybook/variables.dart';
Expand Down Expand Up @@ -31,7 +31,7 @@ Future<void> updatePagenum(String id, int pagenum) async {
'Host': server.substring(server.indexOf("//") + 2, server.length),
'Content-Length': '0',
};
final api = Openapi(basePathOverride: server).getPlaystateApi();
final api = Tentacle(basePathOverride: server).getPlaystateApi();
try {
final response = await api.onPlaybackProgress(
userId: userId,
Expand Down
6 changes: 3 additions & 3 deletions lib/screens/EditScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import 'package:jellybook/models/entry.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:jellybook/variables.dart';
import 'package:package_info_plus/package_info_plus.dart' as p_info;
import 'package:openapi/openapi.dart';
import 'package:tentacle/tentacle.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:image_picker/image_picker.dart';
import 'package:built_collection/built_collection.dart';
Expand Down Expand Up @@ -185,7 +185,7 @@ class _EditScreenState extends State<EditScreen> {
'Origin': server,
'Host': server.substring(server.indexOf("//") + 2, server.length),
};
final api = Openapi(basePathOverride: server).getItemUpdateApi();
final api = Tentacle(basePathOverride: server).getItemUpdateApi();
DateTime? dateTime;
bool useSentry = prefs.getBool('useSentry') ?? false;
try {
Expand Down Expand Up @@ -245,7 +245,7 @@ class _EditScreenState extends State<EditScreen> {
);
}
if (imageChanged) {
final api2 = Openapi(basePathOverride: server).getImageApi();
final api2 = Tentacle(basePathOverride: server).getImageApi();
// get the image encoded in base64
File imagefile = File(entry.imagePath);
MultipartFile file = await MultipartFile.fromFile(
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/MainScreens/settingsScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import 'package:jellybook/variables.dart';
import 'package:palette_generator/palette_generator.dart';
import 'package:sentry/sentry.dart';

import 'package:openapi/openapi.dart';
import 'package:tentacle/tentacle.dart';

class SettingsScreen extends StatefulWidget {
@override
Expand Down Expand Up @@ -309,7 +309,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
'Host': server.substring(server.indexOf("//") + 2, server.length),
'Content-Length': '0',
};
final api = Openapi(basePathOverride: server).getImageApi();
final api = Tentacle(basePathOverride: server).getImageApi();
Uint8List image = Uint8List(0);
ImageProvider imageProvider = Image.asset('assets/images/Logo.png').image;
try {
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/downloaderScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import 'package:unrar_file/unrar_file.dart';
import 'package:jellybook/providers/fileNameFromTitle.dart';
import 'package:jellybook/providers/parseEpub.dart';
import 'package:jellybook/providers/ComicInfoXML.dart';
import 'package:openapi/openapi.dart';
import 'package:tentacle/tentacle.dart';

// import the database
import 'package:jellybook/models/entry.dart';
Expand Down Expand Up @@ -153,7 +153,7 @@ class _DownloadScreenState extends State<DownloadScreen> {
entry.filePath = dir;
logger.d('Directory created');
logger.d('Attempting to download file');
final api = Openapi(basePathOverride: entry.url).getLibraryApi();
final api = Tentacle(basePathOverride: entry.url).getLibraryApi();
Response<Uint8List> download;
downloading = true;
download = await api
Expand Down
7 changes: 4 additions & 3 deletions lib/screens/homeScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@ class _HomeScreenState extends State<HomeScreen> {

@override
void initState() {
Connectivity().onConnectivityChanged.listen((ConnectivityResult result) {
Connectivity()
.onConnectivityChanged
.listen((List<ConnectivityResult> status) {
// Get the network status
var status = result;
if (prefs == null) {
setSharedPrefs();
}
// if the user is offline
if (status == ConnectivityResult.none) {
if (status.contains(ConnectivityResult.none)) {
// show the offline book reader
Navigator.push(
context,
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/infoScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import 'package:jellybook/models/entry.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:jellybook/variables.dart';
import 'package:package_info_plus/package_info_plus.dart' as p_info;
import 'package:openapi/openapi.dart';
import 'package:tentacle/tentacle.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:jellybook/providers/Author.dart';

Expand Down Expand Up @@ -274,7 +274,7 @@ class _InfoScreenState extends State<InfoScreen> {
'Content-Length': '0',
};

final api = Openapi(basePathOverride: server).getPersonsApi();
final api = Tentacle(basePathOverride: server).getPersonsApi();
final person = await api.getPerson(name: author, headers: headers);
if (person.data!.imageTags == null || person.data!.imageTags!.isEmpty) {
return "asset";
Expand Down
13 changes: 7 additions & 6 deletions lib/screens/offlineBookReader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ class _OfflineBookReaderState extends State<OfflineBookReader> {

@override
void initState() {
Connectivity().onConnectivityChanged.listen((ConnectivityResult result) {
var status = result;
Connectivity()
.onConnectivityChanged
.listen((List<ConnectivityResult> status) {
// if the user is online
if (status == ConnectivityResult.wifi ||
status == ConnectivityResult.mobile ||
status == ConnectivityResult.ethernet) {
if (status.contains(ConnectivityResult.wifi) ||
status.contains(ConnectivityResult.mobile) ||
status.contains(ConnectivityResult.ethernet)) {
final isar = Isar.getInstance();
final login = isar!.logins.where().findFirstSync();
if (login!.serverUrl.isNotEmpty && login.username.isNotEmpty) {
Expand Down Expand Up @@ -84,7 +85,7 @@ class _OfflineBookReaderState extends State<OfflineBookReader> {
// create a listener to see if the user is online or offline
Future<bool> checkConnectivity() async {
var connectivityResult = await (Connectivity().checkConnectivity());
if (connectivityResult == ConnectivityResult.none) {
if (connectivityResult.contains(ConnectivityResult.none)) {
return false;
} else {
return true;
Expand Down
8 changes: 8 additions & 0 deletions linux/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,28 @@
#include "generated_plugin_registrant.h"

#include <audioplayers_linux/audioplayers_linux_plugin.h>
#include <file_selector_linux/file_selector_plugin.h>
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
#include <isar_flutter_libs/isar_flutter_libs_plugin.h>
#include <sentry_flutter/sentry_flutter_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h>

void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) audioplayers_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "AudioplayersLinuxPlugin");
audioplayers_linux_plugin_register_with_registrar(audioplayers_linux_registrar);
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);
g_autoptr(FlPluginRegistrar) isar_flutter_libs_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "IsarFlutterLibsPlugin");
isar_flutter_libs_plugin_register_with_registrar(isar_flutter_libs_registrar);
g_autoptr(FlPluginRegistrar) sentry_flutter_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "SentryFlutterPlugin");
sentry_flutter_plugin_register_with_registrar(sentry_flutter_registrar);
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
Expand Down
2 changes: 2 additions & 0 deletions linux/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

list(APPEND FLUTTER_PLUGIN_LIST
audioplayers_linux
file_selector_linux
flutter_secure_storage_linux
isar_flutter_libs
sentry_flutter
url_launcher_linux
)

Expand Down
Loading

0 comments on commit e9c2ca9

Please sign in to comment.