refactor(media): merge the two MediaStreamKind enums into one shared enum

lib/media declared two different enums named MediaStreamKind — a 4-value one in media_stream.dart and a 7-value one in media_file_info.dart — so any file importing both libraries silently picked one by import order.

media_stream.dart's enum now carries the full member set (image/data/lyric added before unknown; the original four ordinals are preserved) and media_file_info.dart re-exports it instead of declaring its own.
This commit is contained in:
edde746
2026-08-16 16:48:01 +02:00
parent 58b510a6c4
commit fc061dc38d
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -1,6 +1,9 @@
import '../i18n/strings.g.dart';
import '../utils/formatters.dart';
import 'media_stream.dart' show MediaStreamKind;
export 'media_stream.dart' show MediaStreamKind;
/// Backend-neutral file-info payload rendered by `FileInfoBottomSheet`.
///
@@ -252,8 +255,6 @@ class MediaFileAttachment {
const MediaFileAttachment({this.index, this.fileName, this.mimeType, this.codec});
}
enum MediaStreamKind { video, audio, subtitle, image, data, lyric, unknown }
/// Colour/HDR classification of a video stream, normalised across backends.
///
/// Jellyfin reports it directly (`VideoRangeType`); Plex is derived from the
+1 -1
View File
@@ -1,5 +1,5 @@
/// Type of an embedded or sidecar stream within a media file.
enum MediaStreamKind { video, audio, subtitle, unknown }
enum MediaStreamKind { video, audio, subtitle, image, data, lyric, unknown }
/// A single audio, video, or subtitle stream inside a media part.
class MediaStream {