tape: change default media set naming template to "%c"
This commit is contained in:
parent
0bf1c314da
commit
7273ba3de2
@ -145,7 +145,7 @@ pub struct MediaPoolConfig {
|
|||||||
/// Media retention policy
|
/// Media retention policy
|
||||||
#[serde(skip_serializing_if="Option::is_none")]
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
pub retention: Option<String>,
|
pub retention: Option<String>,
|
||||||
/// Media set naming template (default "%id%")
|
/// Media set naming template (default "%c")
|
||||||
///
|
///
|
||||||
/// The template is UTF8 text, and can include strftime time
|
/// The template is UTF8 text, and can include strftime time
|
||||||
/// format specifications.
|
/// format specifications.
|
||||||
|
@ -522,7 +522,7 @@ impl Inventory {
|
|||||||
) -> Result<String, Error> {
|
) -> Result<String, Error> {
|
||||||
|
|
||||||
if let Some(ctime) = self.media_set_start_time(media_set_uuid) {
|
if let Some(ctime) = self.media_set_start_time(media_set_uuid) {
|
||||||
let mut template = template.unwrap_or(String::from("%id%"));
|
let mut template = template.unwrap_or(String::from("%c"));
|
||||||
template = template.replace("%id%", &media_set_uuid.to_string());
|
template = template.replace("%id%", &media_set_uuid.to_string());
|
||||||
proxmox::tools::time::strftime_local(&template, ctime)
|
proxmox::tools::time::strftime_local(&template, ctime)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user