From ce88037a7064f4690f51f9db1707142dec2d5cb1 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 29 May 2017 12:57:28 +0200 Subject: [PATCH] imdb: add runtime locale; split release-date and runtime Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/2bdf1b6eccf50c3bd6995101304d369a8db1e9a7 Author: vanhofen Date: 2017-05-29 (Mon, 29 May 2017) Origin message was: ------------------ - imdb: add runtime locale; split release-date and runtime ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 1 + data/locale/english.locale | 1 + src/gui/imdb.cpp | 5 ++++- src/system/locals.h | 1 + src/system/locals_intern.h | 1 + 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index c0084572f..a2a31c5e8 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -879,6 +879,7 @@ imdb.data_plot Handlung imdb.data_production Produktion imdb.data_rating_failed Keine Bewertung imdb.data_released Veröffentlicht +imdb.data_runtime Spieldauer imdb.data_title Originaltitel imdb.data_votes Stimmen imdb.data_website Webseite diff --git a/data/locale/english.locale b/data/locale/english.locale index 9215e8786..e2f76a50c 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -879,6 +879,7 @@ imdb.data_plot Plot imdb.data_production Production imdb.data_rating_failed No rating imdb.data_released Released +imdb.data_runtime Runtime imdb.data_title Original title imdb.data_votes Votes imdb.data_website Website diff --git a/src/gui/imdb.cpp b/src/gui/imdb.cpp index 72bbe375e..cfc5503cc 100644 --- a/src/gui/imdb.cpp +++ b/src/gui/imdb.cpp @@ -357,7 +357,10 @@ void CIMDB::getIMDbData(std::string& txt) if (checkIMDbElement("Metascore")) txt += g_Locale->getString(LOCALE_IMDB_DATA_METASCORE) + ": " + m["Metascore"] + "/100\n"; txt += g_Locale->getString(LOCALE_IMDB_DATA_TITLE) + ": " + m["Title"] + "\n"; - txt += g_Locale->getString(LOCALE_IMDB_DATA_RELEASED) + ": " + m["Released"] + " | " + m["Country"] + " | " + m["Runtime"] + "\n"; + if (checkIMDbElement("Released")) + txt += g_Locale->getString(LOCALE_IMDB_DATA_RELEASED) + ": " + m["Country"] + ", " + m["Released"] + "\n"; + if (checkIMDbElement("Runtime")) + txt += g_Locale->getString(LOCALE_IMDB_DATA_RUNTIME) + ": " + m["Runtime"] + "\n"; if (checkIMDbElement("Genre")) txt += g_Locale->getString(LOCALE_IMDB_DATA_GENRE) + ": " + m["Genre"] + "\n"; if (checkIMDbElement("Awards")) diff --git a/src/system/locals.h b/src/system/locals.h index 90c89bc7b..2b29b273f 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -906,6 +906,7 @@ typedef enum LOCALE_IMDB_DATA_PRODUCTION, LOCALE_IMDB_DATA_RATING_FAILED, LOCALE_IMDB_DATA_RELEASED, + LOCALE_IMDB_DATA_RUNTIME, LOCALE_IMDB_DATA_TITLE, LOCALE_IMDB_DATA_VOTES, LOCALE_IMDB_DATA_WEBSITE, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index fec764620..e2132e314 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -906,6 +906,7 @@ const char * locale_real_names[] = "imdb.data_production", "imdb.data_rating_failed", "imdb.data_released", + "imdb.data_runtime", "imdb.data_title", "imdb.data_votes", "imdb.data_website",