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
|
||||
on: push
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
@ -11,6 +16,9 @@ jobs:
|
|||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
|
||||
steps:
|
||||
- name: Install libsqlite3-dev
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: sudo apt-get install libsqlite3-dev
|
||||
- uses: actions/checkout@master
|
||||
with:
|
||||
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"
|
||||
id3 = "0.3"
|
||||
image = "0.22"
|
||||
libsqlite3-sys = { version = "0.16", features = ["bundled-windows"] }
|
||||
rustfm-scrobble = "0.9.2"
|
||||
lewton = "0.9.1"
|
||||
log = "0.4.5"
|
||||
metaflac = { git = "https://github.com/agersant/rust-metaflac" }
|
||||
metaflac = "0.2"
|
||||
mp3-duration = "0.1.0"
|
||||
pbkdf2 = "0.3"
|
||||
rand = "0.7"
|
||||
|
@ -42,12 +43,8 @@ version = "0.4.2"
|
|||
default_features = false
|
||||
features = ["json", "serve"]
|
||||
|
||||
[dependencies.rusqlite]
|
||||
version = "0.14.0"
|
||||
features = ["bundled"]
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
uuid = "0.7.1"
|
||||
uuid = "0.8"
|
||||
|
||||
[target.'cfg(windows)'.dependencies.winapi]
|
||||
version = "0.3.3"
|
||||
|
|
|
@ -24,7 +24,7 @@ You can now start Polaris from the start menu or from your desktop, Polaris will
|
|||
|
||||
#### 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)
|
||||
|
||||
#### Polaris installation
|
||||
|
|
|
@ -156,9 +156,9 @@ fn read_flac(path: &Path) -> Result<SongTags> {
|
|||
.get("DISCNUMBER")
|
||||
.and_then(|d| d[0].parse::<u32>().ok());
|
||||
let year = vorbis.get("DATE").and_then(|d| d[0].parse::<i32>().ok());
|
||||
let streaminfo = tag.get_blocks(metaflac::BlockType::StreamInfo);
|
||||
let duration = match streaminfo.first() {
|
||||
Some(&&metaflac::Block::StreamInfo(ref s)) => {
|
||||
let mut streaminfo = tag.get_blocks(metaflac::BlockType::StreamInfo);
|
||||
let duration = match streaminfo.next() {
|
||||
Some(&metaflac::Block::StreamInfo(ref s)) => {
|
||||
Some((s.total_samples as u32 / s.sample_rate) as u32)
|
||||
}
|
||||
_ => None,
|
||||
|
|
Loading…
Add table
Reference in a new issue