refactor: remove unreachable code paths and unused members

Drops dead code across services, models, utils and widgets, including the
connection auth service, which had no implementer, and the Live TV DVR
provisioning models, which had no caller.

Tests that only covered deleted behaviour are removed or trimmed. No
behaviour change.
This commit is contained in:
edde746
2026-07-26 06:09:47 +02:00
parent 9a6f48a4cb
commit 4307c49cd2
53 changed files with 59 additions and 1118 deletions
+2
View File
@@ -950,6 +950,7 @@ class AppDatabase extends _$AppDatabase {
}
/// Get pending watch actions for a specific server
@visibleForTesting
Future<List<OfflineWatchProgressItem>> getPendingWatchActionsForServer(ServerId serverId, {String? profileId}) {
return (select(offlineWatchProgress)
..where(
@@ -979,6 +980,7 @@ class AppDatabase extends _$AppDatabase {
}
/// Get the latest action for a specific item
@visibleForTesting
Future<OfflineWatchProgressItem?> getLatestWatchAction(
String globalKey, {
String? profileId,
+3
View File
@@ -1,6 +1,7 @@
import 'dart:convert';
import 'package:drift/drift.dart';
import 'package:flutter/foundation.dart';
import '../media/ids.dart';
import 'app_database.dart';
@@ -138,6 +139,7 @@ extension DownloadDatabaseOperations on AppDatabase {
return (await _validDownloadOwnerRows(globalKey)).length;
}
@visibleForTesting
Future<bool> hasDownloadOwner(String globalKey, {String? excludingProfileId}) async {
final rows = await _validDownloadOwnerRows(globalKey, excludingProfileId: excludingProfileId);
return rows.isNotEmpty;
@@ -573,6 +575,7 @@ extension DownloadDatabaseOperations on AppDatabase {
return (await query.map((row) => row.read(count) ?? 0).getSingle());
}
@visibleForTesting
Future<Set<String>> getReferencedDownloadSafRoots() async {
final rows =
await (selectOnly(downloadedMedia)