diff options
27 files changed, 216 insertions, 98 deletions
diff --git a/addons/repository.pvr-android.xbmc.org/addon.xml b/addons/repository.pvr-android.xbmc.org/addon.xml new file mode 100644 index 0000000000..aa1f74ccb2 --- /dev/null +++ b/addons/repository.pvr-android.xbmc.org/addon.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<addon id="repository.pvr-android.xbmc.org" + name="XBMC.org PVR Add-ons" + version="1.0.0" + provider-name="Team XBMC"> + <requires> + <import addon="xbmc.addon" version="12.0.0"/> + </requires> + <extension point="xbmc.addon.repository" + name="Official XBMC.org PVR Add-on Repository"> + <info compressed="true">http://mirrors.xbmc.org/addons/frodo/pvr/android/addons.xml</info> + <checksum>http://mirrors.xbmc.org/addons/frodo/pvr/android/addons.xml.md5</checksum> + <datadir zip="true">http://mirrors.xbmc.org/addons/frodo/pvr/android</datadir> + <hashes>true</hashes> + </extension> + <extension point="xbmc.addon.metadata"> + <summary lang="en">Install PVR Add-ons from XBMC.org</summary> + <description lang="en">Download and install PVR add-ons from the Official XBMC.org addon repository.[CR] By using the official Repository you will be able to take advantage of our extensive file mirror service to help get you faster downloads from a region close to you.[CR] All addons on this repository have under gone basic testing, if you find a broken or not working addon please report it to Team XBMC so we can take any action needed.</description> + <disclaimer lang="en">Team XBMC did not make all the add-ons on this repository and are not responsible for their content</disclaimer> + <platform>android</platform> + </extension> +</addon> diff --git a/addons/repository.pvr-android.xbmc.org/icon.png b/addons/repository.pvr-android.xbmc.org/icon.png Binary files differnew file mode 100644 index 0000000000..a7ad3ebb84 --- /dev/null +++ b/addons/repository.pvr-android.xbmc.org/icon.png diff --git a/addons/repository.pvr-ios.xbmc.org/addon.xml b/addons/repository.pvr-ios.xbmc.org/addon.xml new file mode 100644 index 0000000000..3980724d09 --- /dev/null +++ b/addons/repository.pvr-ios.xbmc.org/addon.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<addon id="repository.pvr-ios.xbmc.org" + name="XBMC.org PVR Add-ons" + version="1.0.0" + provider-name="Team XBMC"> + <requires> + <import addon="xbmc.addon" version="12.0.0"/> + </requires> + <extension point="xbmc.addon.repository" + name="Official XBMC.org PVR Add-on Repository"> + <info compressed="true">http://mirrors.xbmc.org/addons/frodo/pvr/ios/addons.xml</info> + <checksum>http://mirrors.xbmc.org/addons/frodo/pvr/ios/addons.xml.md5</checksum> + <datadir zip="true">http://mirrors.xbmc.org/addons/frodo/pvr/ios</datadir> + <hashes>true</hashes> + </extension> + <extension point="xbmc.addon.metadata"> + <summary lang="en">Install PVR Add-ons from XBMC.org</summary> + <description lang="en">Download and install PVR add-ons from the Official XBMC.org addon repository.[CR] By using the official Repository you will be able to take advantage of our extensive file mirror service to help get you faster downloads from a region close to you.[CR] All addons on this repository have under gone basic testing, if you find a broken or not working addon please report it to Team XBMC so we can take any action needed.</description> + <disclaimer lang="en">Team XBMC did not make all the add-ons on this repository and are not responsible for their content</disclaimer> + <platform>ios</platform> + </extension> +</addon> diff --git a/addons/repository.pvr-ios.xbmc.org/icon.png b/addons/repository.pvr-ios.xbmc.org/icon.png Binary files differnew file mode 100644 index 0000000000..a7ad3ebb84 --- /dev/null +++ b/addons/repository.pvr-ios.xbmc.org/icon.png diff --git a/addons/repository.pvr-osx32.xbmc.org/addon.xml b/addons/repository.pvr-osx32.xbmc.org/addon.xml new file mode 100644 index 0000000000..6461fd2433 --- /dev/null +++ b/addons/repository.pvr-osx32.xbmc.org/addon.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<addon id="repository.pvr-osx32.xbmc.org" + name="XBMC.org PVR Add-ons" + version="1.0.0" + provider-name="Team XBMC"> + <requires> + <import addon="xbmc.addon" version="12.0.0"/> + </requires> + <extension point="xbmc.addon.repository" + name="Official XBMC.org PVR Add-on Repository"> + <info compressed="true">http://mirrors.xbmc.org/addons/frodo/pvr/osx32/addons.xml</info> + <checksum>http://mirrors.xbmc.org/addons/frodo/pvr/osx32/addons.xml.md5</checksum> + <datadir zip="true">http://mirrors.xbmc.org/addons/frodo/pvr/osx32</datadir> + <hashes>true</hashes> + </extension> + <extension point="xbmc.addon.metadata"> + <summary lang="en">Install PVR Add-ons from XBMC.org</summary> + <description lang="en">Download and install PVR add-ons from the Official XBMC.org addon repository.[CR] By using the official Repository you will be able to take advantage of our extensive file mirror service to help get you faster downloads from a region close to you.[CR] All addons on this repository have under gone basic testing, if you find a broken or not working addon please report it to Team XBMC so we can take any action needed.</description> + <disclaimer lang="en">Team XBMC did not make all the add-ons on this repository and are not responsible for their content</disclaimer> + <platform>osx32</platform> + </extension> +</addon> diff --git a/addons/repository.pvr-osx32.xbmc.org/icon.png b/addons/repository.pvr-osx32.xbmc.org/icon.png Binary files differnew file mode 100644 index 0000000000..a7ad3ebb84 --- /dev/null +++ b/addons/repository.pvr-osx32.xbmc.org/icon.png diff --git a/addons/repository.pvr-osx64.xbmc.org/addon.xml b/addons/repository.pvr-osx64.xbmc.org/addon.xml new file mode 100644 index 0000000000..de8df69ab2 --- /dev/null +++ b/addons/repository.pvr-osx64.xbmc.org/addon.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<addon id="repository.pvr-osx64.xbmc.org" + name="XBMC.org PVR Add-ons" + version="1.0.0" + provider-name="Team XBMC"> + <requires> + <import addon="xbmc.addon" version="12.0.0"/> + </requires> + <extension point="xbmc.addon.repository" + name="Official XBMC.org PVR Add-on Repository"> + <info compressed="true">http://mirrors.xbmc.org/addons/frodo/pvr/osx64/addons.xml</info> + <checksum>http://mirrors.xbmc.org/addons/frodo/pvr/osx64/addons.xml.md5</checksum> + <datadir zip="true">http://mirrors.xbmc.org/addons/frodo/pvr/osx64</datadir> + <hashes>true</hashes> + </extension> + <extension point="xbmc.addon.metadata"> + <summary lang="en">Install PVR Add-ons from XBMC.org</summary> + <description lang="en">Download and install PVR add-ons from the Official XBMC.org addon repository.[CR] By using the official Repository you will be able to take advantage of our extensive file mirror service to help get you faster downloads from a region close to you.[CR] All addons on this repository have under gone basic testing, if you find a broken or not working addon please report it to Team XBMC so we can take any action needed.</description> + <disclaimer lang="en">Team XBMC did not make all the add-ons on this repository and are not responsible for their content</disclaimer> + <platform>osx64</platform> + </extension> +</addon> diff --git a/addons/repository.pvr-osx64.xbmc.org/icon.png b/addons/repository.pvr-osx64.xbmc.org/icon.png Binary files differnew file mode 100644 index 0000000000..a7ad3ebb84 --- /dev/null +++ b/addons/repository.pvr-osx64.xbmc.org/icon.png diff --git a/addons/repository.pvr-win32.xbmc.org/addon.xml b/addons/repository.pvr-win32.xbmc.org/addon.xml new file mode 100644 index 0000000000..353bc0f813 --- /dev/null +++ b/addons/repository.pvr-win32.xbmc.org/addon.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<addon id="repository.pvr-win32.xbmc.org" + name="XBMC.org PVR Add-ons" + version="1.0.0" + provider-name="Team XBMC"> + <requires> + <import addon="xbmc.addon" version="12.0.0"/> + </requires> + <extension point="xbmc.addon.repository" + name="Official XBMC.org PVR Add-on Repository"> + <info compressed="true">http://mirrors.xbmc.org/addons/frodo/pvr/win32/addons.xml</info> + <checksum>http://mirrors.xbmc.org/addons/frodo/pvr/win32/addons.xml.md5</checksum> + <datadir zip="true">http://mirrors.xbmc.org/addons/frodo/pvr/win32</datadir> + <hashes>true</hashes> + </extension> + <extension point="xbmc.addon.metadata"> + <summary lang="en">Install PVR Add-ons from XBMC.org</summary> + <description lang="en">Download and install PVR add-ons from the Official XBMC.org addon repository.[CR] By using the official Repository you will be able to take advantage of our extensive file mirror service to help get you faster downloads from a region close to you.[CR] All addons on this repository have under gone basic testing, if you find a broken or not working addon please report it to Team XBMC so we can take any action needed.</description> + <disclaimer lang="en">Team XBMC did not make all the add-ons on this repository and are not responsible for their content</disclaimer> + <platform>windx wingl</platform> + </extension> +</addon> diff --git a/addons/repository.pvr-win32.xbmc.org/icon.png b/addons/repository.pvr-win32.xbmc.org/icon.png Binary files differnew file mode 100644 index 0000000000..a7ad3ebb84 --- /dev/null +++ b/addons/repository.pvr-win32.xbmc.org/icon.png diff --git a/addons/xbmc.pvr/addon.xml b/addons/xbmc.pvr/addon.xml new file mode 100644 index 0000000000..d21b21cb41 --- /dev/null +++ b/addons/xbmc.pvr/addon.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<addon id="xbmc.pvr" version="1.6.0" provider-name="Team XBMC"> + <requires> + <import addon="xbmc.core" version="0.1.0"/> + </requires> +</addon> diff --git a/project/Win32BuildSetup/buildpvraddons.bat b/project/Win32BuildSetup/buildpvraddons.bat index 7e5fe7c4c0..e65eb13765 100644 --- a/project/Win32BuildSetup/buildpvraddons.bat +++ b/project/Win32BuildSetup/buildpvraddons.bat @@ -9,7 +9,7 @@ SET DEPS_DIR=..\BuildDependencies SET TMP_DIR=%DEPS_DIR%\tmp SET LIBNAME=xbmc-pvr-addons -SET VERSION=528780fab48a63637fd959f68cc996af2a272217 +SET VERSION=0482a89a81f3f3de8f61ac620abcd79c116e8a9d SET SOURCE=%LIBNAME% SET GIT_URL=git://github.com/opdenkamp/%LIBNAME%.git SET SOURCE_DIR=%TMP_DIR%\%SOURCE% diff --git a/tools/android/depends/xbmc-pvr-addons/Makefile b/tools/android/depends/xbmc-pvr-addons/Makefile index 8ad7d7c4be..d3c658634d 100644 --- a/tools/android/depends/xbmc-pvr-addons/Makefile +++ b/tools/android/depends/xbmc-pvr-addons/Makefile @@ -2,7 +2,7 @@ include ../Makefile.include DEPS= ../Makefile.include Makefile LIBNAME=xbmc-pvr-addons -VERSION=528780fab48a63637fd959f68cc996af2a272217 +VERSION=0482a89a81f3f3de8f61ac620abcd79c116e8a9d GIT_DIR=$(TARBALLS_LOCATION)/$(LIBNAME).git BASE_URL=git://github.com/opdenkamp/$(LIBNAME).git DYLIB=$(PLATFORM)/addons/pvr.demo/.libs/libpvrdemo-addon.so diff --git a/tools/android/packaging/Makefile b/tools/android/packaging/Makefile index fbfeb35c31..124be50dc2 100644 --- a/tools/android/packaging/Makefile +++ b/tools/android/packaging/Makefile @@ -36,7 +36,7 @@ libs= $(DSTLIBS) multi: x86 arm @cp images/xbmcapp-debug-skeleton.apk images/xbmcapp-debug-multi-unaligned.apk @cd xbmc; zip -r -q ../images/xbmcapp-debug-multi-unaligned.apk lib/ assets - @jarsigner -keystore ~/.android/debug.keystore -storepass android images/xbmcapp-debug-multi-unaligned.apk androiddebugkey + @jarsigner -sigalg MD5withRSA -digestalg SHA1 -keystore ~/.android/debug.keystore -storepass android images/xbmcapp-debug-multi-unaligned.apk androiddebugkey @$(SDKROOT)/tools/zipalign -f 4 images/xbmcapp-debug-multi-unaligned.apk $(XBMCROOT)/xbmcapp-multi-debug.apk @rm images/xbmcapp-debug-multi-unaligned.apk @echo "$(XBMCROOT)/xbmcapp-multi-debug.apk created" @@ -47,7 +47,7 @@ package: extras @javac -classpath $(SDKROOT)/platforms/$(SDK_PLATFORM)/android.jar:xbmc/obj -d xbmc/obj -sourcepath xbmc/src xbmc/src/org/xbmc/xbmc/*.java @$(DX) --dex --output=xbmc/classes.dex xbmc/obj @cd xbmc; zip -r -q ../images/xbmcapp-debug-$(PLATFORM)-unaligned.apk lib/$(PLATFORM) assets classes.dex - @jarsigner -keystore ~/.android/debug.keystore -storepass android images/xbmcapp-debug-$(PLATFORM)-unaligned.apk androiddebugkey + @jarsigner -sigalg MD5withRSA -digestalg SHA1 -keystore ~/.android/debug.keystore -storepass android images/xbmcapp-debug-$(PLATFORM)-unaligned.apk androiddebugkey @$(SDKROOT)/tools/zipalign -f 4 images/xbmcapp-debug-$(PLATFORM)-unaligned.apk $(XBMCROOT)/xbmcapp-$(PLATFORM)-debug.apk @rm images/xbmcapp-debug-$(PLATFORM)-unaligned.apk @echo "$(XBMCROOT)/xbmcapp-$(PLATFORM)-debug.apk created" diff --git a/tools/darwin/depends/xbmc-pvr-addons/Makefile b/tools/darwin/depends/xbmc-pvr-addons/Makefile index 58c13c830a..e175db7549 100644 --- a/tools/darwin/depends/xbmc-pvr-addons/Makefile +++ b/tools/darwin/depends/xbmc-pvr-addons/Makefile @@ -5,7 +5,7 @@ XBMC_ADDONSDIR=../../../../addons # lib name, version LIBNAME=xbmc-pvr-addons -VERSION=528780fab48a63637fd959f68cc996af2a272217 +VERSION=0482a89a81f3f3de8f61ac620abcd79c116e8a9d SOURCE=$(LIBNAME)-$(VERSION) ARCHIVE=$(SOURCE).tar.gz diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index 73e9c34b3d..9fba20b904 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -5361,7 +5361,7 @@ void CApplication::SetHardwareVolume(float hardwareVolume) CAEFactory::SetVolume(value); /* for platforms where we do not have AE */ - if (m_pPlayer) + if (!CAEFactory::GetEngine() && m_pPlayer) m_pPlayer->SetVolume(g_settings.m_fVolumeLevel); } diff --git a/xbmc/FileItem.cpp b/xbmc/FileItem.cpp index eeb7678c83..8f3d7f83db 100644 --- a/xbmc/FileItem.cpp +++ b/xbmc/FileItem.cpp @@ -1412,25 +1412,29 @@ bool CFileItem::IsSamePath(const CFileItem *item) const if (IsMusicDb() && HasMusicInfoTag()) { CFileItem dbItem(m_musicInfoTag->GetURL(), false); - dbItem.SetProperty("item_start", GetProperty("item_start")); + if (HasProperty("item_start")) + dbItem.SetProperty("item_start", GetProperty("item_start")); return dbItem.IsSamePath(item); } if (IsVideoDb() && HasVideoInfoTag()) { CFileItem dbItem(m_videoInfoTag->m_strFileNameAndPath, false); - dbItem.SetProperty("item_start", GetProperty("item_start")); + if (HasProperty("item_start")) + dbItem.SetProperty("item_start", GetProperty("item_start")); return dbItem.IsSamePath(item); } if (item->IsMusicDb() && item->HasMusicInfoTag()) { CFileItem dbItem(item->m_musicInfoTag->GetURL(), false); - dbItem.SetProperty("item_start", item->GetProperty("item_start")); + if (item->HasProperty("item_start")) + dbItem.SetProperty("item_start", item->GetProperty("item_start")); return IsSamePath(&dbItem); } if (item->IsVideoDb() && item->HasVideoInfoTag()) { CFileItem dbItem(item->m_videoInfoTag->m_strFileNameAndPath, false); - dbItem.SetProperty("item_start", item->GetProperty("item_start")); + if (item->HasProperty("item_start")) + dbItem.SetProperty("item_start", item->GetProperty("item_start")); return IsSamePath(&dbItem); } if (HasProperty("original_listitem_url")) diff --git a/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.cpp b/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.cpp index 79d0a895d9..d261217e6a 100644 --- a/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.cpp +++ b/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.cpp @@ -153,6 +153,7 @@ CPulseAEStream::CPulseAEStream(pa_context *context, pa_threaded_mainloop *mainLo } pa_format_info_set_rate (info[0], m_SampleSpec.rate); pa_format_info_set_channels (info[0], m_SampleSpec.channels); + pa_format_info_set_channel_map (info[0], &map); pa_format_info_set_sample_format(info[0], m_SampleSpec.format); m_Stream = pa_stream_new_extended(m_Context, "audio stream", info, 1, NULL); pa_format_info_free(info[0]); diff --git a/xbmc/filesystem/PluginDirectory.cpp b/xbmc/filesystem/PluginDirectory.cpp index 247567b05f..91f1f8613a 100644 --- a/xbmc/filesystem/PluginDirectory.cpp +++ b/xbmc/filesystem/PluginDirectory.cpp @@ -120,10 +120,11 @@ bool CPluginDirectory::StartScript(const CStdString& strPath, bool retrievingDir bool success = false; #ifdef HAS_PYTHON CStdString file = m_addon->LibPath(); - if (g_pythonParser.evalFile(file, argv,m_addon) >= 0) + int id = g_pythonParser.evalFile(file, argv,m_addon); + if (id >= 0) { // wait for our script to finish CStdString scriptName = m_addon->Name(); - success = WaitOnScriptResult(file, scriptName, retrievingDir); + success = WaitOnScriptResult(file, id, scriptName, retrievingDir); } else #endif @@ -457,7 +458,7 @@ bool CPluginDirectory::RunScriptWithParams(const CStdString& strPath) return false; } -bool CPluginDirectory::WaitOnScriptResult(const CStdString &scriptPath, const CStdString &scriptName, bool retrievingDir) +bool CPluginDirectory::WaitOnScriptResult(const CStdString &scriptPath, int scriptId, const CStdString &scriptName, bool retrievingDir) { const unsigned int timeBeforeProgressBar = 1500; const unsigned int timeToKillScript = 1000; @@ -467,7 +468,7 @@ bool CPluginDirectory::WaitOnScriptResult(const CStdString &scriptPath, const CS bool cancelled = false; bool inMainAppThread = g_application.IsCurrentThread(); - CLog::Log(LOGDEBUG, "%s - waiting on the %s plugin...", __FUNCTION__, scriptName.c_str()); + CLog::Log(LOGDEBUG, "%s - waiting on the %s (id=%d) plugin...", __FUNCTION__, scriptName.c_str(), scriptId); while (true) { { @@ -481,7 +482,7 @@ bool CPluginDirectory::WaitOnScriptResult(const CStdString &scriptPath, const CS } // check our script is still running #ifdef HAS_PYTHON - if (!g_pythonParser.isRunning(g_pythonParser.getScriptId(scriptPath.c_str()))) + if (!g_pythonParser.isRunning(scriptId)) #endif { // check whether we exited normally if (!m_fetchComplete.WaitMSec(0)) @@ -536,11 +537,10 @@ bool CPluginDirectory::WaitOnScriptResult(const CStdString &scriptPath, const CS if (cancelled && XbmcThreads::SystemClockMillis() - startTime > timeToKillScript) { // cancel our script #ifdef HAS_PYTHON - int id = g_pythonParser.getScriptId(scriptPath.c_str()); - if (id != -1 && g_pythonParser.isRunning(id)) + if (scriptId != -1 && g_pythonParser.isRunning(scriptId)) { - CLog::Log(LOGDEBUG, "%s- cancelling plugin %s", __FUNCTION__, scriptName.c_str()); - g_pythonParser.stopScript(id); + CLog::Log(LOGDEBUG, "%s- cancelling plugin %s (id=%d)", __FUNCTION__, scriptName.c_str(), scriptId); + g_pythonParser.stopScript(scriptId); break; } #endif diff --git a/xbmc/filesystem/PluginDirectory.h b/xbmc/filesystem/PluginDirectory.h index c33817d3f3..01a7474569 100644 --- a/xbmc/filesystem/PluginDirectory.h +++ b/xbmc/filesystem/PluginDirectory.h @@ -66,7 +66,7 @@ public: private: ADDON::AddonPtr m_addon; bool StartScript(const CStdString& strPath, bool retrievingDir); - bool WaitOnScriptResult(const CStdString &scriptPath, const CStdString &scriptName, bool retrievingDir); + bool WaitOnScriptResult(const CStdString &scriptPath, int scriptId, const CStdString &scriptName, bool retrievingDir); static std::vector<CPluginDirectory*> globalHandles; static int getNewHandle(CPluginDirectory *cp); diff --git a/xbmc/interfaces/legacy/Control.cpp b/xbmc/interfaces/legacy/Control.cpp index 4c0c9338fd..8e1f913ed0 100644 --- a/xbmc/interfaces/legacy/Control.cpp +++ b/xbmc/interfaces/legacy/Control.cpp @@ -1273,7 +1273,8 @@ namespace XBMCAddon if ((vecItems.size() > 0) && pGUIControl) { pGUIControl->OnMessage(msg); - pListItem = vecItems[msg.GetParam1()]; + if (msg.GetParam1() >= 0 && (size_t)msg.GetParam1() < vecItems.size()) + pListItem = vecItems[msg.GetParam1()]; } return pListItem.get(); diff --git a/xbmc/music/MusicThumbLoader.cpp b/xbmc/music/MusicThumbLoader.cpp index 8eb741b659..afd41ddaca 100644 --- a/xbmc/music/MusicThumbLoader.cpp +++ b/xbmc/music/MusicThumbLoader.cpp @@ -25,6 +25,7 @@ #include "music/tags/MusicInfoTagLoaderFactory.h" #include "music/infoscanner/MusicInfoScanner.h" #include "music/Artist.h" +#include "video/VideoThumbLoader.h" using namespace std; using namespace MUSIC_INFO; @@ -74,6 +75,13 @@ bool CMusicThumbLoader::LoadItem(CFileItem* pItem) return true; // no fallback } + if (pItem->HasVideoInfoTag() && pItem->GetArt().empty()) + { // music video + CVideoThumbLoader loader; + if (loader.LoadItem(pItem)) + return true; + } + if (!pItem->HasArt("fanart")) { if (pItem->HasMusicInfoTag() && !pItem->GetMusicInfoTag()->GetArtist().empty()) diff --git a/xbmc/pvr/PVRManager.cpp b/xbmc/pvr/PVRManager.cpp index e04b78f0f7..dcff83a7ff 100644 --- a/xbmc/pvr/PVRManager.cpp +++ b/xbmc/pvr/PVRManager.cpp @@ -89,11 +89,26 @@ CPVRManager &CPVRManager::Get(void) return pvrManagerInstance; } +bool CPVRManager::IsPVRWindowActive(void) const +{ + return g_windowManager.IsWindowActive(WINDOW_PVR) || + g_windowManager.IsWindowActive(WINDOW_DIALOG_PVR_CHANNEL_MANAGER) || + g_windowManager.IsWindowActive(WINDOW_DIALOG_PVR_OSD_CHANNELS) || + g_windowManager.IsWindowActive(WINDOW_DIALOG_PVR_GROUP_MANAGER) || + g_windowManager.IsWindowActive(WINDOW_DIALOG_PVR_GUIDE_INFO) || + g_windowManager.IsWindowActive(WINDOW_DIALOG_PVR_OSD_CUTTER) || + g_windowManager.IsWindowActive(WINDOW_DIALOG_PVR_OSD_DIRECTOR) || + g_windowManager.IsWindowActive(WINDOW_DIALOG_PVR_OSD_GUIDE) || + g_windowManager.IsWindowActive(WINDOW_DIALOG_PVR_GUIDE_SEARCH) || + g_windowManager.IsWindowActive(WINDOW_DIALOG_PVR_RECORDING_INFO) || + g_windowManager.IsWindowActive(WINDOW_DIALOG_PVR_TIMER_SETTING); +} + bool CPVRManager::InstallAddonAllowed(const std::string& strAddonId) const { return !IsStarted() || !m_addons->IsInUse(strAddonId) || - (!g_windowManager.IsWindowActive(WINDOW_PVR) && !IsPlaying()); + (!IsPVRWindowActive() && !IsPlaying()); } void CPVRManager::MarkAsOutdated(const std::string& strAddonId, const std::string& strReferer) @@ -262,6 +277,9 @@ void CPVRManager::Stop(void) SetState(ManagerStateStopping); + if (g_windowManager.GetActiveWindow() == WINDOW_PVR) + g_windowManager.ActivateWindow(WINDOW_HOME); + /* stop the EPG updater, since it might be using the pvr add-ons */ g_EpgContainer.Stop(); @@ -548,22 +566,18 @@ bool CPVRManager::ContinueLastChannel(void) return bReturn; } -void CPVRManager::ResetDatabase(bool bShowProgress /* = true */) +void CPVRManager::ResetDatabase(bool bResetEPGOnly /* = false */) { CLog::Log(LOGNOTICE,"PVRManager - %s - clearing the PVR database", __FUNCTION__); g_EpgContainer.Stop(); - CGUIDialogProgress* pDlgProgress = NULL; - if (bShowProgress) - { - pDlgProgress = (CGUIDialogProgress*)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS); - pDlgProgress->SetLine(0, StringUtils::EmptyString); - pDlgProgress->SetLine(1, g_localizeStrings.Get(19186)); // All data in the PVR database is being erased - pDlgProgress->SetLine(2, StringUtils::EmptyString); - pDlgProgress->StartModal(); - pDlgProgress->Progress(); - } + CGUIDialogProgress* pDlgProgress = (CGUIDialogProgress*)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS); + pDlgProgress->SetLine(0, StringUtils::EmptyString); + pDlgProgress->SetLine(1, g_localizeStrings.Get(19186)); // All data in the PVR database is being erased + pDlgProgress->SetLine(2, StringUtils::EmptyString); + pDlgProgress->StartModal(); + pDlgProgress->Progress(); if (m_addons && m_addons->IsPlaying()) { @@ -571,21 +585,17 @@ void CPVRManager::ResetDatabase(bool bShowProgress /* = true */) CApplicationMessenger::Get().MediaStop(); } - if (bShowProgress) - { - pDlgProgress->SetPercentage(10); - pDlgProgress->Progress(); - } + pDlgProgress->SetPercentage(10); + pDlgProgress->Progress(); + + /* reset the EPG pointers */ + m_database->ResetEPG(); /* stop the thread */ - if (g_guiSettings.GetBool("pvrmanager.enabled")) - Stop(); + Stop(); - if (bShowProgress) - { - pDlgProgress->SetPercentage(20); - pDlgProgress->Progress(); - } + pDlgProgress->SetPercentage(20); + pDlgProgress->Progress(); if (!m_database) m_database = new CPVRDatabase; @@ -593,40 +603,28 @@ void CPVRManager::ResetDatabase(bool bShowProgress /* = true */) if (m_database && m_database->Open()) { /* clean the EPG database */ - g_EpgContainer.Clear(true); - if (bShowProgress) - { - pDlgProgress->SetPercentage(30); - pDlgProgress->Progress(); - } + g_EpgContainer.Reset(); + pDlgProgress->SetPercentage(30); + pDlgProgress->Progress(); - m_database->DeleteChannelGroups(); - if (bShowProgress) + if (!bResetEPGOnly) { + m_database->DeleteChannelGroups(); pDlgProgress->SetPercentage(50); pDlgProgress->Progress(); - } - /* delete all channels */ - m_database->DeleteChannels(); - if (bShowProgress) - { + /* delete all channels */ + m_database->DeleteChannels(); pDlgProgress->SetPercentage(70); pDlgProgress->Progress(); - } - /* delete all channel settings */ - m_database->DeleteChannelSettings(); - if (bShowProgress) - { + /* delete all channel settings */ + m_database->DeleteChannelSettings(); pDlgProgress->SetPercentage(80); pDlgProgress->Progress(); - } - /* delete all client information */ - m_database->DeleteClients(); - if (bShowProgress) - { + /* delete all client information */ + m_database->DeleteClients(); pDlgProgress->SetPercentage(90); pDlgProgress->Progress(); } @@ -634,9 +632,7 @@ void CPVRManager::ResetDatabase(bool bShowProgress /* = true */) m_database->Close(); } - CLog::Log(LOGNOTICE,"PVRManager - %s - PVR database cleared", __FUNCTION__); - - g_EpgContainer.Start(); + CLog::Log(LOGNOTICE,"PVRManager - %s - %s database cleared", __FUNCTION__, bResetEPGOnly ? "EPG" : "PVR and EPG"); if (g_guiSettings.GetBool("pvrmanager.enabled")) { @@ -646,21 +642,8 @@ void CPVRManager::ResetDatabase(bool bShowProgress /* = true */) Start(); } - if (bShowProgress) - { - pDlgProgress->SetPercentage(100); - pDlgProgress->Close(); - } -} - -void CPVRManager::ResetEPG(void) -{ - CLog::Log(LOGNOTICE,"PVRManager - %s - clearing the EPG database", __FUNCTION__); - - m_database->ResetEPG(); - Stop(); - g_EpgContainer.Reset(); - Start(); + pDlgProgress->SetPercentage(100); + pDlgProgress->Close(); } bool CPVRManager::IsPlaying(void) const diff --git a/xbmc/pvr/PVRManager.h b/xbmc/pvr/PVRManager.h index 9a9cbb6aa4..19ad66dee5 100644 --- a/xbmc/pvr/PVRManager.h +++ b/xbmc/pvr/PVRManager.h @@ -129,6 +129,11 @@ namespace PVR void Cleanup(void); /*! + * @return True when a PVR window is active, false otherwise. + */ + bool IsPVRWindowActive(void) const; + + /*! * @brief Check whether an add-on can be upgraded or installed without restarting the pvr manager, when the add-on is in use or the pvr window is active * @param strAddonId The add-on to check. * @return True when the add-on can be installed, false otherwise. @@ -188,14 +193,9 @@ namespace PVR /*! * @brief Reset the TV database to it's initial state and delete all the data inside. - * @param bShowProgress True to show a progress bar, false otherwise. - */ - void ResetDatabase(bool bShowProgress = true); - - /*! - * @brief Delete all EPG data from the database and reload it from the clients. + * @param bResetEPGOnly True to only reset the EPG database, false to reset both PVR and EPG. */ - void ResetEPG(void); + void ResetDatabase(bool bResetEPGOnly = false); /*! * @brief Check if a TV channel, radio channel or recording is playing. diff --git a/xbmc/settings/GUIWindowSettingsCategory.cpp b/xbmc/settings/GUIWindowSettingsCategory.cpp index 03da366ae3..b1312630f6 100644 --- a/xbmc/settings/GUIWindowSettingsCategory.cpp +++ b/xbmc/settings/GUIWindowSettingsCategory.cpp @@ -1936,7 +1936,7 @@ void CGUIWindowSettingsCategory::OnSettingChanged(BaseSettingControlPtr pSetting CGUIDialogYesNo::ShowAndGetInput(19098, 19186, 750, 0)) { CDateTime::ResetTimezoneBias(); - g_PVRManager.ResetDatabase(); + g_PVRManager.ResetDatabase(false); } } else if (strSetting.Equals("epg.resetepg")) @@ -1944,7 +1944,7 @@ void CGUIWindowSettingsCategory::OnSettingChanged(BaseSettingControlPtr pSetting if (CGUIDialogYesNo::ShowAndGetInput(19098, 19188, 750, 0)) { CDateTime::ResetTimezoneBias(); - g_PVRManager.ResetEPG(); + g_PVRManager.ResetDatabase(true); } } else if (strSetting.Equals("pvrmanager.channelscan") && g_PVRManager.IsStarted()) diff --git a/xbmc/video/VideoInfoTag.cpp b/xbmc/video/VideoInfoTag.cpp index 0b6f71636b..386cb53d5f 100644 --- a/xbmc/video/VideoInfoTag.cpp +++ b/xbmc/video/VideoInfoTag.cpp @@ -790,8 +790,13 @@ bool CVideoInfoTag::IsEmpty() const unsigned int CVideoInfoTag::GetDuration() const { - if (m_streamDetails.GetVideoDuration() > 0) - return m_streamDetails.GetVideoDuration(); + /* + Prefer the duration from the stream if it isn't too + small (60%) compared to the duration from the tag. + */ + unsigned int duration = m_streamDetails.GetVideoDuration(); + if (duration > m_duration * 0.6) + return duration; return m_duration; } diff --git a/xbmc/windowing/egl/WinSystemEGL.cpp b/xbmc/windowing/egl/WinSystemEGL.cpp index a71e105b80..1698e267cf 100644 --- a/xbmc/windowing/egl/WinSystemEGL.cpp +++ b/xbmc/windowing/egl/WinSystemEGL.cpp @@ -372,7 +372,7 @@ bool CWinSystemEGL::IsExtSupported(const char* extension) name += extension; name += " "; - return m_extensions.find(name) != std::string::npos; + return (m_extensions.find(name) != std::string::npos || CRenderSystemGLES::IsExtSupported(extension)); } bool CWinSystemEGL::PresentRenderImpl(const CDirtyRegionList &dirty) |