worldhopper/lib/providers/publication_cache_provider.g.dart
Felipe M. 58a562abe8
feat: refactor server software abstraction with Kavita REST API integration
Rename all OPDS-prefixed models to generic names (Server, Feed, Entry,
Link, StreamLink), expand the ServerSoftware interface to cover all
server interactions, and implement a full Kavita REST API client that
replaces the OPDS delegation.

- Rename OPDS* models to generic names across ~60 files
- Add database migrations 13 (opds_id → entry_id) and 14 (unify credentials)
- Create OPDSServerSoftware wrapping existing OPDS services
- Create KavitaApiClient for direct Kavita REST API calls
- Create KavitaFeedMapper to convert Kavita JSON to Feed/Entry models
- Rewrite KavitaServerSoftware to use native API (no OPDS delegation)
- Unify server credentials (remove softwareUsername/softwarePassword)
- Simplify add/edit server UI to single auth section
- Add test connection button to server add/edit screens
- Add progress indicator to PublicationCard using local and server data
- Eliminate softwareType branching in reader screens
- Add EntryProgress and fetchEntryProgress to ServerSoftware interface
- Fix Entry.acquisitionLink crash on empty links
- Add 59 new tests covering models, services, and providers
2026-04-06 17:46:48 +02:00

274 lines
8.1 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'publication_cache_provider.dart';
// **************************************************************************
// RiverpodGenerator
// **************************************************************************
String _$publicationRepositoryHash() =>
r'69873c0a15586a8d961f715f276d15be7dca65ed';
/// Provider for PublicationRepository instance
///
/// Copied from [publicationRepository].
@ProviderFor(publicationRepository)
final publicationRepositoryProvider =
AutoDisposeProvider<PublicationRepository>.internal(
publicationRepository,
name: r'publicationRepositoryProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$publicationRepositoryHash,
dependencies: null,
allTransitiveDependencies: null,
);
@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
typedef PublicationRepositoryRef
= AutoDisposeProviderRef<PublicationRepository>;
String _$imageCacheServiceHash() => r'fbd6cd1281d79c781dfe621fbbc8862c32b911e4';
/// Provider for ImageCacheService instance
///
/// Copied from [imageCacheService].
@ProviderFor(imageCacheService)
final imageCacheServiceProvider =
AutoDisposeFutureProvider<ImageCacheService>.internal(
imageCacheService,
name: r'imageCacheServiceProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$imageCacheServiceHash,
dependencies: null,
allTransitiveDependencies: null,
);
@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
typedef ImageCacheServiceRef = AutoDisposeFutureProviderRef<ImageCacheService>;
String _$readingProgressRepositoryHash() =>
r'f14aafb461cbe7249f01f827d192853a69851110';
/// Provider for ReadingProgressRepository instance (if not already provided elsewhere)
///
/// Copied from [readingProgressRepository].
@ProviderFor(readingProgressRepository)
final readingProgressRepositoryProvider =
AutoDisposeProvider<ReadingProgressRepository>.internal(
readingProgressRepository,
name: r'readingProgressRepositoryProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$readingProgressRepositoryHash,
dependencies: null,
allTransitiveDependencies: null,
);
@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
typedef ReadingProgressRepositoryRef
= AutoDisposeProviderRef<ReadingProgressRepository>;
String _$cachedPublicationHash() => r'b313f362977161ac14c76cc7dc279e66054bb9e4';
/// Copied from Dart SDK
class _SystemHash {
_SystemHash._();
static int combine(int hash, int value) {
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + value);
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
return hash ^ (hash >> 6);
}
static int finish(int hash) {
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
// ignore: parameter_assignments
hash = hash ^ (hash >> 11);
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
}
}
/// Provider for single publication lookup
///
/// Copied from [cachedPublication].
@ProviderFor(cachedPublication)
const cachedPublicationProvider = CachedPublicationFamily();
/// Provider for single publication lookup
///
/// Copied from [cachedPublication].
class CachedPublicationFamily extends Family<AsyncValue<Publication?>> {
/// Provider for single publication lookup
///
/// Copied from [cachedPublication].
const CachedPublicationFamily();
/// Provider for single publication lookup
///
/// Copied from [cachedPublication].
CachedPublicationProvider call(
String serverId,
String entryId,
) {
return CachedPublicationProvider(
serverId,
entryId,
);
}
@override
CachedPublicationProvider getProviderOverride(
covariant CachedPublicationProvider provider,
) {
return call(
provider.serverId,
provider.entryId,
);
}
static const Iterable<ProviderOrFamily>? _dependencies = null;
@override
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
@override
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
_allTransitiveDependencies;
@override
String? get name => r'cachedPublicationProvider';
}
/// Provider for single publication lookup
///
/// Copied from [cachedPublication].
class CachedPublicationProvider
extends AutoDisposeFutureProvider<Publication?> {
/// Provider for single publication lookup
///
/// Copied from [cachedPublication].
CachedPublicationProvider(
String serverId,
String entryId,
) : this._internal(
(ref) => cachedPublication(
ref as CachedPublicationRef,
serverId,
entryId,
),
from: cachedPublicationProvider,
name: r'cachedPublicationProvider',
debugGetCreateSourceHash:
const bool.fromEnvironment('dart.vm.product')
? null
: _$cachedPublicationHash,
dependencies: CachedPublicationFamily._dependencies,
allTransitiveDependencies:
CachedPublicationFamily._allTransitiveDependencies,
serverId: serverId,
entryId: entryId,
);
CachedPublicationProvider._internal(
super._createNotifier, {
required super.name,
required super.dependencies,
required super.allTransitiveDependencies,
required super.debugGetCreateSourceHash,
required super.from,
required this.serverId,
required this.entryId,
}) : super.internal();
final String serverId;
final String entryId;
@override
Override overrideWith(
FutureOr<Publication?> Function(CachedPublicationRef provider) create,
) {
return ProviderOverride(
origin: this,
override: CachedPublicationProvider._internal(
(ref) => create(ref as CachedPublicationRef),
from: from,
name: null,
dependencies: null,
allTransitiveDependencies: null,
debugGetCreateSourceHash: null,
serverId: serverId,
entryId: entryId,
),
);
}
@override
AutoDisposeFutureProviderElement<Publication?> createElement() {
return _CachedPublicationProviderElement(this);
}
@override
bool operator ==(Object other) {
return other is CachedPublicationProvider &&
other.serverId == serverId &&
other.entryId == entryId;
}
@override
int get hashCode {
var hash = _SystemHash.combine(0, runtimeType.hashCode);
hash = _SystemHash.combine(hash, serverId.hashCode);
hash = _SystemHash.combine(hash, entryId.hashCode);
return _SystemHash.finish(hash);
}
}
@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
mixin CachedPublicationRef on AutoDisposeFutureProviderRef<Publication?> {
/// The parameter `serverId` of this provider.
String get serverId;
/// The parameter `entryId` of this provider.
String get entryId;
}
class _CachedPublicationProviderElement
extends AutoDisposeFutureProviderElement<Publication?>
with CachedPublicationRef {
_CachedPublicationProviderElement(super.provider);
@override
String get serverId => (origin as CachedPublicationProvider).serverId;
@override
String get entryId => (origin as CachedPublicationProvider).entryId;
}
String _$publicationCacheHash() => r'a67f02059ba86fe5573d60c738dead3df14c90ea';
/// Provider for publication cache operations
///
/// Copied from [PublicationCache].
@ProviderFor(PublicationCache)
final publicationCacheProvider =
AutoDisposeAsyncNotifierProvider<PublicationCache, void>.internal(
PublicationCache.new,
name: r'publicationCacheProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$publicationCacheHash,
dependencies: null,
allTransitiveDependencies: null,
);
typedef _$PublicationCache = AutoDisposeAsyncNotifier<void>;
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package