Skip to content

Commit

Permalink
fix: fix artwork for collection children
Browse files Browse the repository at this point in the history
  • Loading branch information
lostb1t committed Aug 12, 2023
1 parent 0e85492 commit d24c7b8
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 225 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store

/target
/vendor
/vendor
.vscode
45 changes: 27 additions & 18 deletions 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 Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ docker-run:


run:
REPLEX_REDIRECT_STREAMS=0 REPLEX_DISABLE_RELATED=1 REPLEX_DISABLE_LEAF_COUNT=0 REPLEX_DISABLE_USER_STATE=1 REPLEX_ENABLE_CONSOLE=0 REPLEX_CACHE_TTL=0 REPLEX_HOST=https://46-4-30-217.01b0839de64b49138531cab1bf32f7c2.plex.direct:42405 RUST_LOG="info,replex=debug" cargo watch -x run
REPLEX_REDIRECT_STREAMS=0 REPLEX_DISABLE_RELATED=1 REPLEX_DISABLE_LEAF_COUNT=0 REPLEX_DISABLE_USER_STATE=1 REPLEX_ENABLE_CONSOLE=0 REPLEX_CACHE_TTL=300 REPLEX_HOST=https://46-4-30-217.01b0839de64b49138531cab1bf32f7c2.plex.direct:42405 RUST_LOG="info,replex=info" cargo watch -x run

# run:
# REPLEX_ENABLE_CONSOLE=0 REPLEX_CACHE_TTL=0 REPLEX_HOST=https://46-4-30-217.01b0839de64b49138531cab1bf32f7c2.plex.direct:42405 RUST_LOG="info" cargo run
Expand Down
3 changes: 1 addition & 2 deletions src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ impl MetaData {
plex_client: PlexClient,
) -> Option<String> {
self.guid.as_ref()?;

let cache_key = format!("{}:cover_art", self.guid.clone().unwrap());

let cached_result: Option<Option<String>> =
Expand All @@ -452,7 +452,6 @@ impl MetaData {
if cached_result.is_some() {
return cached_result.unwrap();
}

let guid = self
.guid
.clone()
Expand Down
2 changes: 1 addition & 1 deletion src/plex_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ impl PlexClient {
.send()
.await
.map_err(Error::other)?;

// dbg!(&res.status());
let container: MediaContainerWrapper<MediaContainer> =
from_reqwest_response(res).await?;
Ok(container)
Expand Down
2 changes: 1 addition & 1 deletion src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ pub fn route() -> Router {
.push(
Router::new()
.path("/replex/library/collections/<ids>/children")
.hoop(default_cache())
// .hoop(default_cache())
.get(get_collections_children),
)
.push(
Expand Down
Loading

0 comments on commit d24c7b8

Please sign in to comment.