Merge pull request 'v0.2.0 Release' (#20) from devel into main
Some checks failed
Rust Build / Check (push) Successful in 28s
Rust Build / Test Suite (push) Successful in 31s
Rust Build / Rustfmt (push) Successful in 31s
Rust Build / Clippy (push) Successful in 28s
Rust Build / build (push) Successful in 27s
Release Tagging / release (push) Failing after 34s
Some checks failed
Rust Build / Check (push) Successful in 28s
Rust Build / Test Suite (push) Successful in 31s
Rust Build / Rustfmt (push) Successful in 31s
Rust Build / Clippy (push) Successful in 28s
Rust Build / build (push) Successful in 27s
Release Tagging / release (push) Failing after 34s
Reviewed-on: phoenix/icarus-models#20
This commit is contained in:
@@ -3,14 +3,13 @@ name: Release Tagging
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- devel
|
||||
tags:
|
||||
- 'v*' # Trigger on tags matching v*
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
@@ -13,7 +13,7 @@ on:
|
||||
jobs:
|
||||
check:
|
||||
name: Check
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
|
||||
test:
|
||||
name: Test Suite
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
|
||||
fmt:
|
||||
name: Rustfmt
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
|
||||
clippy:
|
||||
name: Clippy
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
|
||||
build:
|
||||
name: build
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "icarus-models"
|
||||
version = "0.1.14"
|
||||
name = "icarus_models"
|
||||
version = "0.2.0"
|
||||
edition = "2024"
|
||||
description = "models used for the icarus project"
|
||||
license = "MIT"
|
||||
|
@@ -1,5 +1,14 @@
|
||||
pub const DEFAULTMUSICEXTENSION: &str = FLACEXTENSION;
|
||||
pub const FLACEXTENSION: &str = ".flac";
|
||||
pub const WAVEXTENSION: &str = ".wav";
|
||||
pub const MPTHREEEXTENSION: &str = ".mp3";
|
||||
pub const JPGEXTENSION: &str = ".jpg";
|
||||
pub mod file_extensions {
|
||||
pub mod audio {
|
||||
pub const DEFAULTMUSICEXTENSION: &str = FLACEXTENSION;
|
||||
pub const FLACEXTENSION: &str = ".flac";
|
||||
pub const WAVEXTENSION: &str = ".wav";
|
||||
pub const MPTHREEEXTENSION: &str = ".mp3";
|
||||
}
|
||||
|
||||
pub mod image {
|
||||
pub const JPGEXTENSION: &str = ".jpg";
|
||||
pub const JPEGEXTENSION: &str = ".jpeg";
|
||||
pub const PNGEXTENSION: &str = ".png";
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@ use std::io::Read;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize)]
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
pub struct CoverArt {
|
||||
pub id: i32,
|
||||
pub title: String,
|
||||
|
14
src/song.rs
14
src/song.rs
@@ -128,12 +128,18 @@ impl Song {
|
||||
|
||||
let file_extension = match typ {
|
||||
types::MusicTypes::DefaultMusicExtension => {
|
||||
String::from(constants::DEFAULTMUSICEXTENSION)
|
||||
String::from(constants::file_extensions::audio::DEFAULTMUSICEXTENSION)
|
||||
}
|
||||
|
||||
types::MusicTypes::WavExtension => String::from(constants::WAVEXTENSION),
|
||||
types::MusicTypes::FlacExtension => String::from(constants::FLACEXTENSION),
|
||||
types::MusicTypes::MPThreeExtension => String::from(constants::MPTHREEEXTENSION),
|
||||
types::MusicTypes::WavExtension => {
|
||||
String::from(constants::file_extensions::audio::WAVEXTENSION)
|
||||
}
|
||||
types::MusicTypes::FlacExtension => {
|
||||
String::from(constants::file_extensions::audio::FLACEXTENSION)
|
||||
}
|
||||
types::MusicTypes::MPThreeExtension => {
|
||||
String::from(constants::file_extensions::audio::MPTHREEEXTENSION)
|
||||
}
|
||||
};
|
||||
|
||||
if randomize {
|
||||
|
Reference in New Issue
Block a user