Rename the distfile field to application, in line with the docs.

This commit is contained in:
Bas Wiel, van de 2024-05-02 18:32:50 +02:00
parent cbb1762a2d
commit d9c2bf7539
3 changed files with 6 additions and 6 deletions

View File

@ -101,9 +101,9 @@ impl DiskBuilder {
// Instantiate as many downloaders as we need for the application's distfiles
let mut gamedownloaders: Vec<ZipDownloader> =
Vec::with_capacity(self.manifest.distfiles.len());
Vec::with_capacity(self.manifest.application.len());
for distfile in &self.manifest.distfiles {
for distfile in &self.manifest.application {
let downloader = ZipDownloader::from_url(
&distfile.get_url(),
Some(&format!("Downloading {}", &distfile.get_label())),

View File

@ -21,13 +21,13 @@ impl fmt::Display for GameMetadata {
}
#[derive(Debug, Deserialize, Serialize)]
pub struct DistFile {
pub struct Application {
url: String,
checksum: Option<String>,
label: Option<String>
}
impl DistFile {
impl Application {
pub fn get_url(&self) -> String {
self.url.to_owned()
}
@ -56,7 +56,7 @@ pub struct Manifest {
pub disksize: u32,
#[serde(default = "default_disktype")]
pub disktype: String,
pub distfiles: Vec<DistFile>,
pub application: Vec<Application>,
pub os: String,
#[serde(rename = "AUTOEXEC")]
pub autoexec: Option<String>,

View File

@ -8,7 +8,7 @@ metadata:
diskname: alleycat.vhd
disktype: pcxt
disksize: 10
distfiles:
application:
- url: https://dosk8s-dist.area536.com/alleycat.zip
label: Alley Cat
os: IBMDOS200