plex_client.selectStreams' allParts=false branch, download_manager's both-branches-true conditional and unscoped getAllPinnedMetadata tail, playback_source_resolver.preferOffline, and update_service's unreachable catches had no reachable path; PlaybackSession.result/streamHeaders, PlaybackContext.clientScopeId, FileInfoStreams.audioStream, PrefsRepairOutcome.settingsReset/sessionsSalvaged, and JellyfinLiveSessionTracker.playSessionId were write-only; PlexConnection.directUrl, PlexServer.isOnline plus its parse-and-persist presence field, SafStorageService.createDirectory, FullscreenStateManager.stopMonitoring/dispose, the play_queue_launcher re-export shim, track-selection's constant params, and PlexApiCache.unpinForOffline/isPinnedRatingKey (matching the earlier Jellyfin removal) were dead API.
29 lines
937 B
Dart
29 lines
937 B
Dart
import '../media/media_item.dart';
|
|
import '../media/media_server_client.dart';
|
|
import 'playback_initialization_types.dart';
|
|
|
|
enum PlaybackSourceKind { localFile, remoteDirect, remoteTranscode }
|
|
|
|
enum PlaybackReportingMode { online, offlineQueue, onlineWithOfflineFallback, disabled }
|
|
|
|
class PlaybackContext {
|
|
final MediaItem metadata;
|
|
final PlaybackInitializationResult result;
|
|
final PlaybackSourceKind sourceKind;
|
|
final PlaybackReportingMode reportingMode;
|
|
final MediaServerClient? reportingClient;
|
|
final Map<String, String>? streamHeaders;
|
|
|
|
const PlaybackContext({
|
|
required this.metadata,
|
|
required this.result,
|
|
required this.sourceKind,
|
|
required this.reportingMode,
|
|
this.reportingClient,
|
|
this.streamHeaders,
|
|
});
|
|
|
|
bool get usesLocalMedia => sourceKind == PlaybackSourceKind.localFile;
|
|
bool get shouldQueueOnReportFailure => reportingMode == PlaybackReportingMode.onlineWithOfflineFallback;
|
|
}
|