common/types: add better alias for PlaylistVersion

This commit is contained in:
2025-11-25 04:02:03 +09:00
parent b22016e970
commit b03f60c985
4 changed files with 19 additions and 19 deletions

View File

@@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize};
use crate::{
Request,
commands::{Command, RequestParserError, RequestParserResult, ResponseParserError},
common::{Version, WindowRange},
common::{PlaylistVersion, WindowRange},
request_tokenizer::RequestTokenizer,
response_tokenizer::ResponseAttributes,
};
@@ -12,7 +12,7 @@ pub struct PlChanges;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PlChangesRequest {
pub version: Version,
pub version: PlaylistVersion,
pub window: Option<WindowRange>,
}

View File

@@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize};
use crate::{
Request,
commands::{Command, RequestParserError, RequestParserResult, ResponseParserError},
common::{Version, WindowRange},
common::{PlaylistVersion, WindowRange},
request_tokenizer::RequestTokenizer,
response_tokenizer::ResponseAttributes,
};
@@ -12,7 +12,7 @@ pub struct PlChangesPosId;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PlChangesPosIdRequest {
pub version: Version,
pub version: PlaylistVersion,
pub window: Option<WindowRange>,
}

View File

@@ -28,22 +28,22 @@ pub use time_interval::TimeInterval;
pub use volume_value::VolumeValue;
pub use window_range::WindowRange;
pub type SongPosition = u32;
pub type SongId = u32;
pub type Seconds = u32;
pub type TimeWithFractions = f64;
pub type Priority = u8;
pub type PlaylistName = String;
pub type Offset = u32;
pub type PlaylistName = String;
pub type PlaylistVersion = u32;
pub type Priority = u8;
pub type Seconds = u32;
pub type SongId = u32;
pub type SongPosition = u32;
pub type TimeWithFractions = f64;
// TODO: use a proper types
pub type AudioOutputId = String;
pub type ChannelName = String;
pub type Feature = String;
pub type PartitionName = String;
pub type Path = String;
pub type StickerType = String;
pub type TagName = String;
pub type TagValue = String;
pub type Uri = String;
pub type Path = String;
pub type Version = String;
pub type Feature = String;
pub type PartitionName = String;
pub type AudioOutputId = String;
pub type ChannelName = String;
pub type StickerType = String;

View File

@@ -62,9 +62,9 @@ pub enum Request {
PlaylistInfo(Option<OneOrRange>),
PlaylistSearch(Filter, Option<Sort>, Option<WindowRange>),
// TODO: which type of range?
PlChanges(Version, Option<WindowRange>),
PlChanges(PlaylistVersion, Option<WindowRange>),
// TODO: which type of range?
PlChangesPosId(Version, Option<WindowRange>),
PlChangesPosId(PlaylistVersion, Option<WindowRange>),
// TODO: which type of range?
Prio(Priority, WindowRange),
PrioId(Priority, Vec<SongId>),