Commit graph

22 commits

Author SHA1 Message Date
johannesd3
3be50fd90f
Corrected documentation 2021-05-27 17:20:49 +02:00
johannesd3
049bcf616f
Fix integer overflow in spotify_id 2021-05-27 15:29:36 +02:00
johannesd3
041f084d7f Fix warnings 2021-05-13 22:42:55 +02:00
johannesd3
7c3d89112d Fix clippy warnings 2021-04-09 10:45:43 +02:00
Evan Cameron
6a33eb4efa
minor cleanup 2021-02-28 21:54:19 -05:00
johannesd3
e582f0a3fc Improved SpotifyId implementation
Moved conversion of SpotifyAudioType from and to &str directly to traits
Used a simpler and more idiomatic syntax in some places.
2021-01-29 11:50:50 +01:00
Michał Chojnacki
6b09836117 Refactor SpotifyId
- perf:
  * base62 encoding is an order of magnitude faster (~20x);
  * base16/62 enc/dec and from_uri are several times faster (~2-20x);
  * Let FileId::to_base16() reuse the hex encoder (~20x);

- changes:
  * Add to_uri() method;
  * Make from_uri() error handling consistent;
  * Move audio type from string matching to a SpotifyAudioType factory (private);
  * Implent From/Into<&str> for SpotifyAudioType;
  * Add representation sizes as associated constants (private);

- cs/docs:
  * Add rudimentary docs for most public funcs;
  * Add trivial test cases for the codecs;
2021-01-29 11:33:31 +01:00
Michael Pivonka
d47cc75dc6 Fixed formatting 2020-03-02 06:36:27 -05:00
Michael Pivonka
8939954bd7 Added to_uri function to spotify_id 2020-03-02 06:29:13 -05:00
ashthespy
d26590afc5
Update to Rust 2018
- Fix deprecated Error::cause warnings and missing dyn
- Reset max_width
- Add rustfmt to Travis
- Run rustfmt on full codebase
 with `cargo fmt --all`
- Add rustfmt to Travis
- Complete migration to edition 2018
- Replace try! shorthand
- Use explicit `dyn Trait`
2020-01-17 18:11:52 +01:00
ashthespy
b96405af82 Make SpotifyId understand more URI formats 2019-10-30 11:33:17 +01:00
ashthespy
8eb51e9b55 Streamline and refactor Podcast support,
<Metadata>
  Add publisher to `Show`
  Add `ALLOWED` to `PassthroughEnum`
2019-10-30 11:33:17 +01:00
ashthespy
0cb7a3f7c8 WIP: Podcast support 2019-10-30 11:33:17 +01:00
Will Stott
a7243ff8ce Use single fixed-width format! macro for SpotifyId.to_base16 2019-10-22 18:31:45 +01:00
Will Stott
ac1c31b786 Use Rust's built-in unsigned 128 bit integer instead of the extprim crate 2019-10-22 18:28:21 +01:00
Reinier Balt
e6fff8003f remove deprecated and unused import 2018-04-26 09:15:01 +02:00
Sasha Hilton
cbc4ee7554 Add to_base62 method 2018-02-28 13:29:24 +01:00
Sasha Hilton
a7334b6c23 Add to_base62 method 2018-02-28 13:28:57 +01:00
Sasha Hilton
197d80edbf Fix formatting 2018-02-25 16:33:32 +01:00
Sasha Hilton
0abad9a8f8 Add custom SpotifyIdError type 2018-02-25 15:47:57 +01:00
Sasha Hilton
4fb8c71b0a Set SpotifyId methods to return Result 2018-02-25 03:04:07 +01:00
awiouy
4c2b641cad core API: move spotify_id to lib.rs 2018-02-13 07:57:28 +01:00
Renamed from core/src/util/spotify_id.rs (Browse further)