Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ddboline committed Oct 20, 2024
1 parent 38ba7ff commit d74c3aa
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 32 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "movie_collection_rust"
version = "0.10.49"
version = "0.10.50"
authors = ["Daniel Boline <[email protected]>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion movie_collection_http/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "movie_collection_http"
version = "0.10.49"
version = "0.10.50"
authors = ["Daniel Boline <[email protected]>"]
edition = "2018"

Expand Down
10 changes: 2 additions & 8 deletions movie_collection_http/src/movie_queue_requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,14 +381,8 @@ impl MovieCollectionUpdateRequest {

let mc = MovieCollection::new(config, pool, &stdout);
for entry in &self.collection {
if mc
.get_collection_index(entry.path.as_ref())
.await?
.is_none()
{
mc.insert_into_collection(entry.path.as_ref(), false)
.await?;
}
mc.insert_into_collection(entry.path.as_ref(), false)
.await?;
}
Ok(())
}
Expand Down
28 changes: 8 additions & 20 deletions movie_collection_http/src/movie_queue_routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1829,17 +1829,11 @@ pub async fn plex_filename_update(
.await;
let payload = payload.into_inner();
for filename in payload.filenames {
if PlexFilename::get_by_key(&state.db, &filename.metadata_key)
let filename: PlexFilename = filename.into();
filename
.insert(&state.db)
.await
.map_err(Into::<Error>::into)?
.is_none()
{
let filename: PlexFilename = filename.into();
filename
.insert(&state.db)
.await
.map_err(Into::<Error>::into)?;
}
.map_err(Into::<Error>::into)?;
}
task.await.ok();
Ok(HtmlBase::new("Success").into())
Expand Down Expand Up @@ -1922,17 +1916,11 @@ pub async fn plex_metadata_update(
.await;
let payload = payload.into_inner();
for metadata in payload.entries {
if PlexMetadata::get_by_key(&state.db, &metadata.metadata_key)
let metadata: PlexMetadata = metadata.into();
metadata
.insert(&state.db)
.await
.map_err(Into::<Error>::into)?
.is_none()
{
let metadata: PlexMetadata = metadata.into();
metadata
.insert(&state.db)
.await
.map_err(Into::<Error>::into)?;
}
.map_err(Into::<Error>::into)?;
}
task.await.ok();
Ok(HtmlBase::new("Success").into())
Expand Down
2 changes: 1 addition & 1 deletion movie_collection_lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "movie_collection_lib"
version = "0.10.49"
version = "0.10.50"
authors = ["Daniel Boline <[email protected]>"]
edition = "2018"

Expand Down
1 change: 1 addition & 0 deletions movie_collection_lib/src/plex_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ impl PlexEvent {
$grandparent_title, $added_at, $updated_at, $last_modified,
$metadata_type, $section_type, $section_title, $metadata_key
)
ON CONFLICT DO NOTHING
",
id = self.id,
event = self.event,
Expand Down
2 changes: 1 addition & 1 deletion transcode_lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "transcode_lib"
version = "0.10.49"
version = "0.10.50"
authors = ["Daniel Boline <[email protected]>"]
edition = "2018"

Expand Down

0 comments on commit d74c3aa

Please sign in to comment.