PLAYER: Added users media editor
Build and Publish / Build and Publish Docker Image (push) Successful in 2m57s

This commit is contained in:
2026-05-28 17:34:37 +03:00
parent 072c00a48e
commit d1113effa5
10 changed files with 4053 additions and 69 deletions
+79
View File
@@ -12,6 +12,14 @@ pub(super) struct CountRow {
pub(super) count: i64,
}
#[derive(sqlx::FromRow)]
pub(super) struct PlayerJamUserRow {
pub(super) id: i64,
pub(super) username: String,
pub(super) display_name: Option<String>,
pub(super) email: Option<String>,
}
#[derive(sqlx::FromRow)]
pub(super) struct ReleaseRow {
pub(super) id: i64,
@@ -60,6 +68,13 @@ pub(super) struct TrackArtistRow {
pub(super) role: String,
}
#[derive(sqlx::FromRow)]
pub(super) struct ReleaseArtistRefRow {
pub(super) release_id: i64,
pub(super) artist_id: i64,
pub(super) artist_name: String,
}
#[derive(sqlx::FromRow)]
pub(super) struct MediaFileRow {
pub(super) file_path: String,
@@ -124,6 +139,70 @@ pub(super) struct PlaylistTrackRow {
pub(super) lastfm_updated_at: Option<String>,
}
#[derive(sqlx::FromRow)]
pub(super) struct UploadedTrackRow {
pub(super) id: i64,
pub(super) title: String,
pub(super) track_number: Option<i32>,
pub(super) disc_number: Option<i32>,
pub(super) duration_seconds: f64,
pub(super) cover_file_id: Option<i64>,
pub(super) release_cover_file_id: Option<i64>,
pub(super) release_id: i64,
pub(super) release_title: String,
pub(super) release_type: String,
pub(super) release_year: Option<i32>,
pub(super) release_is_hidden: bool,
pub(super) uploader_name: String,
pub(super) audio_format: Option<String>,
pub(super) audio_bitrate: Option<i32>,
pub(super) audio_sample_rate: Option<i32>,
pub(super) audio_bit_depth: Option<i32>,
pub(super) file_size_bytes: Option<i64>,
pub(super) lastfm_listeners: Option<i64>,
pub(super) lastfm_playcount: Option<i64>,
pub(super) lastfm_rating: Option<f64>,
pub(super) lastfm_updated_at: Option<String>,
pub(super) media_file_id: i64,
pub(super) is_hidden: bool,
pub(super) year: Option<i32>,
pub(super) uploaded_at: String,
}
#[derive(sqlx::FromRow)]
pub(super) struct UserUploadQueueRow {
pub(super) id: i64,
pub(super) status: String,
pub(super) input_path: Option<String>,
pub(super) created_at: String,
pub(super) updated_at: String,
pub(super) error_message: Option<String>,
}
#[derive(sqlx::FromRow)]
pub(super) struct UserUploadReviewRow {
pub(super) id: i64,
pub(super) status: String,
pub(super) input_path: Option<String>,
pub(super) result_json: Option<String>,
pub(super) context_json: Option<String>,
pub(super) created_at: String,
pub(super) updated_at: String,
pub(super) error_message: Option<String>,
}
#[derive(sqlx::FromRow)]
pub(super) struct UploadTrackEditRow {
pub(super) release_id: i64,
pub(super) title: String,
pub(super) track_number: Option<i32>,
pub(super) disc_number: Option<i32>,
pub(super) is_hidden: bool,
pub(super) release_title: String,
pub(super) release_type: String,
pub(super) release_year: Option<i32>,
}
#[derive(sqlx::FromRow)]
pub(super) struct AppearanceTrackRow {
pub(super) id: i64,