diff --git a/.metadata b/.metadata index 7fdf3f2..1360329 100644 --- a/.metadata +++ b/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled. version: - revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0 + revision: f468f3366c26a5092eb964a230ce7892fda8f2f8 channel: stable project_type: app @@ -13,11 +13,11 @@ project_type: app migration: platforms: - platform: root - create_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0 - base_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0 - - platform: windows - create_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0 - base_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0 + create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8 + base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8 + - platform: macos + create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8 + base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8 # User provided section diff --git a/README.md b/README.md index 53d8e18..c27253e 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Features include: * Local reading of downloaded content * Read and manage local archives (.cbz, .zip) * A configurable reader with multiple viewers, reading directions. +* Tracker support: [MyAnimeList](https://myanimelist.net/) and [AniList](https://anilist.co/) support * Categories to organize your library * Light and dark themes diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig index 592ceee..ec97fc6 100644 --- a/ios/Flutter/Debug.xcconfig +++ b/ios/Flutter/Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig index 592ceee..c4855bf 100644 --- a/ios/Flutter/Release.xcconfig +++ b/ios/Flutter/Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/ios/Podfile b/ios/Podfile new file mode 100644 index 0000000..93f8fcf --- /dev/null +++ b/ios/Podfile @@ -0,0 +1,44 @@ +# Uncomment this line to define a global platform for your project + platform :ios, '13.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/ios/Podfile.lock b/ios/Podfile.lock new file mode 100644 index 0000000..f8777cb --- /dev/null +++ b/ios/Podfile.lock @@ -0,0 +1,150 @@ +PODS: + - background_downloader (0.0.1): + - Flutter + - DKImagePickerController/Core (4.3.4): + - DKImagePickerController/ImageDataManager + - DKImagePickerController/Resource + - DKImagePickerController/ImageDataManager (4.3.4) + - DKImagePickerController/PhotoGallery (4.3.4): + - DKImagePickerController/Core + - DKPhotoGallery + - DKImagePickerController/Resource (4.3.4) + - DKPhotoGallery (0.0.17): + - DKPhotoGallery/Core (= 0.0.17) + - DKPhotoGallery/Model (= 0.0.17) + - DKPhotoGallery/Preview (= 0.0.17) + - DKPhotoGallery/Resource (= 0.0.17) + - SDWebImage + - SwiftyGif + - DKPhotoGallery/Core (0.0.17): + - DKPhotoGallery/Model + - DKPhotoGallery/Preview + - SDWebImage + - SwiftyGif + - DKPhotoGallery/Model (0.0.17): + - SDWebImage + - SwiftyGif + - DKPhotoGallery/Preview (0.0.17): + - DKPhotoGallery/Model + - DKPhotoGallery/Resource + - SDWebImage + - SwiftyGif + - DKPhotoGallery/Resource (0.0.17): + - SDWebImage + - SwiftyGif + - file_picker (0.0.1): + - DKImagePickerController/PhotoGallery + - Flutter + - Flutter (1.0.0) + - flutter_inappwebview (0.0.1): + - Flutter + - flutter_inappwebview/Core (= 0.0.1) + - OrderedSet (~> 5.0) + - flutter_inappwebview/Core (0.0.1): + - Flutter + - OrderedSet (~> 5.0) + - flutter_js (0.1.0): + - Flutter + - flutter_web_auth_2 (1.1.1): + - Flutter + - FMDB (2.7.5): + - FMDB/standard (= 2.7.5) + - FMDB/standard (2.7.5) + - isar_flutter_libs (1.0.0): + - Flutter + - OrderedSet (5.0.0) + - package_info_plus (0.4.5): + - Flutter + - path_provider_foundation (0.0.1): + - Flutter + - FlutterMacOS + - permission_handler_apple (9.0.4): + - Flutter + - SDWebImage (5.17.0): + - SDWebImage/Core (= 5.17.0) + - SDWebImage/Core (5.17.0) + - share_plus (0.0.1): + - Flutter + - sqflite (0.0.3): + - Flutter + - FMDB (>= 2.7.5) + - SwiftyGif (5.4.4) + - url_launcher_ios (0.0.1): + - Flutter + +DEPENDENCIES: + - background_downloader (from `.symlinks/plugins/background_downloader/ios`) + - file_picker (from `.symlinks/plugins/file_picker/ios`) + - Flutter (from `Flutter`) + - flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`) + - flutter_js (from `.symlinks/plugins/flutter_js/ios`) + - flutter_web_auth_2 (from `.symlinks/plugins/flutter_web_auth_2/ios`) + - isar_flutter_libs (from `.symlinks/plugins/isar_flutter_libs/ios`) + - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) + - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) + - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) + - share_plus (from `.symlinks/plugins/share_plus/ios`) + - sqflite (from `.symlinks/plugins/sqflite/ios`) + - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) + +SPEC REPOS: + trunk: + - DKImagePickerController + - DKPhotoGallery + - FMDB + - OrderedSet + - SDWebImage + - SwiftyGif + +EXTERNAL SOURCES: + background_downloader: + :path: ".symlinks/plugins/background_downloader/ios" + file_picker: + :path: ".symlinks/plugins/file_picker/ios" + Flutter: + :path: Flutter + flutter_inappwebview: + :path: ".symlinks/plugins/flutter_inappwebview/ios" + flutter_js: + :path: ".symlinks/plugins/flutter_js/ios" + flutter_web_auth_2: + :path: ".symlinks/plugins/flutter_web_auth_2/ios" + isar_flutter_libs: + :path: ".symlinks/plugins/isar_flutter_libs/ios" + package_info_plus: + :path: ".symlinks/plugins/package_info_plus/ios" + path_provider_foundation: + :path: ".symlinks/plugins/path_provider_foundation/darwin" + permission_handler_apple: + :path: ".symlinks/plugins/permission_handler_apple/ios" + share_plus: + :path: ".symlinks/plugins/share_plus/ios" + sqflite: + :path: ".symlinks/plugins/sqflite/ios" + url_launcher_ios: + :path: ".symlinks/plugins/url_launcher_ios/ios" + +SPEC CHECKSUMS: + background_downloader: 6f55e5548875be2ad4bb91b542558b5be22f339a + DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac + DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 + file_picker: ce3938a0df3cc1ef404671531facef740d03f920 + Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + flutter_inappwebview: 50b55a88f5dddadc9e741a7caf72f378116e2156 + flutter_js: 95929d4e146e8ceb1c8e1889d8c2065c5d840076 + flutter_web_auth_2: a1bc00762c408a8f80b72a538cd7ff5b601c3e71 + FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a + isar_flutter_libs: b69f437aeab9c521821c3f376198c4371fa21073 + OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c + package_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7 + path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9 + permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce + SDWebImage: 750adf017a315a280c60fde706ab1e552a3ae4e9 + share_plus: 599aa54e4ea31d4b4c0e9c911bcc26c55e791028 + sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a + SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f + url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4 + +PODFILE CHECKSUM: 351dbda8241c6ae667acbc7bc0353a0d9978d7f1 + +COCOAPODS: 1.12.1 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 9a6a61d..33d42d7 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -8,13 +8,26 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 2E161ED88D6088BA04182D24 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 87B3D97401D2090714EBD2ED /* Pods_Runner.framework */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + A83607D399EF885A7879ED92 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F944C966F0D3C46230816475 /* Pods_RunnerTests.framework */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXCopyFilesBuildPhase section */ 9705A1C41CF9048500538489 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; @@ -31,10 +44,15 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 48F414924F0EBD7233D9B3FB /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 87B3D97401D2090714EBD2ED /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8FEFB82C0F5EBF076D246DED /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -42,19 +60,55 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9D7FF371C06E43EB2821A307 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + E3DBD23DF4F6477DD1B2D619 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + F2F655C8A844E54BF4806B9E /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + F6B35AE9FD7580BD87744873 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + F944C966F0D3C46230816475 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 856C729112305BC7D8FE80C9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A83607D399EF885A7879ED92 /* Pods_RunnerTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EB1CF9000F007C117D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 2E161ED88D6088BA04182D24 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 6CD41D1121E5C42BF1E41F31 /* Pods */ = { + isa = PBXGroup; + children = ( + 9D7FF371C06E43EB2821A307 /* Pods-Runner.debug.xcconfig */, + F6B35AE9FD7580BD87744873 /* Pods-Runner.release.xcconfig */, + F2F655C8A844E54BF4806B9E /* Pods-Runner.profile.xcconfig */, + E3DBD23DF4F6477DD1B2D619 /* Pods-RunnerTests.debug.xcconfig */, + 48F414924F0EBD7233D9B3FB /* Pods-RunnerTests.release.xcconfig */, + 8FEFB82C0F5EBF076D246DED /* Pods-RunnerTests.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -72,6 +126,9 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + 6CD41D1121E5C42BF1E41F31 /* Pods */, + BCA59FF3AA594C41BF8ADD28 /* Frameworks */, ); sourceTree = ""; }; @@ -79,6 +136,7 @@ isa = PBXGroup; children = ( 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, ); name = Products; sourceTree = ""; @@ -98,19 +156,49 @@ path = Runner; sourceTree = ""; }; + BCA59FF3AA594C41BF8ADD28 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 87B3D97401D2090714EBD2ED /* Pods_Runner.framework */, + F944C966F0D3C46230816475 /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + EF1F895BD02D12F0BC740A9E /* [CP] Check Pods Manifest.lock */, + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + 856C729112305BC7D8FE80C9 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; 97C146ED1CF9000F007C117D /* Runner */ = { isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + F7E3AB66492405CCCAB00559 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + DC786BE6A6336FF08B227C10 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -127,9 +215,14 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; LastUpgradeCheck = 1300; ORGANIZATIONNAME = ""; TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; 97C146ED1CF9000F007C117D = { CreatedOnToolsVersion = 7.3.1; LastSwiftMigration = 1100; @@ -150,11 +243,19 @@ projectRoot = ""; targets = ( 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EC1CF9000F007C117D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -176,6 +277,7 @@ files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -199,9 +301,78 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + DC786BE6A6336FF08B227C10 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + EF1F895BD02D12F0BC740A9E /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + F7E3AB66492405CCCAB00559 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EA1CF9000F007C117D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -213,6 +384,14 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ 97C146FA1CF9000F007C117D /* Main.storyboard */ = { isa = PBXVariantGroup; @@ -256,6 +435,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -274,7 +454,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -292,6 +472,7 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -304,6 +485,56 @@ }; name = Profile; }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E3DBD23DF4F6477DD1B2D619 /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.kodjodevf.mangayomi.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 48F414924F0EBD7233D9B3FB /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.kodjodevf.mangayomi.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8FEFB82C0F5EBF076D246DED /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.kodjodevf.mangayomi.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; 97C147031CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -327,6 +558,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -351,7 +583,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -382,6 +614,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -400,7 +633,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -420,6 +653,7 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -442,6 +676,7 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -457,6 +692,16 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c87d15a..e42adcb 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -37,6 +37,17 @@ + + + + + + diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png index 8ba11b0..dc9ada4 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png index 4cfaa37..7353c41 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png index 2688175..797d452 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png index 3cd9a8c..6ed2d93 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png index 7aef2a3..4cd7b00 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png index 5aef388..fe73094 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png index 21351ee..321773c 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index 2688175..797d452 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png index fc0b6ee..502f463 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png index 67ada13..0ec3034 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png deleted file mode 100644 index f0e8178..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png deleted file mode 100644 index d6c2779..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png deleted file mode 100644 index aac6afe..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png deleted file mode 100644 index 9fa8f27..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png index 67ada13..0ec3034 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png index 7ae66ae..e9f5fea 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png deleted file mode 100644 index 20e7310..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png deleted file mode 100644 index 9001111..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index dcb414f..84ac32a 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png index 86cdae1..8953cba 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png index 7b27ba8..0467bf1 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index f80eb05..72a8744 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -2,6 +2,8 @@ + CADisableMinimumFrameDurationOnPhone + CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName @@ -13,7 +15,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - Mangayomi + mangayomi CFBundlePackageType APPL CFBundleShortVersionString @@ -24,6 +26,12 @@ $(FLUTTER_BUILD_NUMBER) LSRequiresIPhoneOS + UIApplicationSupportsIndirectInputEvents + + UIBackgroundModes + + fetch + UILaunchStoryboardName LaunchScreen UIMainStoryboardFile @@ -43,9 +51,5 @@ UIViewControllerBasedStatusBarAppearance - CADisableMinimumFrameDurationOnPhone - - UIApplicationSupportsIndirectInputEvents - diff --git a/ios/RunnerTests/RunnerTests.swift b/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000..86a7c3b --- /dev/null +++ b/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/lib/eval/bridge_class/model.dart b/lib/eval/bridge_class/model.dart index e919abd..421608a 100644 --- a/lib/eval/bridge_class/model.dart +++ b/lib/eval/bridge_class/model.dart @@ -65,3 +65,12 @@ class MangaModel { this.images, this.statusList}); } + +class VideoModel { + String? url; + String? quality; + String? originalUrl; + Map? headers; + + VideoModel({this.url, this.quality, this.originalUrl, this.headers}); +} diff --git a/lib/eval/bridge_class/video_model.dart b/lib/eval/bridge_class/video_model.dart new file mode 100644 index 0000000..4ae3b7b --- /dev/null +++ b/lib/eval/bridge_class/video_model.dart @@ -0,0 +1,134 @@ +import 'package:dart_eval/dart_eval.dart'; +import 'package:dart_eval/dart_eval_bridge.dart'; +import 'package:dart_eval/stdlib/core.dart'; +import 'package:mangayomi/eval/bridge_class/model.dart'; + +class $VideoModel implements VideoModel, $Instance { + $VideoModel.wrap(this.$value) : _superclass = $Object($value); + + static const $type = BridgeTypeRef( + BridgeTypeSpec('package:bridge_lib/bridge_lib.dart', 'VideoModel')); + + static const $declaration = BridgeClassDef(BridgeClassType($type), + constructors: { + '': BridgeConstructorDef(BridgeFunctionDef( + returns: BridgeTypeAnnotation($type), + params: [], + namedParams: [ + BridgeParameter( + 'url', + BridgeTypeAnnotation( + BridgeTypeRef.type(RuntimeTypes.stringType)), + false), + BridgeParameter( + 'quality', + BridgeTypeAnnotation( + BridgeTypeRef.type(RuntimeTypes.stringType)), + false), + BridgeParameter( + 'originalUrl', + BridgeTypeAnnotation( + BridgeTypeRef.type(RuntimeTypes.stringType)), + false), + BridgeParameter( + 'headers', + BridgeTypeAnnotation( + BridgeTypeRef.type(RuntimeTypes.mapType)), + false), + ])) + }, + // Specify class fields + fields: { + 'url': BridgeFieldDef( + BridgeTypeAnnotation(BridgeTypeRef.type(RuntimeTypes.stringType))), + 'quality': BridgeFieldDef( + BridgeTypeAnnotation(BridgeTypeRef.type(RuntimeTypes.stringType))), + 'originalUrl': BridgeFieldDef( + BridgeTypeAnnotation(BridgeTypeRef.type(RuntimeTypes.stringType))), + 'headers': BridgeFieldDef( + BridgeTypeAnnotation(BridgeTypeRef.type(RuntimeTypes.mapType))), + }, + wrap: true); + + static $Value? $new(Runtime runtime, $Value? target, List<$Value?> args) { + return $VideoModel.wrap(VideoModel()); + } + + @override + final VideoModel $value; + + @override + VideoModel get $reified => $value; + + final $Instance _superclass; + + @override + $Value? $getProperty(Runtime runtime, String identifier) { + switch (identifier) { + case 'url': + return $String($value.url!); + case 'quality': + return $String($value.quality!); + case 'originalUrl': + return $String($value.originalUrl!); + + case 'headers': + return $Map.wrap($value.headers!); + + default: + return _superclass.$getProperty(runtime, identifier); + } + } + + @override + int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!); + + @override + void $setProperty(Runtime runtime, String identifier, $Value value) { + switch (identifier) { + case 'url': + $value.url = value.$reified; + case 'quality': + $value.quality = value.$reified; + case 'originalUrl': + $value.originalUrl = value.$reified; + case 'headers': + $value.headers = value.$reified as Map; + + default: + _superclass.$setProperty(runtime, identifier, value); + } + } + + @override + String? get url => $value.url; + + @override + String? get quality => $value.quality; + + @override + Map? get headers => $value.headers; + + @override + String? get originalUrl => $value.originalUrl; + + @override + set url(String? url) { + // implement apiUrl + } + + @override + set quality(String? quality) { + // implement baseUrl + } + + @override + set headers(Map? headers) { + // implement dateFormat + } + + @override + set originalUrl(String? originalUrl) { + // implement dateFormatLocale + } +} diff --git a/lib/eval/compiler/compiler.dart b/lib/eval/compiler/compiler.dart index cf1ce1b..37a65cc 100644 --- a/lib/eval/compiler/compiler.dart +++ b/lib/eval/compiler/compiler.dart @@ -1,6 +1,7 @@ import 'dart:typed_data'; import 'package:dart_eval/dart_eval.dart'; import 'package:mangayomi/eval/bridge_class/manga_model.dart'; +import 'package:mangayomi/eval/bridge_class/video_model.dart'; import 'package:mangayomi/eval/m_bridge.dart'; Uint8List compilerEval(String sourceCode) { @@ -8,6 +9,7 @@ Uint8List compilerEval(String sourceCode) { compiler.defineBridgeClasses([ $MBridge.$declaration, $MangaModel.$declaration, + $VideoModel.$declaration ]); final program = compiler.compile({ 'package:mangayomi': {'main.dart': sourceCode} diff --git a/lib/eval/m_bridge.dart b/lib/eval/m_bridge.dart index 9a8ff80..4d84828 100644 --- a/lib/eval/m_bridge.dart +++ b/lib/eval/m_bridge.dart @@ -11,9 +11,16 @@ import 'package:flutter_js/flutter_js.dart'; import 'package:intl/date_symbol_data_local.dart'; import 'package:intl/intl.dart'; import 'package:json_path/json_path.dart'; +import 'package:mangayomi/eval/bridge_class/model.dart'; +import 'package:mangayomi/eval/bridge_class/video_model.dart'; +import 'package:mangayomi/services/anime_servers/dood_extractor.dart'; +import 'package:mangayomi/services/anime_servers/gogo_cdn_extractor.dart'; import 'package:mangayomi/main.dart'; import 'package:mangayomi/models/source.dart'; +import 'package:mangayomi/models/video.dart'; import 'package:mangayomi/modules/webview/webview.dart'; +import 'package:mangayomi/services/anime_servers/mp4_upload_extractor.dart'; +import 'package:mangayomi/services/anime_servers/stream_tape_extractor.dart'; import 'package:mangayomi/services/http_service/cloudflare/cloudflare_bypass.dart'; import 'package:mangayomi/utils/constant.dart'; import 'package:mangayomi/utils/reg_exp_matcher.dart'; @@ -499,6 +506,45 @@ class MBridge { } } + static Future> gogoCdnExtractor(String url) async { + return await GogoCdnExtractor().videosFromUrl( + url, + ); + } + + static Future> doodExtractor(String url) async { + return await DoodExtractor().videosFromUrl( + url, + ); + } + + static Future> mp4UploadExtractor(String url, + Map? headers, String prefix, String suffix) async { + return await Mp4uploadExtractor() + .videosFromUrl(url, headers ?? {}, prefix: prefix, suffix: suffix); + } + + static Future> streamTapeExtractor(String url) async { + return await StreamTapeExtractor().videosFromUrl( + url, + ); + } + + static String subString(String text, String pattern, int type) { + String result = ""; + //substring before + if (type == 0) { + result = text.split(pattern).first; + } else + // substring after last + if (type == 1) { + result = text.split(pattern).last; + } else if (type == 2) { + result = text.substring(text.lastIndexOf(pattern) + 1); + } + return result; + } + static String parseChapterDate( String date, String dateFormat, String dateFormatLocale) { int parseRelativeDate(String date) { @@ -686,6 +732,29 @@ class $MBridge extends MBridge with $Bridge { returns: BridgeTypeAnnotation($type), params: [], namedParams: [])) }, methods: { + 'subString': BridgeMethodDef( + BridgeFunctionDef( + returns: BridgeTypeAnnotation( + BridgeTypeRef.type(RuntimeTypes.stringType)), + params: [ + BridgeParameter( + 'text', + BridgeTypeAnnotation( + BridgeTypeRef.type(RuntimeTypes.stringType)), + false), + BridgeParameter( + 'pattern', + BridgeTypeAnnotation( + BridgeTypeRef.type(RuntimeTypes.stringType)), + false), + BridgeParameter( + 'type', + BridgeTypeAnnotation( + BridgeTypeRef.type(RuntimeTypes.intType)), + false), + ], + namedParams: []), + isStatic: true), 'listParse': BridgeMethodDef( BridgeFunctionDef( returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.list, @@ -988,6 +1057,74 @@ class $MBridge extends MBridge with $Bridge { ], namedParams: []), isStatic: true), + 'gogoCdnExtractor': BridgeMethodDef( + BridgeFunctionDef( + returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.future, + [BridgeTypeRef.type(RuntimeTypes.dynamicType)])), + params: [ + BridgeParameter( + 'url', + BridgeTypeAnnotation( + BridgeTypeRef.type(RuntimeTypes.stringType)), + false), + ], + namedParams: []), + isStatic: true), + 'doodExtractor': BridgeMethodDef( + BridgeFunctionDef( + returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.future, + [BridgeTypeRef.type(RuntimeTypes.dynamicType)])), + params: [ + BridgeParameter( + 'url', + BridgeTypeAnnotation( + BridgeTypeRef.type(RuntimeTypes.stringType)), + false), + ], + namedParams: []), + isStatic: true), + 'streamTapeExtractor': BridgeMethodDef( + BridgeFunctionDef( + returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.future, + [BridgeTypeRef.type(RuntimeTypes.dynamicType)])), + params: [ + BridgeParameter( + 'url', + BridgeTypeAnnotation( + BridgeTypeRef.type(RuntimeTypes.stringType)), + false), + ], + namedParams: []), + isStatic: true), + 'mp4UploadExtractor': BridgeMethodDef( + BridgeFunctionDef( + returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.future, + [BridgeTypeRef.type(RuntimeTypes.dynamicType)])), + params: [ + BridgeParameter( + 'url', + BridgeTypeAnnotation( + BridgeTypeRef.type(RuntimeTypes.stringType)), + false), + BridgeParameter( + 'headers', + BridgeTypeAnnotation( + BridgeTypeRef.type(RuntimeTypes.mapType), + nullable: true), + false), + BridgeParameter( + 'prefix', + BridgeTypeAnnotation( + BridgeTypeRef.type(RuntimeTypes.stringType)), + false), + BridgeParameter( + 'suffix', + BridgeTypeAnnotation( + BridgeTypeRef.type(RuntimeTypes.stringType)), + false), + ], + namedParams: []), + isStatic: true), 'getHtmlViaWebview': BridgeMethodDef( BridgeFunctionDef( returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.future, @@ -1140,6 +1277,15 @@ class $MBridge extends MBridge with $Bridge { )); } + static $String $subString( + Runtime runtime, $Value? target, List<$Value?> args) { + return $String(MBridge.subString( + args[0]!.$value, + args[1]!.$value, + args[2]!.$value, + )); + } + static $String $getMapValue( Runtime runtime, $Value? target, List<$Value?> args) { return $String(MBridge.getMapValue( @@ -1220,11 +1366,54 @@ class $MBridge extends MBridge with $Bridge { static $Future $http(Runtime runtime, $Value? target, List<$Value?> args) => $Future.wrap(MBridge.http(args[0]!.$value, args[1]!.$value) .then((value) => $String(value))); + static $Future $getHtmlViaWebview( Runtime runtime, $Value? target, List<$Value?> args) => $Future.wrap(MBridge.getHtmlViaWebview(args[0]!.$value, args[1]!.$value) .then((value) => $String(value))); + static $Future $gogoCdnExtractor( + Runtime runtime, $Value? target, List<$Value?> args) => + $Future.wrap(MBridge.gogoCdnExtractor(args[0]!.$value) + .then((value) => $List.wrap(value + .map((e) => $VideoModel.wrap(VideoModel() + ..headers = e.headers + ..originalUrl = e.originalUrl + ..quality = e.quality + ..url = e.url)) + .toList()))); + + static $Future $doodExtractor( + Runtime runtime, $Value? target, List<$Value?> args) => + $Future.wrap(MBridge.doodExtractor(args[0]!.$value) + .then((value) => $List.wrap(value + .map((e) => $VideoModel.wrap(VideoModel() + ..headers = e.headers + ..originalUrl = e.originalUrl + ..quality = e.quality + ..url = e.url)) + .toList()))); + static $Future $streamTapeExtractor( + Runtime runtime, $Value? target, List<$Value?> args) => + $Future.wrap(MBridge.streamTapeExtractor(args[0]!.$value) + .then((value) => $List.wrap(value + .map((e) => $VideoModel.wrap(VideoModel() + ..headers = e.headers + ..originalUrl = e.originalUrl + ..quality = e.quality + ..url = e.url)) + .toList()))); + static $Future $mp4UploadExtractor( + Runtime runtime, $Value? target, List<$Value?> args) => + $Future.wrap(MBridge.mp4UploadExtractor(args[0]!.$value, args[1]!.$value, + args[2]!.$value, args[3]!.$value) + .then((value) => $List.wrap(value + .map((e) => $VideoModel.wrap(VideoModel() + ..headers = e.headers + ..originalUrl = e.originalUrl + ..quality = e.quality + ..url = e.url)) + .toList()))); @override $Value? $bridgeGet(String identifier) { throw UnimplementedError(); diff --git a/lib/eval/runtime/runtime.dart b/lib/eval/runtime/runtime.dart index d8c44a8..2463238 100644 --- a/lib/eval/runtime/runtime.dart +++ b/lib/eval/runtime/runtime.dart @@ -1,6 +1,7 @@ import 'dart:typed_data'; import 'package:dart_eval/dart_eval.dart'; +import 'package:mangayomi/eval/bridge_class/video_model.dart'; import 'package:mangayomi/eval/m_bridge.dart'; import 'package:mangayomi/eval/bridge_class/manga_model.dart'; @@ -11,10 +12,20 @@ Runtime runtimeEval(Uint8List bytecode) { isBridge: true); runtime.registerBridgeFunc( 'package:bridge_lib/bridge_lib.dart', 'MangaModel.', $MangaModel.$new); + runtime.registerBridgeFunc( + 'package:bridge_lib/bridge_lib.dart', 'VideoModel.', $VideoModel.$new); runtime.registerBridgeFunc( 'package:bridge_lib/bridge_lib.dart', 'MBridge.http', $MBridge.$http); runtime.registerBridgeFunc('package:bridge_lib/bridge_lib.dart', 'MBridge.listParseDateTime', $MBridge.$listParseDateTime); + runtime.registerBridgeFunc('package:bridge_lib/bridge_lib.dart', + 'MBridge.gogoCdnExtractor', $MBridge.$gogoCdnExtractor); + runtime.registerBridgeFunc('package:bridge_lib/bridge_lib.dart', + 'MBridge.doodExtractor', $MBridge.$doodExtractor); + runtime.registerBridgeFunc('package:bridge_lib/bridge_lib.dart', + 'MBridge.streamTapeExtractor', $MBridge.$streamTapeExtractor); + runtime.registerBridgeFunc('package:bridge_lib/bridge_lib.dart', + 'MBridge.mp4UploadExtractor', $MBridge.$mp4UploadExtractor); runtime.registerBridgeFunc('package:bridge_lib/bridge_lib.dart', 'MBridge.jsonPathToString', $MBridge.$jsonPathToString); runtime.registerBridgeFunc('package:bridge_lib/bridge_lib.dart', @@ -35,6 +46,8 @@ Runtime runtimeEval(Uint8List bytecode) { 'MBridge.parseChapterDate', $MBridge.$parseChapterDate); runtime.registerBridgeFunc('package:bridge_lib/bridge_lib.dart', 'MBridge.stringParse', $MBridge.$stringParse); + runtime.registerBridgeFunc('package:bridge_lib/bridge_lib.dart', + 'MBridge.subString', $MBridge.$subString); runtime.registerBridgeFunc( 'package:bridge_lib/bridge_lib.dart', 'MBridge.evalJs', $MBridge.$evalJs); runtime.registerBridgeFunc('package:bridge_lib/bridge_lib.dart', diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index e3656ea..1718902 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -181,5 +181,18 @@ "one_tracker":"1 tracker", "n_tracker":"{n} trackers", "tracking": "Tracking", - "description": "Description" + "description": "Description", + "episode_progress": "Progress: {n}", + "n_episodes": "{n} episodes", + "manga_sources":"Manga Sources", + "anime_sources":"Anime Sources", + "anime_extensions":"Anime Extensions", + "manga_extensions":"Manga Extensions", + "anime":"Anime", + "manga":"Manga", + "library_no_category_exist":"You don't have any categories yet", + "watching":"Watching", + "plan_to_watch":"Plan to watch", + "re_watching":"Rewatching" + } diff --git a/lib/l10n/app_fr.arb b/lib/l10n/app_fr.arb index 1a70d5b..62c1389 100644 --- a/lib/l10n/app_fr.arb +++ b/lib/l10n/app_fr.arb @@ -181,5 +181,17 @@ "one_tracker":"Suivi par 1 service", "n_tracker":"Suivi par {n} services", "tracking": "Suivi", - "description": "Description" + "description": "Description", + "episode_progress": "Progression: {n}", + "n_episodes": "{n} épisodes", + "manga_sources":"Sources d'animés", + "anime_sources":"Sources des mangas", + "anime_extensions":"Extensions d'animés", + "manga_extensions":"Extensions des mangas", + "anime":"Animé", + "manga":"Manga", + "library_no_category_exist":"Vous n'avez pas encore de catégories", + "watching":"En lecture", + "plan_to_watch":"À regarder", + "re_watching":"Revisionnage" } \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index 40cb2b9..ccb5dae 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -3,6 +3,7 @@ import 'package:bot_toast/bot_toast.dart'; import 'package:desktop_webview_window/desktop_webview_window.dart'; import 'package:flex_color_scheme/flex_color_scheme.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_meedu_videoplayer/init_meedu_player.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:intl/date_symbol_data_local.dart'; @@ -29,6 +30,10 @@ class MyHttpoverrides extends HttpOverrides { } void main(List args) async { + initMeeduPlayer( + androidUseMediaKit: true, + iosUseMediaKit: true, + ); HttpOverrides.global = MyHttpoverrides(); if (Platform.isLinux || Platform.isWindows) { if (runWebViewTitleBarWidget(args)) { @@ -125,4 +130,3 @@ class _MyAppState extends ConsumerState { ); } } - diff --git a/lib/models/category.dart b/lib/models/category.dart index 7a77ba2..3b79385 100644 --- a/lib/models/category.dart +++ b/lib/models/category.dart @@ -6,8 +6,10 @@ part 'category.g.dart'; class Category { Id? id; String? name; + bool? forManga; Category({ this.id = Isar.autoIncrement, required this.name, + required this.forManga }); } diff --git a/lib/models/category.g.dart b/lib/models/category.g.dart index a7e09cf..ab1f0ee 100644 --- a/lib/models/category.g.dart +++ b/lib/models/category.g.dart @@ -17,8 +17,13 @@ const CategorySchema = CollectionSchema( name: r'Category', id: 5751694338128944171, properties: { - r'name': PropertySchema( + r'forManga': PropertySchema( id: 0, + name: r'forManga', + type: IsarType.bool, + ), + r'name': PropertySchema( + id: 1, name: r'name', type: IsarType.string, ) @@ -58,7 +63,8 @@ void _categorySerialize( List offsets, Map> allOffsets, ) { - writer.writeString(offsets[0], object.name); + writer.writeBool(offsets[0], object.forManga); + writer.writeString(offsets[1], object.name); } Category _categoryDeserialize( @@ -68,8 +74,9 @@ Category _categoryDeserialize( Map> allOffsets, ) { final object = Category( + forManga: reader.readBoolOrNull(offsets[0]), id: id, - name: reader.readStringOrNull(offsets[0]), + name: reader.readStringOrNull(offsets[1]), ); return object; } @@ -82,6 +89,8 @@ P _categoryDeserializeProp

( ) { switch (propertyId) { case 0: + return (reader.readBoolOrNull(offset)) as P; + case 1: return (reader.readStringOrNull(offset)) as P; default: throw IsarError('Unknown property with id $propertyId'); @@ -177,6 +186,32 @@ extension CategoryQueryWhere on QueryBuilder { extension CategoryQueryFilter on QueryBuilder { + QueryBuilder forMangaIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'forManga', + )); + }); + } + + QueryBuilder forMangaIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'forManga', + )); + }); + } + + QueryBuilder forMangaEqualTo( + bool? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'forManga', + value: value, + )); + }); + } + QueryBuilder idIsNull() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(const FilterCondition.isNull( @@ -399,6 +434,18 @@ extension CategoryQueryLinks on QueryBuilder {} extension CategoryQuerySortBy on QueryBuilder { + QueryBuilder sortByForManga() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'forManga', Sort.asc); + }); + } + + QueryBuilder sortByForMangaDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'forManga', Sort.desc); + }); + } + QueryBuilder sortByName() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'name', Sort.asc); @@ -414,6 +461,18 @@ extension CategoryQuerySortBy on QueryBuilder { extension CategoryQuerySortThenBy on QueryBuilder { + QueryBuilder thenByForManga() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'forManga', Sort.asc); + }); + } + + QueryBuilder thenByForMangaDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'forManga', Sort.desc); + }); + } + QueryBuilder thenById() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'id', Sort.asc); @@ -441,6 +500,12 @@ extension CategoryQuerySortThenBy extension CategoryQueryWhereDistinct on QueryBuilder { + QueryBuilder distinctByForManga() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'forManga'); + }); + } + QueryBuilder distinctByName( {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { @@ -457,6 +522,12 @@ extension CategoryQueryProperty }); } + QueryBuilder forMangaProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'forManga'); + }); + } + QueryBuilder nameProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'name'); diff --git a/lib/models/manga.dart b/lib/models/manga.dart index 97cb1b4..21962e3 100644 --- a/lib/models/manga.dart +++ b/lib/models/manga.dart @@ -20,6 +20,8 @@ class Manga { @enumerated Status status; + bool? isManga; + List? genre; bool favorite; @@ -55,6 +57,7 @@ class Manga { required this.name, required this.status, required this.description, + this.isManga = true, this.dateAdded, this.lastUpdate, this.categories, @@ -71,3 +74,4 @@ enum Status { onHiatus, publishingFinished } + diff --git a/lib/models/manga.g.dart b/lib/models/manga.g.dart index 79f2737..d78fa5c 100644 --- a/lib/models/manga.g.dart +++ b/lib/models/manga.g.dart @@ -62,38 +62,43 @@ const MangaSchema = CollectionSchema( name: r'isLocalArchive', type: IsarType.bool, ), - r'lang': PropertySchema( + r'isManga': PropertySchema( id: 9, + name: r'isManga', + type: IsarType.bool, + ), + r'lang': PropertySchema( + id: 10, name: r'lang', type: IsarType.string, ), r'lastRead': PropertySchema( - id: 10, + id: 11, name: r'lastRead', type: IsarType.long, ), r'lastUpdate': PropertySchema( - id: 11, + id: 12, name: r'lastUpdate', type: IsarType.long, ), r'link': PropertySchema( - id: 12, + id: 13, name: r'link', type: IsarType.string, ), r'name': PropertySchema( - id: 13, + id: 14, name: r'name', type: IsarType.string, ), r'source': PropertySchema( - id: 14, + id: 15, name: r'source', type: IsarType.string, ), r'status': PropertySchema( - id: 15, + id: 16, name: r'status', type: IsarType.byte, enumMap: _MangastatusEnumValueMap, @@ -211,13 +216,14 @@ void _mangaSerialize( writer.writeStringList(offsets[6], object.genre); writer.writeString(offsets[7], object.imageUrl); writer.writeBool(offsets[8], object.isLocalArchive); - writer.writeString(offsets[9], object.lang); - writer.writeLong(offsets[10], object.lastRead); - writer.writeLong(offsets[11], object.lastUpdate); - writer.writeString(offsets[12], object.link); - writer.writeString(offsets[13], object.name); - writer.writeString(offsets[14], object.source); - writer.writeByte(offsets[15], object.status.index); + writer.writeBool(offsets[9], object.isManga); + writer.writeString(offsets[10], object.lang); + writer.writeLong(offsets[11], object.lastRead); + writer.writeLong(offsets[12], object.lastUpdate); + writer.writeString(offsets[13], object.link); + writer.writeString(offsets[14], object.name); + writer.writeString(offsets[15], object.source); + writer.writeByte(offsets[16], object.status.index); } Manga _mangaDeserialize( @@ -237,13 +243,14 @@ Manga _mangaDeserialize( id: id, imageUrl: reader.readStringOrNull(offsets[7]), isLocalArchive: reader.readBoolOrNull(offsets[8]), - lang: reader.readStringOrNull(offsets[9]), - lastRead: reader.readLongOrNull(offsets[10]), - lastUpdate: reader.readLongOrNull(offsets[11]), - link: reader.readStringOrNull(offsets[12]), - name: reader.readStringOrNull(offsets[13]), - source: reader.readStringOrNull(offsets[14]), - status: _MangastatusValueEnumMap[reader.readByteOrNull(offsets[15])] ?? + isManga: reader.readBoolOrNull(offsets[9]), + lang: reader.readStringOrNull(offsets[10]), + lastRead: reader.readLongOrNull(offsets[11]), + lastUpdate: reader.readLongOrNull(offsets[12]), + link: reader.readStringOrNull(offsets[13]), + name: reader.readStringOrNull(offsets[14]), + source: reader.readStringOrNull(offsets[15]), + status: _MangastatusValueEnumMap[reader.readByteOrNull(offsets[16])] ?? Status.ongoing, ); return object; @@ -275,18 +282,20 @@ P _mangaDeserializeProp

( case 8: return (reader.readBoolOrNull(offset)) as P; case 9: - return (reader.readStringOrNull(offset)) as P; + return (reader.readBoolOrNull(offset)) as P; case 10: - return (reader.readLongOrNull(offset)) as P; + return (reader.readStringOrNull(offset)) as P; case 11: return (reader.readLongOrNull(offset)) as P; case 12: - return (reader.readStringOrNull(offset)) as P; + return (reader.readLongOrNull(offset)) as P; case 13: return (reader.readStringOrNull(offset)) as P; case 14: return (reader.readStringOrNull(offset)) as P; case 15: + return (reader.readStringOrNull(offset)) as P; + case 16: return (_MangastatusValueEnumMap[reader.readByteOrNull(offset)] ?? Status.ongoing) as P; default: @@ -1555,6 +1564,32 @@ extension MangaQueryFilter on QueryBuilder { }); } + QueryBuilder isMangaIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'isManga', + )); + }); + } + + QueryBuilder isMangaIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'isManga', + )); + }); + } + + QueryBuilder isMangaEqualTo( + bool? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'isManga', + value: value, + )); + }); + } + QueryBuilder langIsNull() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(const FilterCondition.isNull( @@ -2457,6 +2492,18 @@ extension MangaQuerySortBy on QueryBuilder { }); } + QueryBuilder sortByIsManga() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'isManga', Sort.asc); + }); + } + + QueryBuilder sortByIsMangaDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'isManga', Sort.desc); + }); + } + QueryBuilder sortByLang() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'lang', Sort.asc); @@ -2627,6 +2674,18 @@ extension MangaQuerySortThenBy on QueryBuilder { }); } + QueryBuilder thenByIsManga() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'isManga', Sort.asc); + }); + } + + QueryBuilder thenByIsMangaDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'isManga', Sort.desc); + }); + } + QueryBuilder thenByLang() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'lang', Sort.asc); @@ -2770,6 +2829,12 @@ extension MangaQueryWhereDistinct on QueryBuilder { }); } + QueryBuilder distinctByIsManga() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'isManga'); + }); + } + QueryBuilder distinctByLang( {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { @@ -2878,6 +2943,12 @@ extension MangaQueryProperty on QueryBuilder { }); } + QueryBuilder isMangaProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'isManga'); + }); + } + QueryBuilder langProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'lang'); diff --git a/lib/models/settings.dart b/lib/models/settings.dart index b151dc7..2ca87e2 100644 --- a/lib/models/settings.dart +++ b/lib/models/settings.dart @@ -94,6 +94,31 @@ class Settings { L10nLocale? locale; + @enumerated + DisplayType animeDisplayType; + + int? libraryFilterAnimeDownloadType; + + int? libraryFilterAnimeUnreadType; + + int? libraryFilterAnimeStartedType; + + int? libraryFilterAnimeBookMarkedType; + + bool? animeLibraryShowCategoryTabs; + + bool? animeLibraryDownloadedChapters; + + bool? animeLibraryShowLanguage; + + bool? animeLibraryShowNumbersOfItems; + + bool? animeLibraryShowContinueReadingButton; + + bool? animeLibraryLocalSource; + + SortLibraryManga? sortLibraryAnime; + Settings( {this.id = 227, this.displayType = DisplayType.compactGrid, @@ -132,7 +157,19 @@ class Settings { this.downloadLocation = "", this.cropBorders = false, this.libraryLocalSource, - this.autoUpdateExtensions = false}); + this.autoUpdateExtensions = false, + this.animeDisplayType = DisplayType.compactGrid, + this.libraryFilterAnimeDownloadType = 0, + this.libraryFilterAnimeUnreadType = 0, + this.libraryFilterAnimeStartedType = 0, + this.libraryFilterAnimeBookMarkedType = 0, + this.animeLibraryShowCategoryTabs = false, + this.animeLibraryDownloadedChapters = false, + this.animeLibraryShowLanguage = false, + this.animeLibraryShowNumbersOfItems = false, + this.animeLibraryShowContinueReadingButton = false, + this.animeLibraryLocalSource, + this.sortLibraryAnime}); } enum DisplayType { @@ -216,5 +253,5 @@ class FilterScanlator { class L10nLocale { String? languageCode; String? countryCode; - L10nLocale({this.languageCode,this.countryCode}); + L10nLocale({this.languageCode, this.countryCode}); } diff --git a/lib/models/settings.g.dart b/lib/models/settings.g.dart index 1145d88..d383926 100644 --- a/lib/models/settings.g.dart +++ b/lib/models/settings.g.dart @@ -22,216 +22,278 @@ const SettingsSchema = CollectionSchema( name: r'animatePageTransitions', type: IsarType.bool, ), - r'autoUpdateExtensions': PropertySchema( + r'animeDisplayType': PropertySchema( id: 1, + name: r'animeDisplayType', + type: IsarType.byte, + enumMap: _SettingsanimeDisplayTypeEnumValueMap, + ), + r'animeLibraryDownloadedChapters': PropertySchema( + id: 2, + name: r'animeLibraryDownloadedChapters', + type: IsarType.bool, + ), + r'animeLibraryLocalSource': PropertySchema( + id: 3, + name: r'animeLibraryLocalSource', + type: IsarType.bool, + ), + r'animeLibraryShowCategoryTabs': PropertySchema( + id: 4, + name: r'animeLibraryShowCategoryTabs', + type: IsarType.bool, + ), + r'animeLibraryShowContinueReadingButton': PropertySchema( + id: 5, + name: r'animeLibraryShowContinueReadingButton', + type: IsarType.bool, + ), + r'animeLibraryShowLanguage': PropertySchema( + id: 6, + name: r'animeLibraryShowLanguage', + type: IsarType.bool, + ), + r'animeLibraryShowNumbersOfItems': PropertySchema( + id: 7, + name: r'animeLibraryShowNumbersOfItems', + type: IsarType.bool, + ), + r'autoUpdateExtensions': PropertySchema( + id: 8, name: r'autoUpdateExtensions', type: IsarType.bool, ), r'chapterFilterBookmarkedList': PropertySchema( - id: 2, + id: 9, name: r'chapterFilterBookmarkedList', type: IsarType.objectList, target: r'ChapterFilterBookmarked', ), r'chapterFilterDownloadedList': PropertySchema( - id: 3, + id: 10, name: r'chapterFilterDownloadedList', type: IsarType.objectList, target: r'ChapterFilterDownloaded', ), r'chapterFilterUnreadList': PropertySchema( - id: 4, + id: 11, name: r'chapterFilterUnreadList', type: IsarType.objectList, target: r'ChapterFilterUnread', ), r'chapterPageIndexList': PropertySchema( - id: 5, + id: 12, name: r'chapterPageIndexList', type: IsarType.objectList, target: r'ChapterPageIndex', ), r'chapterPageUrlsList': PropertySchema( - id: 6, + id: 13, name: r'chapterPageUrlsList', type: IsarType.objectList, target: r'ChapterPageurls', ), r'cookiesList': PropertySchema( - id: 7, + id: 14, name: r'cookiesList', type: IsarType.objectList, target: r'Cookie', ), r'cropBorders': PropertySchema( - id: 8, + id: 15, name: r'cropBorders', type: IsarType.bool, ), r'dateFormat': PropertySchema( - id: 9, + id: 16, name: r'dateFormat', type: IsarType.string, ), r'defaultReaderMode': PropertySchema( - id: 10, + id: 17, name: r'defaultReaderMode', type: IsarType.byte, enumMap: _SettingsdefaultReaderModeEnumValueMap, ), r'displayType': PropertySchema( - id: 11, + id: 18, name: r'displayType', type: IsarType.byte, enumMap: _SettingsdisplayTypeEnumValueMap, ), r'doubleTapAnimationSpeed': PropertySchema( - id: 12, + id: 19, name: r'doubleTapAnimationSpeed', type: IsarType.long, ), r'downloadLocation': PropertySchema( - id: 13, + id: 20, name: r'downloadLocation', type: IsarType.string, ), r'downloadOnlyOnWifi': PropertySchema( - id: 14, + id: 21, name: r'downloadOnlyOnWifi', type: IsarType.bool, ), r'filterScanlatorList': PropertySchema( - id: 15, + id: 22, name: r'filterScanlatorList', type: IsarType.objectList, target: r'FilterScanlator', ), r'flexColorSchemeBlendLevel': PropertySchema( - id: 16, + id: 23, name: r'flexColorSchemeBlendLevel', type: IsarType.double, ), r'flexSchemeColorIndex': PropertySchema( - id: 17, + id: 24, name: r'flexSchemeColorIndex', type: IsarType.long, ), r'incognitoMode': PropertySchema( - id: 18, + id: 25, name: r'incognitoMode', type: IsarType.bool, ), r'libraryDownloadedChapters': PropertySchema( - id: 19, + id: 26, name: r'libraryDownloadedChapters', type: IsarType.bool, ), + r'libraryFilterAnimeBookMarkedType': PropertySchema( + id: 27, + name: r'libraryFilterAnimeBookMarkedType', + type: IsarType.long, + ), + r'libraryFilterAnimeDownloadType': PropertySchema( + id: 28, + name: r'libraryFilterAnimeDownloadType', + type: IsarType.long, + ), + r'libraryFilterAnimeStartedType': PropertySchema( + id: 29, + name: r'libraryFilterAnimeStartedType', + type: IsarType.long, + ), + r'libraryFilterAnimeUnreadType': PropertySchema( + id: 30, + name: r'libraryFilterAnimeUnreadType', + type: IsarType.long, + ), r'libraryFilterMangasBookMarkedType': PropertySchema( - id: 20, + id: 31, name: r'libraryFilterMangasBookMarkedType', type: IsarType.long, ), r'libraryFilterMangasDownloadType': PropertySchema( - id: 21, + id: 32, name: r'libraryFilterMangasDownloadType', type: IsarType.long, ), r'libraryFilterMangasStartedType': PropertySchema( - id: 22, + id: 33, name: r'libraryFilterMangasStartedType', type: IsarType.long, ), r'libraryFilterMangasUnreadType': PropertySchema( - id: 23, + id: 34, name: r'libraryFilterMangasUnreadType', type: IsarType.long, ), r'libraryLocalSource': PropertySchema( - id: 24, + id: 35, name: r'libraryLocalSource', type: IsarType.bool, ), r'libraryShowCategoryTabs': PropertySchema( - id: 25, + id: 36, name: r'libraryShowCategoryTabs', type: IsarType.bool, ), r'libraryShowContinueReadingButton': PropertySchema( - id: 26, + id: 37, name: r'libraryShowContinueReadingButton', type: IsarType.bool, ), r'libraryShowLanguage': PropertySchema( - id: 27, + id: 38, name: r'libraryShowLanguage', type: IsarType.bool, ), r'libraryShowNumbersOfItems': PropertySchema( - id: 28, + id: 39, name: r'libraryShowNumbersOfItems', type: IsarType.bool, ), r'locale': PropertySchema( - id: 29, + id: 40, name: r'locale', type: IsarType.object, target: r'L10nLocale', ), r'onlyIncludePinnedSources': PropertySchema( - id: 30, + id: 41, name: r'onlyIncludePinnedSources', type: IsarType.bool, ), r'personalReaderModeList': PropertySchema( - id: 31, + id: 42, name: r'personalReaderModeList', type: IsarType.objectList, target: r'PersonalReaderMode', ), r'pureBlackDarkMode': PropertySchema( - id: 32, + id: 43, name: r'pureBlackDarkMode', type: IsarType.bool, ), r'relativeTimesTamps': PropertySchema( - id: 33, + id: 44, name: r'relativeTimesTamps', type: IsarType.long, ), r'saveAsCBZArchive': PropertySchema( - id: 34, + id: 45, name: r'saveAsCBZArchive', type: IsarType.bool, ), r'showNSFW': PropertySchema( - id: 35, + id: 46, name: r'showNSFW', type: IsarType.bool, ), r'showPagesNumber': PropertySchema( - id: 36, + id: 47, name: r'showPagesNumber', type: IsarType.bool, ), r'sortChapterList': PropertySchema( - id: 37, + id: 48, name: r'sortChapterList', type: IsarType.objectList, target: r'SortChapter', ), + r'sortLibraryAnime': PropertySchema( + id: 49, + name: r'sortLibraryAnime', + type: IsarType.object, + target: r'SortLibraryManga', + ), r'sortLibraryManga': PropertySchema( - id: 38, + id: 50, name: r'sortLibraryManga', type: IsarType.object, target: r'SortLibraryManga', ), r'themeIsDark': PropertySchema( - id: 39, + id: 51, name: r'themeIsDark', type: IsarType.bool, ), r'userAgent': PropertySchema( - id: 40, + id: 52, name: r'userAgent', type: IsarType.string, ) @@ -420,6 +482,14 @@ int _settingsEstimateSize( } } } + { + final value = object.sortLibraryAnime; + if (value != null) { + bytesCount += 3 + + SortLibraryMangaSchema.estimateSize( + value, allOffsets[SortLibraryManga]!, allOffsets); + } + } { final value = object.sortLibraryManga; if (value != null) { @@ -444,101 +514,118 @@ void _settingsSerialize( Map> allOffsets, ) { writer.writeBool(offsets[0], object.animatePageTransitions); - writer.writeBool(offsets[1], object.autoUpdateExtensions); + writer.writeByte(offsets[1], object.animeDisplayType.index); + writer.writeBool(offsets[2], object.animeLibraryDownloadedChapters); + writer.writeBool(offsets[3], object.animeLibraryLocalSource); + writer.writeBool(offsets[4], object.animeLibraryShowCategoryTabs); + writer.writeBool(offsets[5], object.animeLibraryShowContinueReadingButton); + writer.writeBool(offsets[6], object.animeLibraryShowLanguage); + writer.writeBool(offsets[7], object.animeLibraryShowNumbersOfItems); + writer.writeBool(offsets[8], object.autoUpdateExtensions); writer.writeObjectList( - offsets[2], + offsets[9], allOffsets, ChapterFilterBookmarkedSchema.serialize, object.chapterFilterBookmarkedList, ); writer.writeObjectList( - offsets[3], + offsets[10], allOffsets, ChapterFilterDownloadedSchema.serialize, object.chapterFilterDownloadedList, ); writer.writeObjectList( - offsets[4], + offsets[11], allOffsets, ChapterFilterUnreadSchema.serialize, object.chapterFilterUnreadList, ); writer.writeObjectList( - offsets[5], + offsets[12], allOffsets, ChapterPageIndexSchema.serialize, object.chapterPageIndexList, ); writer.writeObjectList( - offsets[6], + offsets[13], allOffsets, ChapterPageurlsSchema.serialize, object.chapterPageUrlsList, ); writer.writeObjectList( - offsets[7], + offsets[14], allOffsets, CookieSchema.serialize, object.cookiesList, ); - writer.writeBool(offsets[8], object.cropBorders); - writer.writeString(offsets[9], object.dateFormat); - writer.writeByte(offsets[10], object.defaultReaderMode.index); - writer.writeByte(offsets[11], object.displayType.index); - writer.writeLong(offsets[12], object.doubleTapAnimationSpeed); - writer.writeString(offsets[13], object.downloadLocation); - writer.writeBool(offsets[14], object.downloadOnlyOnWifi); + writer.writeBool(offsets[15], object.cropBorders); + writer.writeString(offsets[16], object.dateFormat); + writer.writeByte(offsets[17], object.defaultReaderMode.index); + writer.writeByte(offsets[18], object.displayType.index); + writer.writeLong(offsets[19], object.doubleTapAnimationSpeed); + writer.writeString(offsets[20], object.downloadLocation); + writer.writeBool(offsets[21], object.downloadOnlyOnWifi); writer.writeObjectList( - offsets[15], + offsets[22], allOffsets, FilterScanlatorSchema.serialize, object.filterScanlatorList, ); - writer.writeDouble(offsets[16], object.flexColorSchemeBlendLevel); - writer.writeLong(offsets[17], object.flexSchemeColorIndex); - writer.writeBool(offsets[18], object.incognitoMode); - writer.writeBool(offsets[19], object.libraryDownloadedChapters); - writer.writeLong(offsets[20], object.libraryFilterMangasBookMarkedType); - writer.writeLong(offsets[21], object.libraryFilterMangasDownloadType); - writer.writeLong(offsets[22], object.libraryFilterMangasStartedType); - writer.writeLong(offsets[23], object.libraryFilterMangasUnreadType); - writer.writeBool(offsets[24], object.libraryLocalSource); - writer.writeBool(offsets[25], object.libraryShowCategoryTabs); - writer.writeBool(offsets[26], object.libraryShowContinueReadingButton); - writer.writeBool(offsets[27], object.libraryShowLanguage); - writer.writeBool(offsets[28], object.libraryShowNumbersOfItems); + writer.writeDouble(offsets[23], object.flexColorSchemeBlendLevel); + writer.writeLong(offsets[24], object.flexSchemeColorIndex); + writer.writeBool(offsets[25], object.incognitoMode); + writer.writeBool(offsets[26], object.libraryDownloadedChapters); + writer.writeLong(offsets[27], object.libraryFilterAnimeBookMarkedType); + writer.writeLong(offsets[28], object.libraryFilterAnimeDownloadType); + writer.writeLong(offsets[29], object.libraryFilterAnimeStartedType); + writer.writeLong(offsets[30], object.libraryFilterAnimeUnreadType); + writer.writeLong(offsets[31], object.libraryFilterMangasBookMarkedType); + writer.writeLong(offsets[32], object.libraryFilterMangasDownloadType); + writer.writeLong(offsets[33], object.libraryFilterMangasStartedType); + writer.writeLong(offsets[34], object.libraryFilterMangasUnreadType); + writer.writeBool(offsets[35], object.libraryLocalSource); + writer.writeBool(offsets[36], object.libraryShowCategoryTabs); + writer.writeBool(offsets[37], object.libraryShowContinueReadingButton); + writer.writeBool(offsets[38], object.libraryShowLanguage); + writer.writeBool(offsets[39], object.libraryShowNumbersOfItems); writer.writeObject( - offsets[29], + offsets[40], allOffsets, L10nLocaleSchema.serialize, object.locale, ); - writer.writeBool(offsets[30], object.onlyIncludePinnedSources); + writer.writeBool(offsets[41], object.onlyIncludePinnedSources); writer.writeObjectList( - offsets[31], + offsets[42], allOffsets, PersonalReaderModeSchema.serialize, object.personalReaderModeList, ); - writer.writeBool(offsets[32], object.pureBlackDarkMode); - writer.writeLong(offsets[33], object.relativeTimesTamps); - writer.writeBool(offsets[34], object.saveAsCBZArchive); - writer.writeBool(offsets[35], object.showNSFW); - writer.writeBool(offsets[36], object.showPagesNumber); + writer.writeBool(offsets[43], object.pureBlackDarkMode); + writer.writeLong(offsets[44], object.relativeTimesTamps); + writer.writeBool(offsets[45], object.saveAsCBZArchive); + writer.writeBool(offsets[46], object.showNSFW); + writer.writeBool(offsets[47], object.showPagesNumber); writer.writeObjectList( - offsets[37], + offsets[48], allOffsets, SortChapterSchema.serialize, object.sortChapterList, ); writer.writeObject( - offsets[38], + offsets[49], + allOffsets, + SortLibraryMangaSchema.serialize, + object.sortLibraryAnime, + ); + writer.writeObject( + offsets[50], allOffsets, SortLibraryMangaSchema.serialize, object.sortLibraryManga, ); - writer.writeBool(offsets[39], object.themeIsDark); - writer.writeString(offsets[40], object.userAgent); + writer.writeBool(offsets[51], object.themeIsDark); + writer.writeString(offsets[52], object.userAgent); } Settings _settingsDeserialize( @@ -549,103 +636,121 @@ Settings _settingsDeserialize( ) { final object = Settings( animatePageTransitions: reader.readBoolOrNull(offsets[0]), - autoUpdateExtensions: reader.readBoolOrNull(offsets[1]), + animeDisplayType: _SettingsanimeDisplayTypeValueEnumMap[ + reader.readByteOrNull(offsets[1])] ?? + DisplayType.compactGrid, + animeLibraryDownloadedChapters: reader.readBoolOrNull(offsets[2]), + animeLibraryLocalSource: reader.readBoolOrNull(offsets[3]), + animeLibraryShowCategoryTabs: reader.readBoolOrNull(offsets[4]), + animeLibraryShowContinueReadingButton: reader.readBoolOrNull(offsets[5]), + animeLibraryShowLanguage: reader.readBoolOrNull(offsets[6]), + animeLibraryShowNumbersOfItems: reader.readBoolOrNull(offsets[7]), + autoUpdateExtensions: reader.readBoolOrNull(offsets[8]), chapterFilterDownloadedList: reader.readObjectList( - offsets[3], + offsets[10], ChapterFilterDownloadedSchema.deserialize, allOffsets, ChapterFilterDownloaded(), ), chapterPageIndexList: reader.readObjectList( - offsets[5], + offsets[12], ChapterPageIndexSchema.deserialize, allOffsets, ChapterPageIndex(), ), chapterPageUrlsList: reader.readObjectList( - offsets[6], + offsets[13], ChapterPageurlsSchema.deserialize, allOffsets, ChapterPageurls(), ), cookiesList: reader.readObjectList( - offsets[7], + offsets[14], CookieSchema.deserialize, allOffsets, Cookie(), ), - cropBorders: reader.readBoolOrNull(offsets[8]), - dateFormat: reader.readStringOrNull(offsets[9]), + cropBorders: reader.readBoolOrNull(offsets[15]), + dateFormat: reader.readStringOrNull(offsets[16]), defaultReaderMode: _SettingsdefaultReaderModeValueEnumMap[ - reader.readByteOrNull(offsets[10])] ?? + reader.readByteOrNull(offsets[17])] ?? ReaderMode.vertical, displayType: - _SettingsdisplayTypeValueEnumMap[reader.readByteOrNull(offsets[11])] ?? + _SettingsdisplayTypeValueEnumMap[reader.readByteOrNull(offsets[18])] ?? DisplayType.compactGrid, - doubleTapAnimationSpeed: reader.readLongOrNull(offsets[12]), - downloadLocation: reader.readStringOrNull(offsets[13]), - downloadOnlyOnWifi: reader.readBoolOrNull(offsets[14]), - flexColorSchemeBlendLevel: reader.readDoubleOrNull(offsets[16]), - flexSchemeColorIndex: reader.readLongOrNull(offsets[17]), + doubleTapAnimationSpeed: reader.readLongOrNull(offsets[19]), + downloadLocation: reader.readStringOrNull(offsets[20]), + downloadOnlyOnWifi: reader.readBoolOrNull(offsets[21]), + flexColorSchemeBlendLevel: reader.readDoubleOrNull(offsets[23]), + flexSchemeColorIndex: reader.readLongOrNull(offsets[24]), id: id, - incognitoMode: reader.readBoolOrNull(offsets[18]), - libraryDownloadedChapters: reader.readBoolOrNull(offsets[19]), - libraryFilterMangasBookMarkedType: reader.readLongOrNull(offsets[20]), - libraryFilterMangasDownloadType: reader.readLongOrNull(offsets[21]), - libraryFilterMangasStartedType: reader.readLongOrNull(offsets[22]), - libraryFilterMangasUnreadType: reader.readLongOrNull(offsets[23]), - libraryLocalSource: reader.readBoolOrNull(offsets[24]), - libraryShowCategoryTabs: reader.readBoolOrNull(offsets[25]), - libraryShowContinueReadingButton: reader.readBoolOrNull(offsets[26]), - libraryShowLanguage: reader.readBoolOrNull(offsets[27]), - libraryShowNumbersOfItems: reader.readBoolOrNull(offsets[28]), - onlyIncludePinnedSources: reader.readBoolOrNull(offsets[30]), + incognitoMode: reader.readBoolOrNull(offsets[25]), + libraryDownloadedChapters: reader.readBoolOrNull(offsets[26]), + libraryFilterAnimeBookMarkedType: reader.readLongOrNull(offsets[27]), + libraryFilterAnimeDownloadType: reader.readLongOrNull(offsets[28]), + libraryFilterAnimeStartedType: reader.readLongOrNull(offsets[29]), + libraryFilterAnimeUnreadType: reader.readLongOrNull(offsets[30]), + libraryFilterMangasBookMarkedType: reader.readLongOrNull(offsets[31]), + libraryFilterMangasDownloadType: reader.readLongOrNull(offsets[32]), + libraryFilterMangasStartedType: reader.readLongOrNull(offsets[33]), + libraryFilterMangasUnreadType: reader.readLongOrNull(offsets[34]), + libraryLocalSource: reader.readBoolOrNull(offsets[35]), + libraryShowCategoryTabs: reader.readBoolOrNull(offsets[36]), + libraryShowContinueReadingButton: reader.readBoolOrNull(offsets[37]), + libraryShowLanguage: reader.readBoolOrNull(offsets[38]), + libraryShowNumbersOfItems: reader.readBoolOrNull(offsets[39]), + onlyIncludePinnedSources: reader.readBoolOrNull(offsets[41]), personalReaderModeList: reader.readObjectList( - offsets[31], + offsets[42], PersonalReaderModeSchema.deserialize, allOffsets, PersonalReaderMode(), ), - pureBlackDarkMode: reader.readBoolOrNull(offsets[32]), - relativeTimesTamps: reader.readLongOrNull(offsets[33]), - saveAsCBZArchive: reader.readBoolOrNull(offsets[34]), - showNSFW: reader.readBoolOrNull(offsets[35]), - showPagesNumber: reader.readBoolOrNull(offsets[36]), + pureBlackDarkMode: reader.readBoolOrNull(offsets[43]), + relativeTimesTamps: reader.readLongOrNull(offsets[44]), + saveAsCBZArchive: reader.readBoolOrNull(offsets[45]), + showNSFW: reader.readBoolOrNull(offsets[46]), + showPagesNumber: reader.readBoolOrNull(offsets[47]), sortChapterList: reader.readObjectList( - offsets[37], + offsets[48], SortChapterSchema.deserialize, allOffsets, SortChapter(), ), - sortLibraryManga: reader.readObjectOrNull( - offsets[38], + sortLibraryAnime: reader.readObjectOrNull( + offsets[49], SortLibraryMangaSchema.deserialize, allOffsets, ), - themeIsDark: reader.readBoolOrNull(offsets[39]), - userAgent: reader.readStringOrNull(offsets[40]), + sortLibraryManga: reader.readObjectOrNull( + offsets[50], + SortLibraryMangaSchema.deserialize, + allOffsets, + ), + themeIsDark: reader.readBoolOrNull(offsets[51]), + userAgent: reader.readStringOrNull(offsets[52]), ); object.chapterFilterBookmarkedList = reader.readObjectList( - offsets[2], + offsets[9], ChapterFilterBookmarkedSchema.deserialize, allOffsets, ChapterFilterBookmarked(), ); object.chapterFilterUnreadList = reader.readObjectList( - offsets[4], + offsets[11], ChapterFilterUnreadSchema.deserialize, allOffsets, ChapterFilterUnread(), ); object.filterScanlatorList = reader.readObjectList( - offsets[15], + offsets[22], FilterScanlatorSchema.deserialize, allOffsets, FilterScanlator(), ); object.locale = reader.readObjectOrNull( - offsets[29], + offsets[40], L10nLocaleSchema.deserialize, allOffsets, ); @@ -662,146 +767,188 @@ P _settingsDeserializeProp

( case 0: return (reader.readBoolOrNull(offset)) as P; case 1: - return (reader.readBoolOrNull(offset)) as P; + return (_SettingsanimeDisplayTypeValueEnumMap[ + reader.readByteOrNull(offset)] ?? + DisplayType.compactGrid) as P; case 2: + return (reader.readBoolOrNull(offset)) as P; + case 3: + return (reader.readBoolOrNull(offset)) as P; + case 4: + return (reader.readBoolOrNull(offset)) as P; + case 5: + return (reader.readBoolOrNull(offset)) as P; + case 6: + return (reader.readBoolOrNull(offset)) as P; + case 7: + return (reader.readBoolOrNull(offset)) as P; + case 8: + return (reader.readBoolOrNull(offset)) as P; + case 9: return (reader.readObjectList( offset, ChapterFilterBookmarkedSchema.deserialize, allOffsets, ChapterFilterBookmarked(), )) as P; - case 3: + case 10: return (reader.readObjectList( offset, ChapterFilterDownloadedSchema.deserialize, allOffsets, ChapterFilterDownloaded(), )) as P; - case 4: + case 11: return (reader.readObjectList( offset, ChapterFilterUnreadSchema.deserialize, allOffsets, ChapterFilterUnread(), )) as P; - case 5: + case 12: return (reader.readObjectList( offset, ChapterPageIndexSchema.deserialize, allOffsets, ChapterPageIndex(), )) as P; - case 6: + case 13: return (reader.readObjectList( offset, ChapterPageurlsSchema.deserialize, allOffsets, ChapterPageurls(), )) as P; - case 7: + case 14: return (reader.readObjectList( offset, CookieSchema.deserialize, allOffsets, Cookie(), )) as P; - case 8: + case 15: return (reader.readBoolOrNull(offset)) as P; - case 9: + case 16: return (reader.readStringOrNull(offset)) as P; - case 10: + case 17: return (_SettingsdefaultReaderModeValueEnumMap[ reader.readByteOrNull(offset)] ?? ReaderMode.vertical) as P; - case 11: + case 18: return (_SettingsdisplayTypeValueEnumMap[reader.readByteOrNull(offset)] ?? DisplayType.compactGrid) as P; - case 12: + case 19: return (reader.readLongOrNull(offset)) as P; - case 13: + case 20: return (reader.readStringOrNull(offset)) as P; - case 14: + case 21: return (reader.readBoolOrNull(offset)) as P; - case 15: + case 22: return (reader.readObjectList( offset, FilterScanlatorSchema.deserialize, allOffsets, FilterScanlator(), )) as P; - case 16: - return (reader.readDoubleOrNull(offset)) as P; - case 17: - return (reader.readLongOrNull(offset)) as P; - case 18: - return (reader.readBoolOrNull(offset)) as P; - case 19: - return (reader.readBoolOrNull(offset)) as P; - case 20: - return (reader.readLongOrNull(offset)) as P; - case 21: - return (reader.readLongOrNull(offset)) as P; - case 22: - return (reader.readLongOrNull(offset)) as P; case 23: - return (reader.readLongOrNull(offset)) as P; + return (reader.readDoubleOrNull(offset)) as P; case 24: - return (reader.readBoolOrNull(offset)) as P; + return (reader.readLongOrNull(offset)) as P; case 25: return (reader.readBoolOrNull(offset)) as P; case 26: return (reader.readBoolOrNull(offset)) as P; case 27: - return (reader.readBoolOrNull(offset)) as P; + return (reader.readLongOrNull(offset)) as P; case 28: - return (reader.readBoolOrNull(offset)) as P; + return (reader.readLongOrNull(offset)) as P; case 29: + return (reader.readLongOrNull(offset)) as P; + case 30: + return (reader.readLongOrNull(offset)) as P; + case 31: + return (reader.readLongOrNull(offset)) as P; + case 32: + return (reader.readLongOrNull(offset)) as P; + case 33: + return (reader.readLongOrNull(offset)) as P; + case 34: + return (reader.readLongOrNull(offset)) as P; + case 35: + return (reader.readBoolOrNull(offset)) as P; + case 36: + return (reader.readBoolOrNull(offset)) as P; + case 37: + return (reader.readBoolOrNull(offset)) as P; + case 38: + return (reader.readBoolOrNull(offset)) as P; + case 39: + return (reader.readBoolOrNull(offset)) as P; + case 40: return (reader.readObjectOrNull( offset, L10nLocaleSchema.deserialize, allOffsets, )) as P; - case 30: + case 41: return (reader.readBoolOrNull(offset)) as P; - case 31: + case 42: return (reader.readObjectList( offset, PersonalReaderModeSchema.deserialize, allOffsets, PersonalReaderMode(), )) as P; - case 32: + case 43: return (reader.readBoolOrNull(offset)) as P; - case 33: + case 44: return (reader.readLongOrNull(offset)) as P; - case 34: + case 45: return (reader.readBoolOrNull(offset)) as P; - case 35: + case 46: return (reader.readBoolOrNull(offset)) as P; - case 36: + case 47: return (reader.readBoolOrNull(offset)) as P; - case 37: + case 48: return (reader.readObjectList( offset, SortChapterSchema.deserialize, allOffsets, SortChapter(), )) as P; - case 38: + case 49: return (reader.readObjectOrNull( offset, SortLibraryMangaSchema.deserialize, allOffsets, )) as P; - case 39: + case 50: + return (reader.readObjectOrNull( + offset, + SortLibraryMangaSchema.deserialize, + allOffsets, + )) as P; + case 51: return (reader.readBoolOrNull(offset)) as P; - case 40: + case 52: return (reader.readStringOrNull(offset)) as P; default: throw IsarError('Unknown property with id $propertyId'); } } +const _SettingsanimeDisplayTypeEnumValueMap = { + 'compactGrid': 0, + 'comfortableGrid': 1, + 'coverOnlyGrid': 2, + 'list': 3, +}; +const _SettingsanimeDisplayTypeValueEnumMap = { + 0: DisplayType.compactGrid, + 1: DisplayType.comfortableGrid, + 2: DisplayType.coverOnlyGrid, + 3: DisplayType.list, +}; const _SettingsdefaultReaderModeEnumValueMap = { 'vertical': 0, 'ltr': 1, @@ -947,6 +1094,230 @@ extension SettingsQueryFilter }); } + QueryBuilder + animeDisplayTypeEqualTo(DisplayType value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'animeDisplayType', + value: value, + )); + }); + } + + QueryBuilder + animeDisplayTypeGreaterThan( + DisplayType value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'animeDisplayType', + value: value, + )); + }); + } + + QueryBuilder + animeDisplayTypeLessThan( + DisplayType value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'animeDisplayType', + value: value, + )); + }); + } + + QueryBuilder + animeDisplayTypeBetween( + DisplayType lower, + DisplayType upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'animeDisplayType', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder + animeLibraryDownloadedChaptersIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'animeLibraryDownloadedChapters', + )); + }); + } + + QueryBuilder + animeLibraryDownloadedChaptersIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'animeLibraryDownloadedChapters', + )); + }); + } + + QueryBuilder + animeLibraryDownloadedChaptersEqualTo(bool? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'animeLibraryDownloadedChapters', + value: value, + )); + }); + } + + QueryBuilder + animeLibraryLocalSourceIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'animeLibraryLocalSource', + )); + }); + } + + QueryBuilder + animeLibraryLocalSourceIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'animeLibraryLocalSource', + )); + }); + } + + QueryBuilder + animeLibraryLocalSourceEqualTo(bool? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'animeLibraryLocalSource', + value: value, + )); + }); + } + + QueryBuilder + animeLibraryShowCategoryTabsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'animeLibraryShowCategoryTabs', + )); + }); + } + + QueryBuilder + animeLibraryShowCategoryTabsIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'animeLibraryShowCategoryTabs', + )); + }); + } + + QueryBuilder + animeLibraryShowCategoryTabsEqualTo(bool? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'animeLibraryShowCategoryTabs', + value: value, + )); + }); + } + + QueryBuilder + animeLibraryShowContinueReadingButtonIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'animeLibraryShowContinueReadingButton', + )); + }); + } + + QueryBuilder + animeLibraryShowContinueReadingButtonIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'animeLibraryShowContinueReadingButton', + )); + }); + } + + QueryBuilder + animeLibraryShowContinueReadingButtonEqualTo(bool? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'animeLibraryShowContinueReadingButton', + value: value, + )); + }); + } + + QueryBuilder + animeLibraryShowLanguageIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'animeLibraryShowLanguage', + )); + }); + } + + QueryBuilder + animeLibraryShowLanguageIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'animeLibraryShowLanguage', + )); + }); + } + + QueryBuilder + animeLibraryShowLanguageEqualTo(bool? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'animeLibraryShowLanguage', + value: value, + )); + }); + } + + QueryBuilder + animeLibraryShowNumbersOfItemsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'animeLibraryShowNumbersOfItems', + )); + }); + } + + QueryBuilder + animeLibraryShowNumbersOfItemsIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'animeLibraryShowNumbersOfItems', + )); + }); + } + + QueryBuilder + animeLibraryShowNumbersOfItemsEqualTo(bool? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'animeLibraryShowNumbersOfItems', + value: value, + )); + }); + } + QueryBuilder autoUpdateExtensionsIsNull() { return QueryBuilder.apply(this, (query) { @@ -2545,6 +2916,302 @@ extension SettingsQueryFilter }); } + QueryBuilder + libraryFilterAnimeBookMarkedTypeIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'libraryFilterAnimeBookMarkedType', + )); + }); + } + + QueryBuilder + libraryFilterAnimeBookMarkedTypeIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'libraryFilterAnimeBookMarkedType', + )); + }); + } + + QueryBuilder + libraryFilterAnimeBookMarkedTypeEqualTo(int? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'libraryFilterAnimeBookMarkedType', + value: value, + )); + }); + } + + QueryBuilder + libraryFilterAnimeBookMarkedTypeGreaterThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'libraryFilterAnimeBookMarkedType', + value: value, + )); + }); + } + + QueryBuilder + libraryFilterAnimeBookMarkedTypeLessThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'libraryFilterAnimeBookMarkedType', + value: value, + )); + }); + } + + QueryBuilder + libraryFilterAnimeBookMarkedTypeBetween( + int? lower, + int? upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'libraryFilterAnimeBookMarkedType', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder + libraryFilterAnimeDownloadTypeIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'libraryFilterAnimeDownloadType', + )); + }); + } + + QueryBuilder + libraryFilterAnimeDownloadTypeIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'libraryFilterAnimeDownloadType', + )); + }); + } + + QueryBuilder + libraryFilterAnimeDownloadTypeEqualTo(int? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'libraryFilterAnimeDownloadType', + value: value, + )); + }); + } + + QueryBuilder + libraryFilterAnimeDownloadTypeGreaterThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'libraryFilterAnimeDownloadType', + value: value, + )); + }); + } + + QueryBuilder + libraryFilterAnimeDownloadTypeLessThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'libraryFilterAnimeDownloadType', + value: value, + )); + }); + } + + QueryBuilder + libraryFilterAnimeDownloadTypeBetween( + int? lower, + int? upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'libraryFilterAnimeDownloadType', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder + libraryFilterAnimeStartedTypeIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'libraryFilterAnimeStartedType', + )); + }); + } + + QueryBuilder + libraryFilterAnimeStartedTypeIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'libraryFilterAnimeStartedType', + )); + }); + } + + QueryBuilder + libraryFilterAnimeStartedTypeEqualTo(int? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'libraryFilterAnimeStartedType', + value: value, + )); + }); + } + + QueryBuilder + libraryFilterAnimeStartedTypeGreaterThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'libraryFilterAnimeStartedType', + value: value, + )); + }); + } + + QueryBuilder + libraryFilterAnimeStartedTypeLessThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'libraryFilterAnimeStartedType', + value: value, + )); + }); + } + + QueryBuilder + libraryFilterAnimeStartedTypeBetween( + int? lower, + int? upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'libraryFilterAnimeStartedType', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder + libraryFilterAnimeUnreadTypeIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'libraryFilterAnimeUnreadType', + )); + }); + } + + QueryBuilder + libraryFilterAnimeUnreadTypeIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'libraryFilterAnimeUnreadType', + )); + }); + } + + QueryBuilder + libraryFilterAnimeUnreadTypeEqualTo(int? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'libraryFilterAnimeUnreadType', + value: value, + )); + }); + } + + QueryBuilder + libraryFilterAnimeUnreadTypeGreaterThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'libraryFilterAnimeUnreadType', + value: value, + )); + }); + } + + QueryBuilder + libraryFilterAnimeUnreadTypeLessThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'libraryFilterAnimeUnreadType', + value: value, + )); + }); + } + + QueryBuilder + libraryFilterAnimeUnreadTypeBetween( + int? lower, + int? upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'libraryFilterAnimeUnreadType', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + QueryBuilder libraryFilterMangasBookMarkedTypeIsNull() { return QueryBuilder.apply(this, (query) { @@ -3423,6 +4090,24 @@ extension SettingsQueryFilter }); } + QueryBuilder + sortLibraryAnimeIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'sortLibraryAnime', + )); + }); + } + + QueryBuilder + sortLibraryAnimeIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'sortLibraryAnime', + )); + }); + } + QueryBuilder sortLibraryMangaIsNull() { return QueryBuilder.apply(this, (query) { @@ -3690,6 +4375,13 @@ extension SettingsQueryObject }); } + QueryBuilder sortLibraryAnime( + FilterQuery q) { + return QueryBuilder.apply(this, (query) { + return query.object(q, r'sortLibraryAnime'); + }); + } + QueryBuilder sortLibraryManga( FilterQuery q) { return QueryBuilder.apply(this, (query) { @@ -3773,6 +4465,104 @@ extension SettingsQuerySortBy on QueryBuilder { }); } + QueryBuilder sortByAnimeDisplayType() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeDisplayType', Sort.asc); + }); + } + + QueryBuilder sortByAnimeDisplayTypeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeDisplayType', Sort.desc); + }); + } + + QueryBuilder + sortByAnimeLibraryDownloadedChapters() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryDownloadedChapters', Sort.asc); + }); + } + + QueryBuilder + sortByAnimeLibraryDownloadedChaptersDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryDownloadedChapters', Sort.desc); + }); + } + + QueryBuilder + sortByAnimeLibraryLocalSource() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryLocalSource', Sort.asc); + }); + } + + QueryBuilder + sortByAnimeLibraryLocalSourceDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryLocalSource', Sort.desc); + }); + } + + QueryBuilder + sortByAnimeLibraryShowCategoryTabs() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryShowCategoryTabs', Sort.asc); + }); + } + + QueryBuilder + sortByAnimeLibraryShowCategoryTabsDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryShowCategoryTabs', Sort.desc); + }); + } + + QueryBuilder + sortByAnimeLibraryShowContinueReadingButton() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + r'animeLibraryShowContinueReadingButton', Sort.asc); + }); + } + + QueryBuilder + sortByAnimeLibraryShowContinueReadingButtonDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + r'animeLibraryShowContinueReadingButton', Sort.desc); + }); + } + + QueryBuilder + sortByAnimeLibraryShowLanguage() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryShowLanguage', Sort.asc); + }); + } + + QueryBuilder + sortByAnimeLibraryShowLanguageDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryShowLanguage', Sort.desc); + }); + } + + QueryBuilder + sortByAnimeLibraryShowNumbersOfItems() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryShowNumbersOfItems', Sort.asc); + }); + } + + QueryBuilder + sortByAnimeLibraryShowNumbersOfItemsDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryShowNumbersOfItems', Sort.desc); + }); + } + QueryBuilder sortByAutoUpdateExtensions() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'autoUpdateExtensions', Sort.asc); @@ -3926,6 +4716,62 @@ extension SettingsQuerySortBy on QueryBuilder { }); } + QueryBuilder + sortByLibraryFilterAnimeBookMarkedType() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'libraryFilterAnimeBookMarkedType', Sort.asc); + }); + } + + QueryBuilder + sortByLibraryFilterAnimeBookMarkedTypeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'libraryFilterAnimeBookMarkedType', Sort.desc); + }); + } + + QueryBuilder + sortByLibraryFilterAnimeDownloadType() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'libraryFilterAnimeDownloadType', Sort.asc); + }); + } + + QueryBuilder + sortByLibraryFilterAnimeDownloadTypeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'libraryFilterAnimeDownloadType', Sort.desc); + }); + } + + QueryBuilder + sortByLibraryFilterAnimeStartedType() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'libraryFilterAnimeStartedType', Sort.asc); + }); + } + + QueryBuilder + sortByLibraryFilterAnimeStartedTypeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'libraryFilterAnimeStartedType', Sort.desc); + }); + } + + QueryBuilder + sortByLibraryFilterAnimeUnreadType() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'libraryFilterAnimeUnreadType', Sort.asc); + }); + } + + QueryBuilder + sortByLibraryFilterAnimeUnreadTypeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'libraryFilterAnimeUnreadType', Sort.desc); + }); + } + QueryBuilder sortByLibraryFilterMangasBookMarkedType() { return QueryBuilder.apply(this, (query) { @@ -4166,6 +5012,104 @@ extension SettingsQuerySortThenBy }); } + QueryBuilder thenByAnimeDisplayType() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeDisplayType', Sort.asc); + }); + } + + QueryBuilder thenByAnimeDisplayTypeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeDisplayType', Sort.desc); + }); + } + + QueryBuilder + thenByAnimeLibraryDownloadedChapters() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryDownloadedChapters', Sort.asc); + }); + } + + QueryBuilder + thenByAnimeLibraryDownloadedChaptersDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryDownloadedChapters', Sort.desc); + }); + } + + QueryBuilder + thenByAnimeLibraryLocalSource() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryLocalSource', Sort.asc); + }); + } + + QueryBuilder + thenByAnimeLibraryLocalSourceDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryLocalSource', Sort.desc); + }); + } + + QueryBuilder + thenByAnimeLibraryShowCategoryTabs() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryShowCategoryTabs', Sort.asc); + }); + } + + QueryBuilder + thenByAnimeLibraryShowCategoryTabsDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryShowCategoryTabs', Sort.desc); + }); + } + + QueryBuilder + thenByAnimeLibraryShowContinueReadingButton() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + r'animeLibraryShowContinueReadingButton', Sort.asc); + }); + } + + QueryBuilder + thenByAnimeLibraryShowContinueReadingButtonDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + r'animeLibraryShowContinueReadingButton', Sort.desc); + }); + } + + QueryBuilder + thenByAnimeLibraryShowLanguage() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryShowLanguage', Sort.asc); + }); + } + + QueryBuilder + thenByAnimeLibraryShowLanguageDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryShowLanguage', Sort.desc); + }); + } + + QueryBuilder + thenByAnimeLibraryShowNumbersOfItems() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryShowNumbersOfItems', Sort.asc); + }); + } + + QueryBuilder + thenByAnimeLibraryShowNumbersOfItemsDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'animeLibraryShowNumbersOfItems', Sort.desc); + }); + } + QueryBuilder thenByAutoUpdateExtensions() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'autoUpdateExtensions', Sort.asc); @@ -4331,6 +5275,62 @@ extension SettingsQuerySortThenBy }); } + QueryBuilder + thenByLibraryFilterAnimeBookMarkedType() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'libraryFilterAnimeBookMarkedType', Sort.asc); + }); + } + + QueryBuilder + thenByLibraryFilterAnimeBookMarkedTypeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'libraryFilterAnimeBookMarkedType', Sort.desc); + }); + } + + QueryBuilder + thenByLibraryFilterAnimeDownloadType() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'libraryFilterAnimeDownloadType', Sort.asc); + }); + } + + QueryBuilder + thenByLibraryFilterAnimeDownloadTypeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'libraryFilterAnimeDownloadType', Sort.desc); + }); + } + + QueryBuilder + thenByLibraryFilterAnimeStartedType() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'libraryFilterAnimeStartedType', Sort.asc); + }); + } + + QueryBuilder + thenByLibraryFilterAnimeStartedTypeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'libraryFilterAnimeStartedType', Sort.desc); + }); + } + + QueryBuilder + thenByLibraryFilterAnimeUnreadType() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'libraryFilterAnimeUnreadType', Sort.asc); + }); + } + + QueryBuilder + thenByLibraryFilterAnimeUnreadTypeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'libraryFilterAnimeUnreadType', Sort.desc); + }); + } + QueryBuilder thenByLibraryFilterMangasBookMarkedType() { return QueryBuilder.apply(this, (query) { @@ -4564,6 +5564,54 @@ extension SettingsQueryWhereDistinct }); } + QueryBuilder distinctByAnimeDisplayType() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'animeDisplayType'); + }); + } + + QueryBuilder + distinctByAnimeLibraryDownloadedChapters() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'animeLibraryDownloadedChapters'); + }); + } + + QueryBuilder + distinctByAnimeLibraryLocalSource() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'animeLibraryLocalSource'); + }); + } + + QueryBuilder + distinctByAnimeLibraryShowCategoryTabs() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'animeLibraryShowCategoryTabs'); + }); + } + + QueryBuilder + distinctByAnimeLibraryShowContinueReadingButton() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'animeLibraryShowContinueReadingButton'); + }); + } + + QueryBuilder + distinctByAnimeLibraryShowLanguage() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'animeLibraryShowLanguage'); + }); + } + + QueryBuilder + distinctByAnimeLibraryShowNumbersOfItems() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'animeLibraryShowNumbersOfItems'); + }); + } + QueryBuilder distinctByAutoUpdateExtensions() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'autoUpdateExtensions'); @@ -4642,6 +5690,34 @@ extension SettingsQueryWhereDistinct }); } + QueryBuilder + distinctByLibraryFilterAnimeBookMarkedType() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'libraryFilterAnimeBookMarkedType'); + }); + } + + QueryBuilder + distinctByLibraryFilterAnimeDownloadType() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'libraryFilterAnimeDownloadType'); + }); + } + + QueryBuilder + distinctByLibraryFilterAnimeStartedType() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'libraryFilterAnimeStartedType'); + }); + } + + QueryBuilder + distinctByLibraryFilterAnimeUnreadType() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'libraryFilterAnimeUnreadType'); + }); + } + QueryBuilder distinctByLibraryFilterMangasBookMarkedType() { return QueryBuilder.apply(this, (query) { @@ -4769,6 +5845,55 @@ extension SettingsQueryProperty }); } + QueryBuilder + animeDisplayTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'animeDisplayType'); + }); + } + + QueryBuilder + animeLibraryDownloadedChaptersProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'animeLibraryDownloadedChapters'); + }); + } + + QueryBuilder + animeLibraryLocalSourceProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'animeLibraryLocalSource'); + }); + } + + QueryBuilder + animeLibraryShowCategoryTabsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'animeLibraryShowCategoryTabs'); + }); + } + + QueryBuilder + animeLibraryShowContinueReadingButtonProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'animeLibraryShowContinueReadingButton'); + }); + } + + QueryBuilder + animeLibraryShowLanguageProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'animeLibraryShowLanguage'); + }); + } + + QueryBuilder + animeLibraryShowNumbersOfItemsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'animeLibraryShowNumbersOfItems'); + }); + } + QueryBuilder autoUpdateExtensionsProperty() { return QueryBuilder.apply(this, (query) { @@ -4896,6 +6021,34 @@ extension SettingsQueryProperty }); } + QueryBuilder + libraryFilterAnimeBookMarkedTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'libraryFilterAnimeBookMarkedType'); + }); + } + + QueryBuilder + libraryFilterAnimeDownloadTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'libraryFilterAnimeDownloadType'); + }); + } + + QueryBuilder + libraryFilterAnimeStartedTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'libraryFilterAnimeStartedType'); + }); + } + + QueryBuilder + libraryFilterAnimeUnreadTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'libraryFilterAnimeUnreadType'); + }); + } + QueryBuilder libraryFilterMangasBookMarkedTypeProperty() { return QueryBuilder.apply(this, (query) { @@ -5015,6 +6168,13 @@ extension SettingsQueryProperty }); } + QueryBuilder + sortLibraryAnimeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'sortLibraryAnime'); + }); + } + QueryBuilder sortLibraryMangaProperty() { return QueryBuilder.apply(this, (query) { diff --git a/lib/models/source.dart b/lib/models/source.dart index cba2528..35f64e3 100644 --- a/lib/models/source.dart +++ b/lib/models/source.dart @@ -46,6 +46,8 @@ class Source { String? headers; + bool? isManga; + Source({ this.id = 0, this.name = '', @@ -68,6 +70,7 @@ class Source { this.versionLast = "", this.sourceCode = '', this.headers = '', + this.isManga = true, }); Source.fromJson(Map json) { name = json['name']; @@ -83,93 +86,6 @@ class Source { sourceCodeUrl = json['sourceCodeUrl']; apiUrl = json['apiUrl']; version = json['version']; + isManga = json['isManga'] ?? true; } } - -// enum TypeSource { -// single, - -// mangathemesia, - -// comick, - -// mmrcms, - -// heancms, - -// madara, - -// mangadex -// } - -// class Source { -// String? name; - -// String? baseUrl; - -// String? lang; - -// bool? isActive; - -// bool? isAdded; - -// bool? isPinned; - -// bool? lastUsed; - -// bool? isFullData; - -// bool? isNsfw; - -// String? sourceCodeUrl; - -// String? typeSource; - -// String? iconUrl; - -// bool? hasCloudflare; - -// String? dateFormat; - -// String? dateFormatLocale; - -// String? apiUrl; - -// String? version; - -// Source({ -// this.name = "", -// this.baseUrl = "", -// this.lang = "", -// this.typeSource = "", -// this.iconUrl = "", -// this.dateFormat, -// this.dateFormatLocale, -// this.isActive = true, -// this.isAdded = false, -// this.isNsfw = false, -// this.isFullData = false, -// this.hasCloudflare = false, -// this.isPinned = false, -// this.lastUsed = false, -// this.sourceCodeUrl = "", -// this.apiUrl = "", -// this.version = "", -// }); - -// Source.fromJson(Map json) { -// name = json['name']; -// id = json['id']; -// baseUrl = json['baseUrl']; -// lang = json['lang']; -// typeSource = json['typeSource']; -// iconUrl = json['iconUrl']; -// dateFormat = json['dateFormat']; -// dateFormatLocale = json['dateFormatLocale']; -// isNsfw = json['isNsfw']; -// hasCloudflare = json['hasCloudflare']; -// sourceCodeUrl = json['sourceCodeUrl']; -// apiUrl = json['apiUrl']; -// version = json['version']; -// } -// } diff --git a/lib/models/source.g.dart b/lib/models/source.g.dart index 6c39c7a..bb8026a 100644 --- a/lib/models/source.g.dart +++ b/lib/models/source.g.dart @@ -67,53 +67,58 @@ const SourceSchema = CollectionSchema( name: r'isFullData', type: IsarType.bool, ), - r'isNsfw': PropertySchema( + r'isManga': PropertySchema( id: 10, + name: r'isManga', + type: IsarType.bool, + ), + r'isNsfw': PropertySchema( + id: 11, name: r'isNsfw', type: IsarType.bool, ), r'isPinned': PropertySchema( - id: 11, + id: 12, name: r'isPinned', type: IsarType.bool, ), r'lang': PropertySchema( - id: 12, + id: 13, name: r'lang', type: IsarType.string, ), r'lastUsed': PropertySchema( - id: 13, + id: 14, name: r'lastUsed', type: IsarType.bool, ), r'name': PropertySchema( - id: 14, + id: 15, name: r'name', type: IsarType.string, ), r'sourceCode': PropertySchema( - id: 15, + id: 16, name: r'sourceCode', type: IsarType.string, ), r'sourceCodeUrl': PropertySchema( - id: 16, + id: 17, name: r'sourceCodeUrl', type: IsarType.string, ), r'typeSource': PropertySchema( - id: 17, + id: 18, name: r'typeSource', type: IsarType.string, ), r'version': PropertySchema( - id: 18, + id: 19, name: r'version', type: IsarType.string, ), r'versionLast': PropertySchema( - id: 19, + id: 20, name: r'versionLast', type: IsarType.string, ) @@ -235,16 +240,17 @@ void _sourceSerialize( writer.writeBool(offsets[7], object.isActive); writer.writeBool(offsets[8], object.isAdded); writer.writeBool(offsets[9], object.isFullData); - writer.writeBool(offsets[10], object.isNsfw); - writer.writeBool(offsets[11], object.isPinned); - writer.writeString(offsets[12], object.lang); - writer.writeBool(offsets[13], object.lastUsed); - writer.writeString(offsets[14], object.name); - writer.writeString(offsets[15], object.sourceCode); - writer.writeString(offsets[16], object.sourceCodeUrl); - writer.writeString(offsets[17], object.typeSource); - writer.writeString(offsets[18], object.version); - writer.writeString(offsets[19], object.versionLast); + writer.writeBool(offsets[10], object.isManga); + writer.writeBool(offsets[11], object.isNsfw); + writer.writeBool(offsets[12], object.isPinned); + writer.writeString(offsets[13], object.lang); + writer.writeBool(offsets[14], object.lastUsed); + writer.writeString(offsets[15], object.name); + writer.writeString(offsets[16], object.sourceCode); + writer.writeString(offsets[17], object.sourceCodeUrl); + writer.writeString(offsets[18], object.typeSource); + writer.writeString(offsets[19], object.version); + writer.writeString(offsets[20], object.versionLast); } Source _sourceDeserialize( @@ -265,16 +271,17 @@ Source _sourceDeserialize( isActive: reader.readBoolOrNull(offsets[7]), isAdded: reader.readBoolOrNull(offsets[8]), isFullData: reader.readBoolOrNull(offsets[9]), - isNsfw: reader.readBoolOrNull(offsets[10]), - isPinned: reader.readBoolOrNull(offsets[11]), - lang: reader.readStringOrNull(offsets[12]), - lastUsed: reader.readBoolOrNull(offsets[13]), - name: reader.readStringOrNull(offsets[14]), - sourceCode: reader.readStringOrNull(offsets[15]), - sourceCodeUrl: reader.readStringOrNull(offsets[16]), - typeSource: reader.readStringOrNull(offsets[17]), - version: reader.readStringOrNull(offsets[18]), - versionLast: reader.readStringOrNull(offsets[19]), + isManga: reader.readBoolOrNull(offsets[10]), + isNsfw: reader.readBoolOrNull(offsets[11]), + isPinned: reader.readBoolOrNull(offsets[12]), + lang: reader.readStringOrNull(offsets[13]), + lastUsed: reader.readBoolOrNull(offsets[14]), + name: reader.readStringOrNull(offsets[15]), + sourceCode: reader.readStringOrNull(offsets[16]), + sourceCodeUrl: reader.readStringOrNull(offsets[17]), + typeSource: reader.readStringOrNull(offsets[18]), + version: reader.readStringOrNull(offsets[19]), + versionLast: reader.readStringOrNull(offsets[20]), ); return object; } @@ -311,11 +318,11 @@ P _sourceDeserializeProp

( case 11: return (reader.readBoolOrNull(offset)) as P; case 12: - return (reader.readStringOrNull(offset)) as P; - case 13: return (reader.readBoolOrNull(offset)) as P; - case 14: + case 13: return (reader.readStringOrNull(offset)) as P; + case 14: + return (reader.readBoolOrNull(offset)) as P; case 15: return (reader.readStringOrNull(offset)) as P; case 16: @@ -326,6 +333,8 @@ P _sourceDeserializeProp

( return (reader.readStringOrNull(offset)) as P; case 19: return (reader.readStringOrNull(offset)) as P; + case 20: + return (reader.readStringOrNull(offset)) as P; default: throw IsarError('Unknown property with id $propertyId'); } @@ -1472,6 +1481,32 @@ extension SourceQueryFilter on QueryBuilder { }); } + QueryBuilder isMangaIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'isManga', + )); + }); + } + + QueryBuilder isMangaIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'isManga', + )); + }); + } + + QueryBuilder isMangaEqualTo( + bool? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'isManga', + value: value, + )); + }); + } + QueryBuilder isNsfwIsNull() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(const FilterCondition.isNull( @@ -2697,6 +2732,18 @@ extension SourceQuerySortBy on QueryBuilder { }); } + QueryBuilder sortByIsManga() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'isManga', Sort.asc); + }); + } + + QueryBuilder sortByIsMangaDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'isManga', Sort.desc); + }); + } + QueryBuilder sortByIsNsfw() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'isNsfw', Sort.asc); @@ -2951,6 +2998,18 @@ extension SourceQuerySortThenBy on QueryBuilder { }); } + QueryBuilder thenByIsManga() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'isManga', Sort.asc); + }); + } + + QueryBuilder thenByIsMangaDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'isManga', Sort.desc); + }); + } + QueryBuilder thenByIsNsfw() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'isNsfw', Sort.asc); @@ -3140,6 +3199,12 @@ extension SourceQueryWhereDistinct on QueryBuilder { }); } + QueryBuilder distinctByIsManga() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'isManga'); + }); + } + QueryBuilder distinctByIsNsfw() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'isNsfw'); @@ -3276,6 +3341,12 @@ extension SourceQueryProperty on QueryBuilder { }); } + QueryBuilder isMangaProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'isManga'); + }); + } + QueryBuilder isNsfwProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'isNsfw'); diff --git a/lib/models/track.dart b/lib/models/track.dart index 9f4b8b2..2181e16 100644 --- a/lib/models/track.dart +++ b/lib/models/track.dart @@ -47,4 +47,14 @@ class Track { this.trackingUrl}); } -enum TrackStatus { reading, completed, onHold, dropped, planToRead, rereading } +enum TrackStatus { + reading, + completed, + onHold, + dropped, + planToRead, + rereading, + watching, + planToWatch, + reWatching +} diff --git a/lib/models/track.g.dart b/lib/models/track.g.dart index 352b8cd..8a14ae1 100644 --- a/lib/models/track.g.dart +++ b/lib/models/track.g.dart @@ -203,6 +203,9 @@ const _TrackstatusEnumValueMap = { 'dropped': 3, 'planToRead': 4, 'rereading': 5, + 'watching': 6, + 'planToWatch': 7, + 'reWatching': 8, }; const _TrackstatusValueEnumMap = { 0: TrackStatus.reading, @@ -211,6 +214,9 @@ const _TrackstatusValueEnumMap = { 3: TrackStatus.dropped, 4: TrackStatus.planToRead, 5: TrackStatus.rereading, + 6: TrackStatus.watching, + 7: TrackStatus.planToWatch, + 8: TrackStatus.reWatching, }; Id _trackGetId(Track object) { diff --git a/lib/models/video.dart b/lib/models/video.dart new file mode 100644 index 0000000..386340b --- /dev/null +++ b/lib/models/video.dart @@ -0,0 +1,8 @@ +class Video { + final String url; + final String quality; + final String originalUrl; + final Map? headers; + + Video(this.url, this.quality, this.originalUrl, {this.headers}); +} \ No newline at end of file diff --git a/lib/modules/anime/anime_stream_view.dart b/lib/modules/anime/anime_stream_view.dart new file mode 100644 index 0000000..460552c --- /dev/null +++ b/lib/modules/anime/anime_stream_view.dart @@ -0,0 +1,296 @@ +import 'dart:async'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_meedu_videoplayer/meedu_player.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart' as riv; +import 'package:mangayomi/models/chapter.dart'; +import 'package:mangayomi/models/video.dart'; +import 'package:mangayomi/modules/anime/providers/stream_controller_provider.dart'; +import 'package:mangayomi/modules/widgets/progress_center.dart'; +import 'package:mangayomi/services/get_anime_servers.dart'; +import 'package:mangayomi/utils/media_query.dart'; + +class AnimeStreamView extends riv.ConsumerWidget { + final Chapter episode; + const AnimeStreamView({ + super.key, + required this.episode, + }); + + @override + Widget build(BuildContext context, WidgetRef ref) { + SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky, + overlays: []); + final serversData = ref.watch(getAnimeServersProvider( + chapter: episode, + )); + return serversData.when( + data: (data) { + if (data.isEmpty && + (episode.manga.value!.isLocalArchive ?? false) == false) { + return Scaffold( + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + appBar: AppBar( + title: const Text(''), + leading: BackButton( + onPressed: () { + SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, + overlays: SystemUiOverlay.values); + Navigator.pop(context); + }, + ), + ), + body: WillPopScope( + onWillPop: () async { + SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, + overlays: SystemUiOverlay.values); + Navigator.pop(context); + return false; + }, + child: const Center( + child: Text("Error"), + ), + ), + ); + } + return AnimeStreamPage( + episode: episode, + videos: data, + ); + }, + error: (error, stackTrace) => Scaffold( + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + appBar: AppBar( + title: const Text(''), + leading: BackButton( + onPressed: () { + SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, + overlays: SystemUiOverlay.values); + Navigator.pop(context); + }, + ), + ), + body: WillPopScope( + onWillPop: () async { + SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, + overlays: SystemUiOverlay.values); + Navigator.pop(context); + return false; + }, + child: Center( + child: Text(error.toString()), + ), + ), + ), + loading: () { + return Scaffold( + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + body: WillPopScope( + onWillPop: () async { + SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, + overlays: SystemUiOverlay.values); + Navigator.pop(context); + return false; + }, + child: Stack( + children: [ + MeeduVideoPlayer( + header: (context, controller, responsive) => AppBar( + leading: BackButton( + color: Colors.white, + onPressed: () { + SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, + overlays: SystemUiOverlay.values); + Navigator.pop(context); + }, + ), + ), + controller: MeeduPlayerController( + autoHideControls: false, + enabledButtons: + const EnabledButtons(playPauseAndRepeat: false), + screenManager: const ScreenManager( + forceLandScapeInFullscreen: false, + ), + ), + ), + const ProgressCenter(), + ], + ), + ), + ); + }, + ); + } +} + +class AnimeStreamPage extends StatefulWidget { + final List