Collect selected property for subtitle tracks

This commit is contained in:
Oystein Kristoffer Tveit 2024-12-23 13:08:41 +01:00
parent 8fa9c0b762
commit e166b9d789
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146

View File

@ -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'],
);
}