Skip to content

Commit

Permalink
chore(emby): recommended authorization header format (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-online authored Jan 10, 2025
1 parent 7176bed commit 0ed284c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 6 additions & 1 deletion src/service/targets/emby.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,12 @@ impl Emby {
fn get_client(&self) -> anyhow::Result<reqwest::Client> {
let mut headers = header::HeaderMap::new();

headers.insert("X-Emby-Token", self.token.parse().unwrap());
headers.insert(
"Authorzation",
format!("MediaBrowser Token=\"{}\"", self.token)
.parse()
.unwrap(),
);
headers.insert("Accept", "application/json".parse().unwrap());

reqwest::Client::builder()
Expand Down
7 changes: 4 additions & 3 deletions ui/src/routes/status/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ $: ev = $page.data.ev;
let updateTimeout: number;
function autoReload() {
async function autoReload() {
await invalidateAll();
updateTimeout = setTimeout(() => {
invalidateAll();
}, 5000);
autoReload();
}, 500);
}
onMount(() => {
Expand Down

0 comments on commit 0ed284c

Please sign in to comment.