Skip to content

Commit

Permalink
fix: some more debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
lostb1t committed Jul 9, 2024
1 parent 6f99df3 commit cf885e4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,9 @@ async fn ntf_watchlist_force(

let params: PlexContext = req.extract().await.unwrap();

// client id is a actually not needed. notifications settings seem to be global
if params.clone().client_identifier.is_some() && params.clone().token.is_some() {
if params.clone().token.is_some() {
tokio::spawn(async move {
let url = format!("https://notifications.plex.tv/api/v1/notifications/settings?X-Plex-Client-Identifier={}&X-Plex-Token={}", params.clone().client_identifier.unwrap(),params.clone().token.unwrap());
let url = format!("https://notifications.plex.tv/api/v1/notifications/settings?X-Plex-Token={}", params.clone().token.unwrap());
let json_data = r#"{"enabled": true,"libraries": [],"identifier": "tv.plex.notification.library.new"}"#;
let client = reqwest::Client::new();

Expand All @@ -341,9 +340,11 @@ async fn ntf_watchlist_force(
.await
.unwrap();

println!("Set watchlist for user: {} platform: {} status: {}",
println!("Set watchlist for user: {} platform: {} product: {} device name: {} status: {}",
params.clone().username.unwrap_or_default(),
params.clone().platform,
params.clone().product.unwrap_or_default(),
params.clone().device_name.unwrap_or_default(),
&response.status()
);
dbg!(params.clone())
Expand Down

0 comments on commit cf885e4

Please sign in to comment.