diff options
author | theuni <theuni-nospam-@xbmc.org> | 2012-03-21 18:07:50 -0400 |
---|---|---|
committer | theuni <theuni-nospam-@xbmc.org> | 2012-03-21 18:07:50 -0400 |
commit | 14feb096bcea1e434b5ab23888d6a4c62240f6e0 (patch) | |
tree | 4d7b8fcb6aec423f55c9846cd8cdb82f34fc3283 | |
parent | cc499418d7c47f8b28da89f6698cfe5cbd31aaaf (diff) | |
parent | 0406f1b855011eb272238d3822191ba09a74069c (diff) |
Merge remote-tracking branch 'origin/master' into Eden11.0-Eden-r2
12 files changed, 78 insertions, 95 deletions
diff --git a/addons/metadata.themoviedb.org/resources/language/Chinese (Simple)/strings.xml b/addons/metadata.themoviedb.org/resources/language/Chinese (Simple)/strings.xml index 247c657fd7..e7151afdc7 100644 --- a/addons/metadata.themoviedb.org/resources/language/Chinese (Simple)/strings.xml +++ b/addons/metadata.themoviedb.org/resources/language/Chinese (Simple)/strings.xml @@ -1,5 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> <strings> <string id="30000">启用同人画</string> - <string id="30001">启用HD-Trailers.net预告片</string> + <string id="30001">首选HD-Trailers.net预告片</string> + <string id="30002">首选语言</string> + <string id="30003">获取评价信息于</string> + <string id="30004">启用预告片(YouTube)</string> + <string id="30005">保留原片名</string> </strings> diff --git a/addons/metadata.themoviedb.org/resources/language/Dutch/strings.xml b/addons/metadata.themoviedb.org/resources/language/Dutch/strings.xml index 78c768563d..7711a7feda 100644 --- a/addons/metadata.themoviedb.org/resources/language/Dutch/strings.xml +++ b/addons/metadata.themoviedb.org/resources/language/Dutch/strings.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <strings> <string id="30000">Fanart inschakelen</string> - <string id="30001">Trailer inschakelen (HD-Trailers.net)</string> + <string id="30001">Trailers van HD-Trailers.net inschakelen</string> <string id="30002">Voorkeurstaal</string> <string id="30003">Verkrijg waardering van IMDb</string> <string id="30004">Trailer inschakelen (YouTube)</string> diff --git a/addons/metadata.themoviedb.org/resources/language/English/strings.xml b/addons/metadata.themoviedb.org/resources/language/English/strings.xml index 7efd3a3b72..d61eda00f5 100644 --- a/addons/metadata.themoviedb.org/resources/language/English/strings.xml +++ b/addons/metadata.themoviedb.org/resources/language/English/strings.xml @@ -2,8 +2,8 @@ <strings> <string id="30000">Enable Fanart</string> <string id="30004">Enable Trailer (YouTube)</string> - <string id="30001">Enable Trailer (HD-Trailers.net)</string> + <string id="30001">Prefer Trailer from HD-Trailers.net</string> <string id="30002">Preferred language</string> - <string id="30003">Get rating from IMDb</string> + <string id="30003">Get rating from</string> <string id="30005">Keep Original Title</string> </strings> diff --git a/addons/metadata.themoviedb.org/resources/language/Finnish/strings.xml b/addons/metadata.themoviedb.org/resources/language/Finnish/strings.xml index 2e7122283b..ab425a5364 100644 --- a/addons/metadata.themoviedb.org/resources/language/Finnish/strings.xml +++ b/addons/metadata.themoviedb.org/resources/language/Finnish/strings.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <strings> <string id="30000">Fanitaide käytössä</string> - <string id="30004">Trailerit käytössä (YouTube)</string> - <string id="30001">Trailerit käytössä (HD-Trailers.net)</string> + <string id="30004">Trailerit käytössä</string> + <string id="30001">Valitse ensisijaisesti trailerit HD-Trailers.net -sivustolta</string> <string id="30002">Ensisijainen kieli</string> <string id="30003">Hae arvosana IMDb:stä</string> <string id="30005">Näytä alkuperäinen nimi</string> diff --git a/addons/metadata.themoviedb.org/resources/language/German/strings.xml b/addons/metadata.themoviedb.org/resources/language/German/strings.xml index c09cbb48f8..a3ae5113f8 100644 --- a/addons/metadata.themoviedb.org/resources/language/German/strings.xml +++ b/addons/metadata.themoviedb.org/resources/language/German/strings.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <strings> <string id="30000">Aktiviere Fanart</string> - <string id="30001">Aktiviere Trailer (HD-Trailers.net)</string> + <string id="30001">Aktiviere Trailer von HD-Trailers.net</string> <string id="30002">Bevorzugte Sprache</string> <string id="30003">Bewertung von IMDb nutzen</string> <string id="30004">Aktiviere Trailer (YouTube)</string> diff --git a/addons/metadata.themoviedb.org/resources/language/Hungarian/strings.xml b/addons/metadata.themoviedb.org/resources/language/Hungarian/strings.xml index aac4afcabb..d5e3f07af5 100644 --- a/addons/metadata.themoviedb.org/resources/language/Hungarian/strings.xml +++ b/addons/metadata.themoviedb.org/resources/language/Hungarian/strings.xml @@ -2,8 +2,8 @@ <strings> <string id="30000">Fanartképek engedélyezése</string> <string id="30004">Filmelőzetesek engedélyezése (YouTube)</string> - <string id="30001">Filmelőzetesek engedélyezése (HD-Trailers.net)</string> + <string id="30001">Filmelőzetesek inkább a HD-Trailers.net-ről</string> <string id="30002">Preferált nyelv</string> - <string id="30003">Értékelés az IMDb-ről</string> + <string id="30003">Értékelés letöltése innen</string> <string id="30005">Eredeti filmcím megtartása</string> </strings> diff --git a/addons/metadata.themoviedb.org/resources/language/Swedish/strings.xml b/addons/metadata.themoviedb.org/resources/language/Swedish/strings.xml index 4beab0fe34..59406fddd9 100644 --- a/addons/metadata.themoviedb.org/resources/language/Swedish/strings.xml +++ b/addons/metadata.themoviedb.org/resources/language/Swedish/strings.xml @@ -6,7 +6,7 @@ <!--$Revision$--> <strings> <string id="30000">Aktivera fanart</string> - <string id="30001">Aktivera trailers (HD-Trailers.net)</string> + <string id="30001">Aktivera trailers från HD-Trailers.net</string> <string id="30002">Föredraget språk</string> <string id="30003">Hämta betyg från IMDb</string> <string id="30004">Aktivera trailers (YouTube)</string> diff --git a/lib/libdvd/libdvdnav/src/searching.c b/lib/libdvd/libdvdnav/src/searching.c index 0d3475ed1c..ed66bf4d99 100644 --- a/lib/libdvd/libdvdnav/src/searching.c +++ b/lib/libdvd/libdvdnav/src/searching.c @@ -224,14 +224,9 @@ timemapdone: if(found) { - length = cell->last_sector - cell->first_sector + 1; - if (target >= length) { - target -= length; - } else { - /* convert the target sector from Cell-relative to absolute physical sector */ - target += cell->first_sector; - break; - } + if (target >= cell->first_sector + && target <= cell->last_sector) + break; } else { diff --git a/xbmc/cores/paplayer/CodecFactory.cpp b/xbmc/cores/paplayer/CodecFactory.cpp index 99a4065be3..bc30c63883 100644 --- a/xbmc/cores/paplayer/CodecFactory.cpp +++ b/xbmc/cores/paplayer/CodecFactory.cpp @@ -120,7 +120,7 @@ ICodec* CodecFactory::CreateCodecDemux(const CStdString& strFile, const CStdStri if( strContent.Equals("audio/mpeg") || strContent.Equals("audio/mp3") ) return new MP3Codec(); - else if (strContent.Left(9).Equals("audio/l16") == 0) + else if (strContent.Left(9).Equals("audio/l16")) { PCMCodec * pcm_codec = new PCMCodec(); pcm_codec->SetMimeParams(strContent); diff --git a/xbmc/input/ButtonTranslator.cpp b/xbmc/input/ButtonTranslator.cpp index 7c640db705..0e76a1c68c 100644 --- a/xbmc/input/ButtonTranslator.cpp +++ b/xbmc/input/ButtonTranslator.cpp @@ -363,7 +363,6 @@ CButtonTranslator& CButtonTranslator::GetInstance() CButtonTranslator::CButtonTranslator() { - m_baseMap.clear(); m_deviceList.clear(); m_Loaded = false; } @@ -429,37 +428,48 @@ bool CButtonTranslator::Load(bool AlwaysLoad) }; bool success = false; - // If we've already loaded the m_baseMap we don't need to load it - // again - this speeds up reloads caused by plugging and unplugging - // HID devices. However if AlwaysLoad is true always load the keymaps - // from scratch. - if (m_Loaded && !AlwaysLoad) + for (unsigned int dirIndex = 0; dirIndex < sizeof(DIRS_TO_CHECK)/sizeof(DIRS_TO_CHECK[0]); ++dirIndex) { - m_translatorMap = m_baseMap; - } + if (XFILE::CDirectory::Exists(DIRS_TO_CHECK[dirIndex])) + { + CFileItemList files; + XFILE::CDirectory::GetDirectory(DIRS_TO_CHECK[dirIndex], files, ".xml"); + // Sort the list for filesystem based priorities, e.g. 01-keymap.xml, 02-keymap-overrides.xml + files.Sort(SORT_METHOD_FILE, SORT_ORDER_ASC); + for(int fileIndex = 0; fileIndex<files.Size(); ++fileIndex) + { + if (!files[fileIndex]->m_bIsFolder) + success |= LoadKeymap(files[fileIndex]->GetPath()); + } - // Else load the standard mappings - else - { - for(unsigned int dirIndex = 0; dirIndex < sizeof(DIRS_TO_CHECK)/sizeof(DIRS_TO_CHECK[0]); ++dirIndex) { - if( XFILE::CDirectory::Exists(DIRS_TO_CHECK[dirIndex]) ) + // Load mappings for any HID devices we have connected + std::list<CStdString>::iterator it; + for (it = m_deviceList.begin(); it != m_deviceList.end(); it++) { - CFileItemList files; - XFILE::CDirectory::GetDirectory(DIRS_TO_CHECK[dirIndex], files, "*.xml"); - // Sort the list for filesystem based priorities, e.g. 01-keymap.xml, 02-keymap-overrides.xml - files.Sort(SORT_METHOD_FILE, SORT_ORDER_ASC); - // In (at least) Windows the GetDirectory returns all files not just *.xml files - for(int fileIndex = 0; fileIndex<files.Size(); ++fileIndex) - if (files[fileIndex]->GetPath().Right(4) == ".xml") - success |= LoadKeymap(files[fileIndex]->GetPath()); + CStdString devicedir = DIRS_TO_CHECK[dirIndex]; + devicedir.append(*it); + devicedir.append("/"); + if( XFILE::CDirectory::Exists(devicedir) ) + { + CFileItemList files; + XFILE::CDirectory::GetDirectory(devicedir, files, ".xml"); + // Sort the list for filesystem based priorities, e.g. 01-keymap.xml, 02-keymap-overrides.xml + files.Sort(SORT_METHOD_FILE, SORT_ORDER_ASC); + for(int fileIndex = 0; fileIndex<files.Size(); ++fileIndex) + { + if (!files[fileIndex]->m_bIsFolder) + success |= LoadKeymap(files[fileIndex]->GetPath()); + } + } } } + } - if (!success) - { - CLog::Log(LOGERROR, "Error loading keymaps from: %s or %s or %s", DIRS_TO_CHECK[0], DIRS_TO_CHECK[1], DIRS_TO_CHECK[2]); - return false; - } + if (!success) + { + CLog::Log(LOGERROR, "Error loading keymaps from: %s or %s or %s", DIRS_TO_CHECK[0], DIRS_TO_CHECK[1], DIRS_TO_CHECK[2]); + return false; + } #if defined(HAS_LIRC) || defined(HAS_IRSERVERSUITE) #ifdef _LINUX @@ -467,53 +477,25 @@ bool CButtonTranslator::Load(bool AlwaysLoad) #else #define REMOTEMAP "IRSSmap.xml" #endif - CStdString lircmapPath; - URIUtils::AddFileToFolder("special://xbmc/system/", REMOTEMAP, lircmapPath); - lircRemotesMap.clear(); - if(CFile::Exists(lircmapPath)) - success |= LoadLircMap(lircmapPath); - else - CLog::Log(LOGDEBUG, "CButtonTranslator::Load - no system %s found, skipping", REMOTEMAP); + CStdString lircmapPath; + URIUtils::AddFileToFolder("special://xbmc/system/", REMOTEMAP, lircmapPath); + lircRemotesMap.clear(); + if(CFile::Exists(lircmapPath)) + success |= LoadLircMap(lircmapPath); + else + CLog::Log(LOGDEBUG, "CButtonTranslator::Load - no system %s found, skipping", REMOTEMAP); - lircmapPath = g_settings.GetUserDataItem(REMOTEMAP); - if(CFile::Exists(lircmapPath)) - success |= LoadLircMap(lircmapPath); - else - CLog::Log(LOGDEBUG, "CButtonTranslator::Load - no userdata %s found, skipping", REMOTEMAP); + lircmapPath = g_settings.GetUserDataItem(REMOTEMAP); + if(CFile::Exists(lircmapPath)) + success |= LoadLircMap(lircmapPath); + else + CLog::Log(LOGDEBUG, "CButtonTranslator::Load - no userdata %s found, skipping", REMOTEMAP); - if (!success) - CLog::Log(LOGERROR, "CButtonTranslator::Load - unable to load remote map %s", REMOTEMAP); - // don't return false - it is to only indicate a fatal error (which this is not) + if (!success) + CLog::Log(LOGERROR, "CButtonTranslator::Load - unable to load remote map %s", REMOTEMAP); + // don't return false - it is to only indicate a fatal error (which this is not) #endif - // Standard mappings have been loaded into m_translatorMap, copy them to - // m_baseMap for future reuse. - m_baseMap = m_translatorMap; - } - - // Load mappings for any HID devices we have connected - std::list<CStdString>::iterator it; - for (it = m_deviceList.begin(); it != m_deviceList.end(); it++) - { - for(unsigned int dirIndex = 0; dirIndex < sizeof(DIRS_TO_CHECK)/sizeof(DIRS_TO_CHECK[0]); ++dirIndex) - { - CStdString devicedir = DIRS_TO_CHECK[dirIndex]; - devicedir.append(*it); - devicedir.append("/"); - if( XFILE::CDirectory::Exists(devicedir) ) - { - CFileItemList files; - XFILE::CDirectory::GetDirectory(devicedir, files, "*.xml"); - // Sort the list for filesystem based priorities, e.g. 01-keymap.xml, 02-keymap-overrides.xml - files.Sort(SORT_METHOD_FILE, SORT_ORDER_ASC); - // In (at least) Windows the GetDirectory returns all files not just *.xml files - for(int fileIndex = 0; fileIndex<files.Size(); ++fileIndex) - if (files[fileIndex]->GetPath().Right(4) == ".xml") - success |= LoadKeymap(files[fileIndex]->GetPath()); - } - } - } - // Done! m_Loaded = true; return true; diff --git a/xbmc/input/ButtonTranslator.h b/xbmc/input/ButtonTranslator.h index 802f16bfff..0a8cec7ce7 100644 --- a/xbmc/input/ButtonTranslator.h +++ b/xbmc/input/ButtonTranslator.h @@ -101,8 +101,6 @@ public: private: typedef std::multimap<uint32_t, CButtonAction> buttonMap; // our button map to fill in - // m_baseMap contains all the standard mappings - std::map<int, buttonMap> m_baseMap; // m_translatorMap contains all mappings i.e. m_BaseMap + HID device mappings std::map<int, buttonMap> m_translatorMap; // m_deviceList contains the list of connected HID devices diff --git a/xbmc/interfaces/python/xbmcmodule/xbmcmodule.cpp b/xbmc/interfaces/python/xbmcmodule/xbmcmodule.cpp index d19b32c991..ced6bc9b90 100644 --- a/xbmc/interfaces/python/xbmcmodule/xbmcmodule.cpp +++ b/xbmc/interfaces/python/xbmcmodule/xbmcmodule.cpp @@ -609,11 +609,15 @@ namespace PYXBMC char *cLine = NULL; if (!PyArg_ParseTuple(args, (char*)"s", &cLine)) return NULL; - PyXBMCGUILock(); - int id = g_windowManager.GetTopMostModalDialogID(); - if (id == WINDOW_INVALID) id = g_windowManager.GetActiveWindow(); - bool ret = g_infoManager.EvaluateBool(cLine,id); - PyXBMCGUIUnlock(); + bool ret; + { + CPyThreadState gilRelease; + CSingleLock gc(g_graphicsContext); + + int id = g_windowManager.GetTopMostModalDialogID(); + if (id == WINDOW_INVALID) id = g_windowManager.GetActiveWindow(); + ret = g_infoManager.EvaluateBool(cLine,id); + } return Py_BuildValue((char*)"b", ret); } |