From e166b9d78983e3d5f2e0e31fbc7d18ee0c43e155 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 23 Dec 2024 13:08:41 +0100 Subject: [PATCH] Collect `selected` property for subtitle tracks --- lib/state/player_state.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/state/player_state.dart b/lib/state/player_state.dart index 24ba83f..c2e7b82 100644 --- a/lib/state/player_state.dart +++ b/lib/state/player_state.dart @@ -132,11 +132,13 @@ class Chapter { class SubtitleTrack { final int id; final String title; + final bool selected; final String? lang; const SubtitleTrack({ required this.id, required this.title, + required this.selected, required this.lang, }); @@ -144,6 +146,7 @@ class SubtitleTrack { return SubtitleTrack( id: json['id'], title: json['title'], + selected: json.containsKey('selected') ? json['selected'] : false, lang: json['lang'], ); }