Git Product home page Git Product logo

ncmc's Issues

some dependencies got yanked

Fail to compile under Windows:

> cargo install ncmc
    Updating crates.io index
  Installing ncmc v0.1.10
error: failed to compile `ncmc v0.1.10`, intermediate artifacts can be found at `C:\Users\xytao\AppData\Local\Temp\cargo-installv5FHL8`

Caused by:
  failed to select a version for the requirement `aes = "^0.3.2"`
  candidate versions found which didn't match: 0.7.5, 0.7.4, 0.7.3, ...
  location searched: crates.io index
  required by package `ncmc v0.1.10`

Turns out that aes 0.3.2 got yanked and can't be installed. We should probably update the README to use cargo install --locked or update the dependencies.

有些老歌的 musicId 不是纯数字的

{"musicId":"track-343292","musicName":"你好吗?","artist":[["at17","11001"]],"albumId":"33838","album":"Kiss Kiss Kiss" ....

我看 flac 打包的时候也没用到这个 musicId,是不是干脆解析的时候去掉呢?

diff --git a/crates/ncm_meta/src/music_meta.rs b/crates/ncm_meta/src/music_meta.rs
index 3a44d64..efdb914 100644
--- a/crates/ncm_meta/src/music_meta.rs
+++ b/crates/ncm_meta/src/music_meta.rs
@@ -1,41 +1,13 @@
-use miniserde::{de, make_place, Deserialize};
+use miniserde::Deserialize;
 
 #[derive(Deserialize, Debug)]
 #[allow(dead_code)]
 pub(crate) struct MusicMeta {
-    #[serde(rename = "musicId")]
-    pub music_id: MusicId,
     #[serde(rename = "musicName")]
     pub music_name: String,
-    pub artist: Vec<(String, MusicId)>,
+    pub artist: Vec<(String, String)>,
     pub album: String,
     #[serde(rename = "albumPic")]
     pub album_pic: String,
     pub format: String,
 }
-
-make_place!(Place);
-#[derive(Debug)]
-pub(crate) struct MusicId(u32);
-
-impl de::Visitor for Place<MusicId> {
-    fn string(&mut self, s: &str) -> miniserde::Result<()> {
-        let value: u32 = s.parse().map_err(|_| miniserde::Error)?;
-        self.out = Some(MusicId(value));
-
-        Ok(())
-    }
-
-    fn nonnegative(&mut self, n: u64) -> miniserde::Result<()> {
-        let value = n as u32;
-        self.out = Some(MusicId(value));
-
-        Ok(())
-    }
-}
-
-impl de::Deserialize for MusicId {
-    fn begin(out: &mut Option<Self>) -> &mut dyn de::Visitor {
-        Place::new(out)
-    }
-}

Can't work on macOS.

total: 1
--------------------------------
   1 <-	test.ncm

thread 'main' panicked at 'slice index starts at 22 but ends at 0', libcore/slice/mod.rs:2340:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
[1]    43069 abort      ncmc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.