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:
@@ -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,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 {
|
||||
|
||||
Reference in New Issue
Block a user