From 0bca1ee7d87b716dcdd184c5fbba7b8405166a01 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 29 Apr 2018 03:13:08 +0200 Subject: [PATCH] neutrino.cpp: add defined api keys into online service settings Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/22aedc0b3f6188a550c5d66d296da6225007b1b0 Author: Thilo Graf Date: 2018-04-29 (Sun, 29 Apr 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/neutrino.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 45e9d95ad..7cc7c749d 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -943,18 +943,20 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.movieplayer_display_playtime = configfile.getInt32("movieplayer_display_playtime", 0); //online services - g_settings.youtube_dev_id = configfile.getString("youtube_dev_id","AIzaSyBLdZe7M3rpNMZqSj-3IEvjbb2hATWJIdM"); //NI + std::string yt_api_key = YT_DEV_KEY; + g_settings.youtube_dev_id = configfile.getString("youtube_dev_id", yt_api_key.empty() ? "AIzaSyBLdZe7M3rpNMZqSj-3IEvjbb2hATWJIdM" : yt_api_key); g_settings.youtube_enabled = configfile.getInt32("youtube_enabled", 1); g_settings.youtube_enabled = g_settings.youtube_enabled && check_youtube_dev_id(); - g_settings.tmdb_api_key = configfile.getString("tmdb_api_key","7270f1b571c4ecbb5b204ddb7f8939b1"); //NI + std::string tmdb_api_key = TMDB_DEV_KEY; + g_settings.tmdb_api_key = configfile.getString("tmdb_api_key", tmdb_api_key.empty() ? "7270f1b571c4ecbb5b204ddb7f8939b1" : tmdb_api_key); g_settings.tmdb_enabled = configfile.getInt32("tmdb_enabled", 1); g_settings.tmdb_enabled = g_settings.tmdb_enabled && check_tmdb_api_key(); - - g_settings.omdb_api_key = configfile.getString("omdb_api_key","XXXXXXXX"); + std::string omdb_api_key = OMDB_API_KEY; + g_settings.omdb_api_key = configfile.getString("omdb_api_key", omdb_api_key.empty() ? "XXXXXXXX" : omdb_api_key); g_settings.omdb_enabled = configfile.getInt32("omdb_enabled", 1); g_settings.omdb_enabled = g_settings.omdb_enabled && check_omdb_api_key(); - - g_settings.shoutcast_dev_id = configfile.getString("shoutcast_dev_id","fa1669MuiRPorUBw"); + std::string sc_api_key = SHOUTCAST_DEV_KEY; + g_settings.shoutcast_dev_id = configfile.getString("shoutcast_dev_id", sc_api_key.empty() ? "fa1669MuiRPorUBw" : sc_api_key); g_settings.shoutcast_enabled = configfile.getInt32("shoutcast_enabled", 1); g_settings.shoutcast_enabled = g_settings.shoutcast_enabled && check_shoutcast_dev_id();