Skip to content

Commit

Permalink
deps: update
Browse files Browse the repository at this point in the history
  • Loading branch information
pombadev committed Sep 17, 2023
1 parent 199a6e9 commit 8643b3c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
17 changes: 8 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ path = "src/lib/mod.rs"

[dependencies]
anyhow = "1.0.75"
chrono = {version = "0.4.27", default-features = false}
clap = {version = "4.4.1", default-features = false, features = [
chrono = {version = "0.4.31", default-features = false}
clap = {version = "4.4.3", default-features = false, features = [
"derive",
"error-context",
"help",
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Sunny is hugely inspired by [SoundScrape](https://github.com/Miserlou/SoundScrap

### Format

By default files are saved in this structure in current directory if `--path` option is not passed.
By default, files are saved in this structure in current directory if `--path` option is not passed.

```
Artist
Expand Down Expand Up @@ -123,3 +123,5 @@ Note: run --help to see full descriptions of each flags/options
## Contributing

Contributions, issues and feature requests are welcome!

Please have a look at [TODO.md](./TODO.md).
4 changes: 4 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# TODO

- Improve error handler/reporter
- Improve UI
6 changes: 3 additions & 3 deletions src/lib/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ pub fn track_path(track: &Track, root: &Path, track_format: &String) -> Result<P

#[must_use]
pub fn timestamp(date_string: &str) -> Option<Timestamp> {
use chrono::{Datelike, TimeZone, Timelike, Utc};
use chrono::{DateTime, Datelike, Timelike};

// if String looks like this `28 Sep 2014 04:19:31 GMT`
match Utc.datetime_from_str(date_string, "%d %b %Y %T %Z") {
match DateTime::parse_from_str(date_string, "%d %b %Y %T %Z") {
Ok(date) => Some(Timestamp {
year: date.year(),
month: Some(date.month() as u8),
Expand All @@ -74,7 +74,7 @@ pub fn timestamp(date_string: &str) -> Option<Timestamp> {
let mut date_string = date_string.to_owned();
date_string.push_str(" 01:01:01");

match Utc.datetime_from_str(&date_string, "released %B %d, %Y %T") {
match DateTime::parse_from_str(&date_string, "released %B %d, %Y %T") {
Ok(date) => Some(Timestamp {
year: date.year(),
month: Some(date.month() as u8),
Expand Down

0 comments on commit 8643b3c

Please sign in to comment.