The extras loader logged only the chapter count, so a user report of "auto skip never fires" could not be told apart from "the server has no intro marker for this item" — the two need opposite fixes. Log the marker count and types on all three load paths, including the cache-only one that previously logged nothing at all. Drop PlexVideoPlaybackData.markers while here: the playback-start parse filled it on every item and no caller ever read it, because the player controls fetch their own PlaybackExtras. Document why getPlaybackExtras may serve the shared metadata cache row without a freshness check: getPlaybackInitialization refreshes that row network-first before the controls mount. That ordering is what makes cache-first correct, and nothing said so.
27 lines
734 B
Dart
27 lines
734 B
Dart
import '../../media/media_source_info.dart';
|
|
import '../../media/media_version.dart';
|
|
|
|
/// Consolidated data model containing all information needed for video playback.
|
|
/// This model combines data from multiple Plex API endpoints to reduce redundant requests.
|
|
class PlexVideoPlaybackData {
|
|
final String? videoUrl;
|
|
|
|
final MediaSourceInfo? mediaInfo;
|
|
|
|
final List<MediaVersion> availableVersions;
|
|
|
|
final int selectedMediaIndex;
|
|
|
|
final int selectedPartIndex;
|
|
|
|
PlexVideoPlaybackData({
|
|
required this.videoUrl,
|
|
required this.mediaInfo,
|
|
required this.availableVersions,
|
|
this.selectedMediaIndex = 0,
|
|
this.selectedPartIndex = 0,
|
|
});
|
|
|
|
bool get hasValidVideoUrl => videoUrl != null && videoUrl!.isNotEmpty;
|
|
}
|