Merge lp:~jamesh/mediascanner/disable-tmdb into lp:mediascanner

Proposed by James Henstridge
Status: Merged
Approved by: Michal Hruby
Approved revision: 395
Merged at revision: 396
Proposed branch: lp:~jamesh/mediascanner/disable-tmdb
Merge into: lp:mediascanner
Diff against target: 66 lines (+13/-14)
3 files modified
CMakeLists.txt (+12/-12)
debian/rules (+0/-1)
mediascanner.gschema.xml.in (+1/-1)
To merge this branch: bzr merge lp:~jamesh/mediascanner/disable-tmdb
Reviewer Review Type Date Requested Status
Jussi Pakkanen (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+190901@code.launchpad.net

Commit message

Don't error out if no TheMovieDB API key is provided. Instead disable the grl-tmdb metadata resolver.

Description of the change

Don't error out if no TheMovieDB API key is provided. Instead disable the grl-tmdb metadata resolver.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

Seems sensible.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2013-10-07 06:59:09 +0000
3+++ CMakeLists.txt 2013-10-14 09:48:35 +0000
4@@ -153,6 +153,18 @@
5 OUTPUT_STRIP_TRAILING_WHITESPACE)
6
7 # =============================================================================
8+# Configure API key for "The Movie Database" API Key
9+# =============================================================================
10+
11+set(TMDB_APIKEY "" CACHE STRING "API key for \"The Movie Database\"")
12+
13+if(TMDB_APIKEY)
14+ set(TMDB_PLUGIN_CONFIG "(\"grl-tmdb\", \"grl-tmdb\", {\"api-key\": \"${TMDB_APIKEY}\"})")
15+else(TMDB_APIKEY)
16+ set(TMDB_PLUGIN_CONFIG "")
17+endif(TMDB_APIKEY)
18+
19+# =============================================================================
20 # Validate and install gsettings schema
21 # =============================================================================
22
23@@ -216,18 +228,6 @@
24 find_google_tests()
25
26 # =============================================================================
27-# Configure API key for "The Movie Database" API Key
28-# =============================================================================
29-
30-set(TMDB_APIKEY "" CACHE STRING "API key for \"The Movie Database\"")
31-
32-if (NOT TMDB_APIKEY)
33- message(FATAL_ERROR "No API key for \"The Movie Database\" configured")
34-endif (NOT TMDB_APIKEY)
35-
36-add_definitions(-DTMDB_APIKEY="${TMDB_APIKEY}")
37-
38-# =============================================================================
39
40 install(FILES README.md DESTINATION ${CMAKE_INSTALL_DOCDIR})
41
42
43=== modified file 'debian/rules'
44--- debian/rules 2013-08-20 08:13:11 +0000
45+++ debian/rules 2013-10-14 09:48:35 +0000
46@@ -12,7 +12,6 @@
47 override_dh_auto_configure:
48 dh_auto_configure -- \
49 -DCMAKE_INSTALL_LIBDIR="/usr/lib/${DEB_HOST_MULTIARCH}" \
50- -DTMDB_APIKEY="TDB:REPLACE-DUMMY-KEY" \
51 -DGLIB_SCHEMAS_COMPILE=OFF
52
53 # TODO(jamesh): A number of the test fixtures create and delete files
54
55=== modified file 'mediascanner.gschema.xml.in'
56--- mediascanner.gschema.xml.in 2013-10-07 04:38:32 +0000
57+++ mediascanner.gschema.xml.in 2013-10-14 09:48:35 +0000
58@@ -76,7 +76,7 @@
59 dictionary of strings describing configuration parameters like API keys.
60 </description>
61
62- <default>[("grl-tmdb", "grl-tmdb", {"api-key": "@TMDB_APIKEY@"})]</default>
63+ <default>[@TMDB_PLUGIN_CONFIG@]</default>
64 </key>
65 </schema>
66 </schemalist>

Subscribers

People subscribed via source and target branches