- A swap stops the previous media at once; buffer counts only for the media the player holds (client) and the current mediaId (server), so the old video can no longer start the new one. - The automatic frozen-picture reload is gone (false alarms on still scenes); Reload video stays. - The "Next episode" pill shows only from a known ending. - A web link's thumbnail is its cover, under the video's own name. - While playing, the unread chip stays off the picture; chat pop-ups can be All / Only when paused / Off. - Server fetch failures say when the server has no cookies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
29 lines
1.1 KiB
Dart
29 lines
1.1 KiB
Dart
/// What the player shows about the current media: a title, an episode line
|
|
/// and art. Art is by content hash (`state.media.art`), fetched by everyone
|
|
/// (guests included) from the server they dialled; '' when there is none.
|
|
class NowPlaying {
|
|
/// Series name for episodes, else the movie, file or link name.
|
|
final String title;
|
|
/// "S2 E4 · Episode title", "E12", or null (movies, links).
|
|
final String? episode;
|
|
/// Portrait cover (2:3) and wide banner; '' when none.
|
|
final String posterHash;
|
|
final String bannerHash;
|
|
const NowPlaying({required this.title, this.episode, this.posterHash = '', this.bannerHash = ''});
|
|
|
|
/// The art is a web video's thumbnail (the same picture as cover and
|
|
/// banner): shown wide, under the video's own name.
|
|
bool get thumbnail => posterHash.isNotEmpty && posterHash == bannerHash;
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
other is NowPlaying &&
|
|
other.title == title &&
|
|
other.episode == episode &&
|
|
other.posterHash == posterHash &&
|
|
other.bannerHash == bannerHash;
|
|
|
|
@override
|
|
int get hashCode => Object.hash(title, episode, posterHash, bannerHash);
|
|
}
|