mirror of
https://github.com/euzu/tuliprox.git
synced 2026-10-08 00:42:32 +02:00
Fix/catchup (#778)
* Fix: setting auth web_ui token_ttl_mins = 0 fixed. * Fix: catchup * New: added playlist update log view * Fix: Landing Page New: "Last Page" added for Landing Page selection
This commit is contained in:
@@ -167,8 +167,8 @@ pub struct WebUiConfigDto {
|
||||
pub kick_secs: u64,
|
||||
#[serde(default, skip_serializing_if = "is_false")]
|
||||
pub combine_views_stats_streams: bool,
|
||||
#[serde(default, skip_serializing_if = "ViewType::is_default")]
|
||||
pub landing_page: ViewType,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub landing_page: Option<ViewType>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub stream_info: Option<StreamInfoConfigDto>,
|
||||
}
|
||||
@@ -184,7 +184,7 @@ impl Default for WebUiConfigDto {
|
||||
player_server: None,
|
||||
kick_secs: default_kick_secs(),
|
||||
combine_views_stats_streams: false,
|
||||
landing_page: ViewType::default(),
|
||||
landing_page: None,
|
||||
stream_info: None,
|
||||
}
|
||||
}
|
||||
@@ -196,7 +196,7 @@ impl WebUiConfigDto {
|
||||
self.enabled == empty.enabled
|
||||
&& self.user_ui_enabled == empty.user_ui_enabled
|
||||
&& !self.combine_views_stats_streams
|
||||
&& self.landing_page == ViewType::default()
|
||||
&& self.landing_page.is_none()
|
||||
&& is_blank_or_default_web_ui_path(&self.path)
|
||||
&& is_blank_optional_str(self.player_server.as_deref())
|
||||
&& self.kick_secs == default_kick_secs()
|
||||
@@ -302,4 +302,18 @@ mod tests {
|
||||
assert!(dto.stream_info.is_none());
|
||||
assert!(dto.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn web_ui_config_dto_default_uses_last_page_landing_page() {
|
||||
let dto = WebUiConfigDto::default();
|
||||
|
||||
assert_eq!(dto.landing_page, None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn web_ui_config_dto_is_not_empty_when_explicit_landing_page_is_set() {
|
||||
let dto = WebUiConfigDto { landing_page: Some(ViewType::Streams), ..WebUiConfigDto::default() };
|
||||
|
||||
assert!(!dto.is_empty());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ mod playlist_document;
|
||||
mod playlist_info_document;
|
||||
mod playlist_request;
|
||||
mod processing_order;
|
||||
mod progress;
|
||||
mod regex_cache;
|
||||
mod search_request;
|
||||
mod short_epg;
|
||||
@@ -45,7 +46,7 @@ pub use self::{
|
||||
active_user_connection_change::*, auth::*, cluster_flags::*, config::*, download::*, epg::*, epg_request::*,
|
||||
ip_check::*, item_field::*, library_request::*, mapping::*, media_properties::*, messaging::*, pagination::*,
|
||||
playlist::*, playlist_categories::*, playlist_info_document::*, playlist_request::*, processing_order::*,
|
||||
regex_cache::*, search_request::*, short_epg::*, stats::*, status_check::*, stream_history::*,
|
||||
progress::*, regex_cache::*, search_request::*, short_epg::*, stats::*, status_check::*, stream_history::*,
|
||||
stream_history_record::*, stream_info::*, stream_meter::*, stream_properties::*, strm_export_style::*,
|
||||
system_info::*, target_type::*, transfer::*, ui_playlist_item::*, user_command::*, uuidtype::*, web_socket::*,
|
||||
xtream::*,
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
use crate::model::LibraryScanSummary;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Marker response for accepted long-running operations. Carries no payload:
|
||||
/// progress is delivered over the event channel, not through this response.
|
||||
#[derive(Debug, Clone, Default, Deserialize, Serialize, PartialEq, Eq)]
|
||||
pub struct OperationRunAccepted {}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)]
|
||||
pub struct PlaylistUpdateProgressEvent {
|
||||
pub target: String,
|
||||
pub message: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq)]
|
||||
pub struct LibraryScanProgressEvent {
|
||||
pub summary: LibraryScanSummary,
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
use crate::model::{
|
||||
user_command::UserCommand, ActiveUserConnectionChange, ConfigType, DownloadsDelta, DownloadsResponse,
|
||||
LibraryScanSummary, PermissionSet, PlaylistUpdateState, StatusCheck, StreamMeterEntry, SystemInfo,
|
||||
LibraryScanProgressEvent, PermissionSet, PlaylistUpdateProgressEvent, PlaylistUpdateState, StatusCheck,
|
||||
StreamMeterEntry, SystemInfo,
|
||||
};
|
||||
use bytes::Bytes;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -92,10 +93,10 @@ pub enum ProtocolMessage {
|
||||
ActiveProviderCountResponse(usize),
|
||||
ConfigChangeResponse(ConfigType),
|
||||
PlaylistUpdateResponse(PlaylistUpdateState),
|
||||
PlaylistUpdateProgressResponse(String, String),
|
||||
PlaylistUpdateProgressResponse(PlaylistUpdateProgressEvent),
|
||||
UserActionResponse(bool),
|
||||
SystemInfoResponse(SystemInfo),
|
||||
LibraryScanProgressResponse(LibraryScanSummary),
|
||||
LibraryScanProgressResponse(LibraryScanProgressEvent),
|
||||
StreamMeterBatchResponse(Vec<StreamMeterEntry>),
|
||||
DownloadsResponse(DownloadsResponse),
|
||||
DownloadsDeltaResponse(DownloadsDelta),
|
||||
|
||||
Reference in New Issue
Block a user