aboutsummaryrefslogtreecommitdiff
path: root/import/src/trakt.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-04-23 13:58:03 +0200
committermetamuffin <metamuffin@disroot.org>2025-04-23 13:58:03 +0200
commit960007b06e2b47d41f88365c26f043f61c817f08 (patch)
tree165dd8deaa294ed2d4a9719c41dd66a02261c1f2 /import/src/trakt.rs
parent5d2145406c4f2e11b0cde06f5f12c9d16ab51ded (diff)
downloadjellything-960007b06e2b47d41f88365c26f043f61c817f08.tar
jellything-960007b06e2b47d41f88365c26f043f61c817f08.tar.bz2
jellything-960007b06e2b47d41f88365c26f043f61c817f08.tar.zst
import: send user-agent header to all apis
Diffstat (limited to 'import/src/trakt.rs')
-rw-r--r--import/src/trakt.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/import/src/trakt.rs b/import/src/trakt.rs
index 2f8618d..86f2f42 100644
--- a/import/src/trakt.rs
+++ b/import/src/trakt.rs
@@ -3,6 +3,7 @@
which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
Copyright (C) 2025 metamuffin <metamuffin.org>
*/
+use crate::USER_AGENT;
use anyhow::Context;
use bincode::{Decode, Encode};
use jellybase::{
@@ -37,6 +38,10 @@ impl Trakt {
HeaderName::from_static("content-type"),
HeaderValue::from_static("application/json"),
),
+ (
+ HeaderName::from_static("user-agent"),
+ HeaderValue::from_static(USER_AGENT),
+ ),
]))
.build()
.unwrap();