diff options
-rw-r--r-- | addons/skin.estuary/xml/Home.xml | 2 | ||||
-rw-r--r-- | version.txt | 4 | ||||
-rw-r--r-- | xbmc/GUIInfoManager.cpp | 11 | ||||
-rw-r--r-- | xbmc/guilib/guiinfo/GUIInfoLabels.h | 1 | ||||
-rw-r--r-- | xbmc/guilib/guiinfo/SystemGUIInfo.cpp | 13 | ||||
-rw-r--r-- | xbmc/input/joysticks/generic/ButtonMapping.cpp | 2 | ||||
-rw-r--r-- | xbmc/settings/DisplaySettings.cpp | 2 | ||||
-rw-r--r-- | xbmc/utils/SortUtils.cpp | 2 | ||||
-rw-r--r-- | xbmc/utils/StringUtils.cpp | 2 | ||||
-rw-r--r-- | xbmc/video/VideoDatabase.cpp | 46 | ||||
-rw-r--r-- | xbmc/windowing/X11/GLContextEGL.cpp | 2 |
11 files changed, 60 insertions, 27 deletions
diff --git a/addons/skin.estuary/xml/Home.xml b/addons/skin.estuary/xml/Home.xml index 164b02aa82..410eceb59b 100644 --- a/addons/skin.estuary/xml/Home.xml +++ b/addons/skin.estuary/xml/Home.xml @@ -793,7 +793,7 @@ <param name="button2_onclick" value="EjectTray()"/> <param name="button3_label" value="$LOCALIZE[600]"/> <param name="button3_onclick" value="RipCD"/> - <param name="visible_3" value="String.IsEqual(System.DVDLabel,Audio-CD)"/> + <param name="visible_3" value="System.HasMediaAudioCD"/> </include> </control> </control> diff --git a/version.txt b/version.txt index 8b0337ebd9..053ec4f320 100644 --- a/version.txt +++ b/version.txt @@ -5,8 +5,8 @@ WEBSITE http://kodi.tv VERSION_MAJOR 18 VERSION_MINOR 0 VERSION_TAG RC5 -VERSION_CODE 17.99.950 -ADDON_API 17.9.950 +VERSION_CODE 17.99.952 +ADDON_API 17.9.952 APP_PACKAGE org.xbmc.kodi PACKAGE_IDENTITY XBMCFoundation.Kodi PACKAGE_PUBLISHER C62BD90A-CDD8-477F-96C3-B25992247B97 diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp index a56b0832ec..c9d76335f4 100644 --- a/xbmc/GUIInfoManager.cpp +++ b/xbmc/GUIInfoManager.cpp @@ -1000,6 +1000,14 @@ const infomap weather[] = {{ "isfetched", WEATHER_IS_FETCHED }, /// @return **True** if there is a CD or DVD in the DVD-ROM drive. /// <p> /// } +/// \table_row3{ <b>`System.HasMediaAudioCD`</b>, +/// \anchor System_HasMediaAudioCD +/// _boolean_, +/// @return **True** if there is an audio CD in the optical drive. **False** if no drive available\, empty drive or other medium. +/// <p><hr> +/// @skinning_v18 **[New Boolean Condition]** \link System_HasMediaAudioCD `System.HasMediaAudioCD` \endlink +/// <p> +/// } /// \table_row3{ <b>`System.DVDReady`</b>, /// \anchor System_DVDReady /// _boolean_, @@ -1581,6 +1589,7 @@ const infomap weather[] = {{ "isfetched", WEATHER_IS_FETCHED }, /// } const infomap system_labels[] = {{ "hasnetwork", SYSTEM_ETHERNET_LINK_ACTIVE }, { "hasmediadvd", SYSTEM_MEDIA_DVD }, + { "hasmediaaudiocd", SYSTEM_MEDIA_AUDIO_CD }, { "dvdready", SYSTEM_DVDREADY }, { "trayopen", SYSTEM_TRAYOPEN }, { "haslocks", SYSTEM_HASLOCKS }, @@ -6055,7 +6064,7 @@ const infomap skin_labels[] = {{ "currenttheme", SKIN_THEME }, /// to make it easier for skins to work with custom icon sets\, it now will return the filename only /// i.e. 28.png /// @skinning_v13 **[Infolabel Updated]** \link Window_Weather_Property `Window(Weather).Property(property)`\endlink -/// added `WeatherProviderLogo` propertu - weather provider logo (for weather addons that support it). +/// added `WeatherProviderLogo` property - weather provider logo (for weather addons that support it). /// <p> /// } /// \table_end diff --git a/xbmc/guilib/guiinfo/GUIInfoLabels.h b/xbmc/guilib/guiinfo/GUIInfoLabels.h index 4930662cda..d9a572e9a4 100644 --- a/xbmc/guilib/guiinfo/GUIInfoLabels.h +++ b/xbmc/guilib/guiinfo/GUIInfoLabels.h @@ -422,6 +422,7 @@ #define SYSTEM_CAN_SUSPEND 751 #define SYSTEM_CAN_HIBERNATE 752 #define SYSTEM_CAN_REBOOT 753 +#define SYSTEM_MEDIA_AUDIO_CD 754 #define SLIDESHOW_ISPAUSED 800 #define SLIDESHOW_ISRANDOM 801 diff --git a/xbmc/guilib/guiinfo/SystemGUIInfo.cpp b/xbmc/guilib/guiinfo/SystemGUIInfo.cpp index e68aca1ba4..a27bda4868 100644 --- a/xbmc/guilib/guiinfo/SystemGUIInfo.cpp +++ b/xbmc/guilib/guiinfo/SystemGUIInfo.cpp @@ -488,6 +488,19 @@ bool CSystemGUIInfo::GetBool(bool& value, const CGUIListItem *gitem, int context case SYSTEM_MEDIA_DVD: value = g_mediaManager.IsDiscInDrive(); return true; + case SYSTEM_MEDIA_AUDIO_CD: + #ifdef HAS_DVD_DRIVE + if (g_mediaManager.IsDiscInDrive()) + { + MEDIA_DETECT::CCdInfo *pCdInfo = g_mediaManager.GetCdInfo(); + value = pCdInfo && (pCdInfo->IsAudio(1) || pCdInfo->IsCDExtra(1) || pCdInfo->IsMixedMode(1)); + } + else + #endif + { + value = false; + } + return true; #ifdef HAS_DVD_DRIVE case SYSTEM_DVDREADY: value = g_mediaManager.GetDriveStatus() != DRIVE_NOT_READY; diff --git a/xbmc/input/joysticks/generic/ButtonMapping.cpp b/xbmc/input/joysticks/generic/ButtonMapping.cpp index 58279a527c..a5af0744b5 100644 --- a/xbmc/input/joysticks/generic/ButtonMapping.cpp +++ b/xbmc/input/joysticks/generic/ButtonMapping.cpp @@ -531,7 +531,7 @@ CAxisDetector& CButtonMapping::GetAxis(unsigned int axisIndex, } // Report axis - CLog::Log(LOGDEBUG, "Axis %u discovered at position %.04f after %lu frames", + CLog::Log(LOGDEBUG, "Axis %u discovered at position %.4f after %lu frames", axisIndex, position, static_cast<unsigned long>(m_frameCount)); m_axes.insert(std::make_pair(axisIndex, CAxisDetector(this, axisIndex, config))); diff --git a/xbmc/settings/DisplaySettings.cpp b/xbmc/settings/DisplaySettings.cpp index a5c00dd05e..49f9137376 100644 --- a/xbmc/settings/DisplaySettings.cpp +++ b/xbmc/settings/DisplaySettings.cpp @@ -738,7 +738,7 @@ void CDisplaySettings::SettingOptionsRefreshRatesFiller(SettingConstPtr setting, std::string screenmode = GetStringFromResolution((RESOLUTION)refreshrate->ResInfo_Index, refreshrate->RefreshRate); if (!match && StringUtils::EqualsNoCase(std::static_pointer_cast<const CSettingString>(setting)->GetValue(), screenmode)) match = true; - list.push_back(std::make_pair(StringUtils::Format("%.02f", refreshrate->RefreshRate), screenmode)); + list.push_back(std::make_pair(StringUtils::Format("%.2f", refreshrate->RefreshRate), screenmode)); } if (!match) diff --git a/xbmc/utils/SortUtils.cpp b/xbmc/utils/SortUtils.cpp index 3b4cad4e1d..c579ff0e63 100644 --- a/xbmc/utils/SortUtils.cpp +++ b/xbmc/utils/SortUtils.cpp @@ -349,7 +349,7 @@ std::string ByVideoCodec(SortAttribute attributes, const SortItem &values) std::string ByVideoAspectRatio(SortAttribute attributes, const SortItem &values) { - return StringUtils::Format("%.03f %s", values.at(FieldVideoAspectRatio).asFloat(), ByLabel(attributes, values).c_str()); + return StringUtils::Format("%.3f %s", values.at(FieldVideoAspectRatio).asFloat(), ByLabel(attributes, values).c_str()); } std::string ByAudioChannels(SortAttribute attributes, const SortItem &values) diff --git a/xbmc/utils/StringUtils.cpp b/xbmc/utils/StringUtils.cpp index 9c2663edb7..c08b94e3e1 100644 --- a/xbmc/utils/StringUtils.cpp +++ b/xbmc/utils/StringUtils.cpp @@ -964,7 +964,7 @@ std::string StringUtils::SizeToString(int64_t size) } if (!i) - strLabel = StringUtils::Format("%.0lf B", s); + strLabel = StringUtils::Format("%.lf B", s); else if (i == ARRAY_SIZE(prefixes)) { if (s >= 1000.0) diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp index a924a263c0..28f88c5b83 100644 --- a/xbmc/video/VideoDatabase.cpp +++ b/xbmc/video/VideoDatabase.cpp @@ -397,6 +397,20 @@ void CVideoDatabase::CreateViews() "GROUP BY tvshow.idShow"); m_pDS->exec(tvshowcounts); + CLog::Log(LOGINFO, "create tvshowlinkpath_minview"); + // This view only exists to workaround a limitation in MySQL <5.7 which is not able to + // perform subqueries in joins. + // Also, the correct solution is to remove the path information altogether, since a + // TV series can always have multiple paths. It is used in the GUI at the moment, but + // such usage should be removed together with this view and the path columns in tvshow_view. + //!@todo Remove the hacky selection of a semi-random path for tvshows from the queries and UI + std::string tvshowlinkpathview = PrepareSQL("CREATE VIEW tvshowlinkpath_minview AS SELECT " + " idShow, " + " min(idPath) AS idPath " + "FROM tvshowlinkpath " + "GROUP BY idShow"); + m_pDS->exec(tvshowlinkpathview); + CLog::Log(LOGINFO, "create tvshow_view"); std::string tvshowview = PrepareSQL("CREATE VIEW tvshow_view AS SELECT " " tvshow.*," @@ -410,12 +424,10 @@ void CVideoDatabase::CreateViews() " uniqueid.value AS uniqueid_value, " " uniqueid.type AS uniqueid_type " "FROM tvshow" - " LEFT JOIN (SELECT idShow, MAX(idPath) as idPath " - " FROM tvshowlinkpath " - " GROUP BY tvshowlinkpath.idShow) AS tvshowlinkpath ON " - " tvshowlinkpath.idShow=tvshow.idShow" + " LEFT JOIN tvshowlinkpath_minview ON " + " tvshowlinkpath_minview.idShow=tvshow.idShow" " LEFT JOIN path ON" - " path.idPath=tvshowlinkpath.idPath" + " path.idPath=tvshowlinkpath_minview.idPath" " INNER JOIN tvshowcounts ON" " tvshow.idShow = tvshowcounts.idShow " " LEFT JOIN rating ON" @@ -450,17 +462,17 @@ void CVideoDatabase::CreateViews() " JOIN files ON" " files.idFile = episode.idFile " "GROUP BY seasons.idSeason," - " seasons.idShow," - " seasons.season," - " seasons.name," - " seasons.userrating," - " tvshow_view.strPath," - " tvshow_view.c%02d," - " tvshow_view.c%02d," - " tvshow_view.c%02d," - " tvshow_view.c%02d," - " tvshow_view.c%02d," - " tvshow_view.c%02d ", + " seasons.idShow," + " seasons.season," + " seasons.name," + " seasons.userrating," + " tvshow_view.strPath," + " tvshow_view.c%02d," + " tvshow_view.c%02d," + " tvshow_view.c%02d," + " tvshow_view.c%02d," + " tvshow_view.c%02d," + " tvshow_view.c%02d ", VIDEODB_ID_TV_TITLE, VIDEODB_ID_TV_PLOT, VIDEODB_ID_TV_PREMIERED, VIDEODB_ID_TV_GENRE, VIDEODB_ID_TV_STUDIOS, VIDEODB_ID_TV_MPAA, VIDEODB_ID_EPISODE_AIRED, VIDEODB_ID_EPISODE_SEASON, @@ -5455,7 +5467,7 @@ void CVideoDatabase::UpdateTables(int iVersion) int CVideoDatabase::GetSchemaVersion() const { - return 115; + return 116; } bool CVideoDatabase::LookupByFolders(const std::string &path, bool shows) diff --git a/xbmc/windowing/X11/GLContextEGL.cpp b/xbmc/windowing/X11/GLContextEGL.cpp index 272cd96214..2b6b5d35e3 100644 --- a/xbmc/windowing/X11/GLContextEGL.cpp +++ b/xbmc/windowing/X11/GLContextEGL.cpp @@ -433,7 +433,6 @@ void CGLContextEGL::SwapBuffers() if ((msc1 - m_sync.msc1) > 2) { m_sync.cont = 0; - CLog::Log(LOGDEBUG, "CGLContextEGL::SwapBuffers: sync reset"); } // we want to block in SwapBuffers @@ -449,7 +448,6 @@ void CGLContextEGL::SwapBuffers() { m_sync.interval = (ust1 - m_sync.ust1) / (msc1 - m_sync.msc1); m_sync.cont++; - CLog::Log(LOGDEBUG, "CGLContextEGL::SwapBuffers: sync interval: %ld", m_sync.interval); } } else if (m_sync.cont == 5 && m_omlSync) |