Skip to content

Commit

Permalink
Version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
nledford committed Jul 22, 2024
1 parent 59c6cda commit f9fb4ba
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hitomi"
version = "0.6.0"
version = "0.7.0"
description = "A CLI application that builds and updates playlists on a Plex server using json-based profiles."
authors = ["Nathaniel Ledford <nate@nateledford.com>"]
homepage = "https://github.com/nledford/hitomi"
Expand Down
16 changes: 8 additions & 8 deletions src/plex/models/tracks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl Track {
Some(artist) => artist.as_ref(),
None => &self.grandparent_title,
}
.trim()
.trim()
}

pub fn get_artist_id(&self) -> &str {
Expand Down Expand Up @@ -112,13 +112,13 @@ impl Track {
pub fn get_played_today(&self) -> bool {
self.get_last_played()
>= Utc::now()
.with_hour(0)
.unwrap()
.with_minute(0)
.unwrap()
.with_second(0)
.unwrap()
.timestamp()
.with_hour(0)
.unwrap()
.with_minute(0)
.unwrap()
.with_second(0)
.unwrap()
.timestamp()
}

pub fn get_played_within_last_day(&self) -> bool {
Expand Down
14 changes: 7 additions & 7 deletions src/profiles/profile_tracks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ impl ProfileTracks {
self.have_least_played_tracks(),
self.have_oldest_tracks(),
]
.iter()
.filter(|x| **x)
.count()
.iter()
.filter(|x| **x)
.count()
}

/// Calculates the largest section from all sections included in the merger
Expand All @@ -113,9 +113,9 @@ impl ProfileTracks {
self.least_played.len(),
self.oldest.len(),
]
.iter()
.max()
.unwrap_or(&0_usize)
.iter()
.max()
.unwrap_or(&0_usize)
}

/// Returns a [`Vec`] of track IDs
Expand Down Expand Up @@ -425,7 +425,7 @@ async fn fetch_profile_tracks(
profile.get_profile_source_id(),
profile.get_time_limit() as f64,
)
.await?;
.await?;

match section.get_section_type() {
SectionType::Unplayed => {
Expand Down

0 comments on commit f9fb4ba

Please sign in to comment.