File: 0001-tmdb_provider-use-Debian-specific-API-key-by-default.patch

package info (click to toggle)
ticketbooth 1.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,384 kB
  • sloc: python: 4,863; makefile: 5; sh: 1
file content (31 lines) | stat: -rw-r--r-- 1,160 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Date: Tue, 26 Sep 2023 11:41:20 +0200
Subject: tmdb_provider: use Debian-specific API key by default

Upstream provides an API key for use with their Flatpak'ed version,
which is set by setting the environment variable `TMDB_KEY` in a script.
This approach doesn't work well for Debian as it requires adding a
wrapper script, so we'll default to a Debian-specific key in case the
env var is not set.

Forwarded: not-needed, Debian-specific change
---
 src/providers/tmdb_provider.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/providers/tmdb_provider.py b/src/providers/tmdb_provider.py
index f910ca0..0891534 100644
--- a/src/providers/tmdb_provider.py
+++ b/src/providers/tmdb_provider.py
@@ -26,8 +26,10 @@ class TMDBProvider:
 
     if shared.schema.get_boolean('use-own-tmdb-key'):
         tmdb.API_KEY = shared.schema.get_string('own-tmdb-key')
-    else:
+    elif 'TMDB_KEY' in os.environ:
         tmdb.API_KEY = os.environ.get('TMDB_KEY')
+    else:
+        tmdb.API_KEY = "28122e6ad191847f2cbcdf6d965c8773"
 
     def __init__(self):
         super().__init__()