pinakes: import in parallel; various UI improvements
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I1eb47cd79cd4145c56af966f6756fe1d6a6a6964
This commit is contained in:
parent
278bcaa4b0
commit
116fe7b059
42 changed files with 4316 additions and 316 deletions
|
|
@ -61,6 +61,8 @@ pub struct MediaItem {
|
|||
pub description: Option<String>,
|
||||
pub thumbnail_path: Option<PathBuf>,
|
||||
pub custom_fields: HashMap<String, CustomField>,
|
||||
/// File modification time (Unix timestamp in seconds), used for incremental scanning
|
||||
pub file_mtime: Option<i64>,
|
||||
pub created_at: DateTime<Utc>,
|
||||
pub updated_at: DateTime<Utc>,
|
||||
}
|
||||
|
|
@ -126,6 +128,7 @@ pub struct AuditEntry {
|
|||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum AuditAction {
|
||||
// Media actions
|
||||
Imported,
|
||||
Updated,
|
||||
Deleted,
|
||||
|
|
@ -135,11 +138,50 @@ pub enum AuditAction {
|
|||
RemovedFromCollection,
|
||||
Opened,
|
||||
Scanned,
|
||||
|
||||
// Authentication actions
|
||||
LoginSuccess,
|
||||
LoginFailed,
|
||||
Logout,
|
||||
SessionExpired,
|
||||
|
||||
// Authorization actions
|
||||
PermissionDenied,
|
||||
RoleChanged,
|
||||
LibraryAccessGranted,
|
||||
LibraryAccessRevoked,
|
||||
|
||||
// User management
|
||||
UserCreated,
|
||||
UserUpdated,
|
||||
UserDeleted,
|
||||
|
||||
// Plugin actions
|
||||
PluginInstalled,
|
||||
PluginUninstalled,
|
||||
PluginEnabled,
|
||||
PluginDisabled,
|
||||
|
||||
// Configuration actions
|
||||
ConfigChanged,
|
||||
RootDirectoryAdded,
|
||||
RootDirectoryRemoved,
|
||||
|
||||
// Social/Sharing actions
|
||||
ShareLinkCreated,
|
||||
ShareLinkAccessed,
|
||||
|
||||
// System actions
|
||||
DatabaseVacuumed,
|
||||
DatabaseCleared,
|
||||
ExportCompleted,
|
||||
IntegrityCheckCompleted,
|
||||
}
|
||||
|
||||
impl fmt::Display for AuditAction {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
let s = match self {
|
||||
// Media actions
|
||||
Self::Imported => "imported",
|
||||
Self::Updated => "updated",
|
||||
Self::Deleted => "deleted",
|
||||
|
|
@ -149,6 +191,44 @@ impl fmt::Display for AuditAction {
|
|||
Self::RemovedFromCollection => "removed_from_collection",
|
||||
Self::Opened => "opened",
|
||||
Self::Scanned => "scanned",
|
||||
|
||||
// Authentication actions
|
||||
Self::LoginSuccess => "login_success",
|
||||
Self::LoginFailed => "login_failed",
|
||||
Self::Logout => "logout",
|
||||
Self::SessionExpired => "session_expired",
|
||||
|
||||
// Authorization actions
|
||||
Self::PermissionDenied => "permission_denied",
|
||||
Self::RoleChanged => "role_changed",
|
||||
Self::LibraryAccessGranted => "library_access_granted",
|
||||
Self::LibraryAccessRevoked => "library_access_revoked",
|
||||
|
||||
// User management
|
||||
Self::UserCreated => "user_created",
|
||||
Self::UserUpdated => "user_updated",
|
||||
Self::UserDeleted => "user_deleted",
|
||||
|
||||
// Plugin actions
|
||||
Self::PluginInstalled => "plugin_installed",
|
||||
Self::PluginUninstalled => "plugin_uninstalled",
|
||||
Self::PluginEnabled => "plugin_enabled",
|
||||
Self::PluginDisabled => "plugin_disabled",
|
||||
|
||||
// Configuration actions
|
||||
Self::ConfigChanged => "config_changed",
|
||||
Self::RootDirectoryAdded => "root_directory_added",
|
||||
Self::RootDirectoryRemoved => "root_directory_removed",
|
||||
|
||||
// Social/Sharing actions
|
||||
Self::ShareLinkCreated => "share_link_created",
|
||||
Self::ShareLinkAccessed => "share_link_accessed",
|
||||
|
||||
// System actions
|
||||
Self::DatabaseVacuumed => "database_vacuumed",
|
||||
Self::DatabaseCleared => "database_cleared",
|
||||
Self::ExportCompleted => "export_completed",
|
||||
Self::IntegrityCheckCompleted => "integrity_check_completed",
|
||||
};
|
||||
write!(f, "{s}")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue