commit
74c4a9144b
5 changed files with 243 additions and 273 deletions
10
.github/workflows/build.yaml
vendored
10
.github/workflows/build.yaml
vendored
|
@ -1,5 +1,10 @@
|
||||||
name: Build
|
name: Build
|
||||||
on: push
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
@ -11,6 +16,9 @@ jobs:
|
||||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install libsqlite3-dev
|
||||||
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
run: sudo apt-get install libsqlite3-dev
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
489
Cargo.lock
generated
489
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -20,10 +20,11 @@ flamer = { version = "0.4", optional = true }
|
||||||
getopts = "0.2.15"
|
getopts = "0.2.15"
|
||||||
id3 = "0.3"
|
id3 = "0.3"
|
||||||
image = "0.22"
|
image = "0.22"
|
||||||
|
libsqlite3-sys = { version = "0.16", features = ["bundled-windows"] }
|
||||||
rustfm-scrobble = "0.9.2"
|
rustfm-scrobble = "0.9.2"
|
||||||
lewton = "0.9.1"
|
lewton = "0.9.1"
|
||||||
log = "0.4.5"
|
log = "0.4.5"
|
||||||
metaflac = { git = "https://github.com/agersant/rust-metaflac" }
|
metaflac = "0.2"
|
||||||
mp3-duration = "0.1.0"
|
mp3-duration = "0.1.0"
|
||||||
pbkdf2 = "0.3"
|
pbkdf2 = "0.3"
|
||||||
rand = "0.7"
|
rand = "0.7"
|
||||||
|
@ -42,12 +43,8 @@ version = "0.4.2"
|
||||||
default_features = false
|
default_features = false
|
||||||
features = ["json", "serve"]
|
features = ["json", "serve"]
|
||||||
|
|
||||||
[dependencies.rusqlite]
|
|
||||||
version = "0.14.0"
|
|
||||||
features = ["bundled"]
|
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
uuid = "0.7.1"
|
uuid = "0.8"
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies.winapi]
|
[target.'cfg(windows)'.dependencies.winapi]
|
||||||
version = "0.3.3"
|
version = "0.3.3"
|
||||||
|
|
|
@ -24,7 +24,7 @@ You can now start Polaris from the start menu or from your desktop, Polaris will
|
||||||
|
|
||||||
#### Dependencies
|
#### Dependencies
|
||||||
|
|
||||||
1. Install OpenSSL and its headers. This is most likely available from your distribution's package manager. For instance on Ubuntu, execute `sudo apt-get install libssl-dev`
|
1. Install OpenSSL, SQLite and their headers, and some development tools. These are available from your distribution's package manager. For instance on Ubuntu, execute `sudo apt-get install binutils pkg-config libssl-dev libsqlite3-dev`
|
||||||
2. Install the nightly Rust compiler by executing `curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly` or using an [alternative method](https://www.rust-lang.org/en-US/install.html)
|
2. Install the nightly Rust compiler by executing `curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly` or using an [alternative method](https://www.rust-lang.org/en-US/install.html)
|
||||||
|
|
||||||
#### Polaris installation
|
#### Polaris installation
|
||||||
|
|
|
@ -156,9 +156,9 @@ fn read_flac(path: &Path) -> Result<SongTags> {
|
||||||
.get("DISCNUMBER")
|
.get("DISCNUMBER")
|
||||||
.and_then(|d| d[0].parse::<u32>().ok());
|
.and_then(|d| d[0].parse::<u32>().ok());
|
||||||
let year = vorbis.get("DATE").and_then(|d| d[0].parse::<i32>().ok());
|
let year = vorbis.get("DATE").and_then(|d| d[0].parse::<i32>().ok());
|
||||||
let streaminfo = tag.get_blocks(metaflac::BlockType::StreamInfo);
|
let mut streaminfo = tag.get_blocks(metaflac::BlockType::StreamInfo);
|
||||||
let duration = match streaminfo.first() {
|
let duration = match streaminfo.next() {
|
||||||
Some(&&metaflac::Block::StreamInfo(ref s)) => {
|
Some(&metaflac::Block::StreamInfo(ref s)) => {
|
||||||
Some((s.total_samples as u32 / s.sample_rate) as u32)
|
Some((s.total_samples as u32 / s.sample_rate) as u32)
|
||||||
}
|
}
|
||||||
_ => None,
|
_ => None,
|
||||||
|
|
Loading…
Add table
Reference in a new issue