summaryrefslogtreecommitdiffstats
path: root/abs/core/mythtv
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2018-01-17 21:59:58 (GMT)
committerBritney Fransen <brfransen@gmail.com>2018-01-17 21:59:58 (GMT)
commit8b62e097a7aa99c5a5a4a7a81da9a04dd35b2cf7 (patch)
tree43be3409193b0d3f008e811b84f2f64e9e470f86 /abs/core/mythtv
parent840371690b62ee807ad63855af9a6ed66f0b38ba (diff)
parentd3bcf5aad566eddc2514d84c148ed1f7d0ee4033 (diff)
downloadlinhes_pkgbuild-8b62e097a7aa99c5a5a4a7a81da9a04dd35b2cf7.zip
linhes_pkgbuild-8b62e097a7aa99c5a5a4a7a81da9a04dd35b2cf7.tar.gz
linhes_pkgbuild-8b62e097a7aa99c5a5a4a7a81da9a04dd35b2cf7.tar.bz2
Merge branch 'testing'
Diffstat (limited to 'abs/core/mythtv')
-rw-r--r--abs/core/mythtv/stable-29/git_src/git_hash2
-rw-r--r--abs/core/mythtv/stable-29/git_src/git_hash_web2
-rw-r--r--abs/core/mythtv/stable-29/mythplugins/PKGBUILD2
-rw-r--r--abs/core/mythtv/stable-29/mythtv/0259-0117-UI-Provide-dbase-cache-for-RegisterKey-and-RegisterJ.patch276
-rw-r--r--abs/core/mythtv/stable-29/mythtv/PKGBUILD6
-rw-r--r--abs/core/mythtv/stable-29/mythtv/addEnableDisableAutoShutdownToSystemMenu.patch50
-rw-r--r--abs/core/mythtv/stable-29/mythweb/PKGBUILD2
7 files changed, 335 insertions, 5 deletions
diff --git a/abs/core/mythtv/stable-29/git_src/git_hash b/abs/core/mythtv/stable-29/git_src/git_hash
index d869e90..2ce2a78 100644
--- a/abs/core/mythtv/stable-29/git_src/git_hash
+++ b/abs/core/mythtv/stable-29/git_src/git_hash
@@ -1 +1 @@
-39b2062c069e801c9f9c4b15d198e8ef72594f55
+771115f47d39095652f8f660d3477008a0cbce12
diff --git a/abs/core/mythtv/stable-29/git_src/git_hash_web b/abs/core/mythtv/stable-29/git_src/git_hash_web
index 5d42c24..38dfcdc 100644
--- a/abs/core/mythtv/stable-29/git_src/git_hash_web
+++ b/abs/core/mythtv/stable-29/git_src/git_hash_web
@@ -1 +1 @@
-6db62758ba7f06eb916a041292f50ec298cc01b0
+99838ff4323d7dfc20fd720d4ed3a2042592df69
diff --git a/abs/core/mythtv/stable-29/mythplugins/PKGBUILD b/abs/core/mythtv/stable-29/mythplugins/PKGBUILD
index 35d18e4..a6132b3 100644
--- a/abs/core/mythtv/stable-29/mythplugins/PKGBUILD
+++ b/abs/core/mythtv/stable-29/mythplugins/PKGBUILD
@@ -9,7 +9,7 @@ pkgname=('mytharchive'
'mythweather'
'mythzoneminder')
pkgver=29
-pkgrel=7
+pkgrel=9
arch=('i686' 'x86_64')
url="http://www.mythtv.org"
license=('GPL')
diff --git a/abs/core/mythtv/stable-29/mythtv/0259-0117-UI-Provide-dbase-cache-for-RegisterKey-and-RegisterJ.patch b/abs/core/mythtv/stable-29/mythtv/0259-0117-UI-Provide-dbase-cache-for-RegisterKey-and-RegisterJ.patch
new file mode 100644
index 0000000..79169e4
--- /dev/null
+++ b/abs/core/mythtv/stable-29/mythtv/0259-0117-UI-Provide-dbase-cache-for-RegisterKey-and-RegisterJ.patch
@@ -0,0 +1,276 @@
+From 53ab06dc745938d2ea74214fc10a2b5446bac01a Mon Sep 17 00:00:00 2001
+From: Lawrence Rust <lvr@softsystem.co.uk>
+Date: Wed, 5 Jun 2013 16:07:56 +0100
+Subject: [PATCH 117/333] UI: Provide dbase cache for RegisterKey and
+ RegisterJump to speed startup
+
+Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
+---
+ mythtv/libs/libmythui/mythmainwindow.cpp | 211 +++++++++++++++++++++---------
+ 1 file changed, 147 insertions(+), 64 deletions(-)
+
+diff --git a/mythtv/libs/libmythui/mythmainwindow.cpp b/mythtv/libs/libmythui/mythmainwindow.cpp
+index c765279..226454a 100644
+--- a/mythtv/libs/libmythui/mythmainwindow.cpp
++++ b/mythtv/libs/libmythui/mythmainwindow.cpp
+@@ -25,6 +25,9 @@ using namespace std;
+ #include <QKeyEvent>
+ #include <QKeySequence>
+ #include <QSize>
++#include <QPair>
++#include <QMap>
++#include <QMutexLocker>
+
+ // Platform headers
+ #include "unistd.h"
+@@ -1765,67 +1768,107 @@ void MythMainWindow::BindKey(const QString &context, const QString &action,
+ void MythMainWindow::RegisterKey(const QString &context, const QString &action,
+ const QString &description, const QString &key)
+ {
+- QString keybind = key;
+-
+- MSqlQuery query(MSqlQuery::InitCon());
++ typedef QPair< QString,QString > key_t; // context, action
++ typedef QPair< QString,QString > val_t; // keybind, description
++ typedef QMap< key_t,val_t > cache_t;
++ static cache_t s_cache;
++ static QMutex s_mutex;
+
+- if (d->m_useDB && query.isConnected())
++ if (s_cache.empty() && d->m_useDB)
+ {
+- query.prepare("SELECT keylist, description FROM keybindings WHERE "
+- "context = :CONTEXT AND action = :ACTION AND "
+- "hostname = :HOSTNAME ;");
+- query.bindValue(":CONTEXT", context);
+- query.bindValue(":ACTION", action);
+- query.bindValue(":HOSTNAME", GetMythDB()->GetHostName());
+-
+- if (query.exec() && query.next())
++ MSqlQuery query(MSqlQuery::InitCon());
++ if (query.isConnected())
+ {
+- keybind = query.value(0).toString();
+- QString db_description = query.value(1).toString();
+-
+- // Update keybinding description if changed
+- if (db_description != description)
++ query.prepare("SELECT context, action, keylist, description "
++ "FROM keybindings WHERE hostname = :HOSTNAME ;");
++ query.bindValue(":HOSTNAME", GetMythDB()->GetHostName());
++ if (query.exec())
+ {
+- LOG(VB_GENERAL, LOG_NOTICE,
+- "Updating keybinding description...");
+- query.prepare(
+- "UPDATE keybindings "
+- "SET description = :DESCRIPTION "
+- "WHERE context = :CONTEXT AND "
+- " action = :ACTION AND "
+- " hostname = :HOSTNAME");
+-
+- query.bindValue(":DESCRIPTION", description);
+- query.bindValue(":CONTEXT", context);
+- query.bindValue(":ACTION", action);
+- query.bindValue(":HOSTNAME", GetMythDB()->GetHostName());
+-
+- if (!query.exec() && !(GetMythDB()->SuppressDBMessages()))
++ QMutexLocker locker(&s_mutex);
++ while (query.next())
+ {
+- MythDB::DBError("Update Keybinding", query);
++ key_t k(query.value(0).toString(), query.value(1).toString());
++ val_t v(query.value(2).toString(), query.value(3).toString());
++ s_cache[k] = v;
+ }
+ }
++ else if (!GetMythDB()->SuppressDBMessages())
++ MythDB::DBError("RegisterKey", query);
+ }
+- else
++ }
++
++ QString keybind = key;
++ QString db_description;
++ bool bFound = false;
++ {
++ QMutexLocker locker(&s_mutex);
++ cache_t::const_iterator it = s_cache.find(key_t(context, action));
++ if (it != s_cache.end())
+ {
+- QString inskey = keybind;
+-
+- query.prepare("INSERT INTO keybindings (context, action, "
+- "description, keylist, hostname) VALUES "
+- "( :CONTEXT, :ACTION, :DESCRIPTION, :KEYLIST, "
+- ":HOSTNAME );");
+- query.bindValue(":CONTEXT", context);
+- query.bindValue(":ACTION", action);
++ keybind = it->first;
++ db_description = it->second;
++ bFound = true;
++ }
++ }
++
++ if (bFound)
++ {
++ // Update keybinding description if changed
++ if (db_description != description && d->m_useDB)
++ {
++ LOG(VB_GENERAL, LOG_NOTICE, "Updating keybinding description...");
++
++ MSqlQuery query(MSqlQuery::InitCon());
++
++ query.prepare(
++ "UPDATE keybindings "
++ "SET description = :DESCRIPTION "
++ "WHERE context = :CONTEXT AND "
++ " action = :ACTION AND "
++ " hostname = :HOSTNAME");
++
+ query.bindValue(":DESCRIPTION", description);
+- query.bindValue(":KEYLIST", inskey);
+- query.bindValue(":HOSTNAME", GetMythDB()->GetHostName());
++ query.bindValue(":CONTEXT", context);
++ query.bindValue(":ACTION", action);
++ query.bindValue(":HOSTNAME", GetMythDB()->GetHostName());
+
+ if (!query.exec() && !(GetMythDB()->SuppressDBMessages()))
+ {
+- MythDB::DBError("Insert Keybinding", query);
++ MythDB::DBError("Update Keybinding", query);
+ }
+ }
+ }
++ else if (d->m_useDB)
++ {
++ LOG(VB_GENERAL, LOG_NOTICE, QString("Add keybinding %1::%2 = %3")
++ .arg(context).arg(action).arg(keybind) );
++
++ MSqlQuery query(MSqlQuery::InitCon());
++
++ QString inskey = keybind;
++
++ query.prepare("INSERT INTO keybindings (context, action, "
++ "description, keylist, hostname) VALUES "
++ "( :CONTEXT, :ACTION, :DESCRIPTION, :KEYLIST, "
++ ":HOSTNAME );");
++ query.bindValue(":CONTEXT", context);
++ query.bindValue(":ACTION", action);
++ query.bindValue(":DESCRIPTION", description);
++ query.bindValue(":KEYLIST", inskey);
++ query.bindValue(":HOSTNAME", GetMythDB()->GetHostName());
++
++ if (!query.exec() && !(GetMythDB()->SuppressDBMessages()))
++ {
++ MythDB::DBError("Insert Keybinding", query);
++ }
++ else
++ {
++ QMutexLocker locker(&s_mutex);
++ key_t k(context, action);
++ val_t v(keybind, description);
++ s_cache[k] = v;
++ }
++ }
+
+ BindKey(context, action, keybind);
+ d->actionText[context][action] = description;
+@@ -1930,35 +1973,75 @@ void MythMainWindow::RegisterJump(const QString &destination,
+ const QString &key, void (*callback)(void),
+ bool exittomain, QString localAction)
+ {
+- QString keybind = key;
++ typedef QPair< QString,QString > val_t; // keylist, description
++ typedef QMap< QString,val_t > cache_t; // destination -> keylist, description
++ static cache_t s_cache;
++ static QMutex s_mutex;
+
+- MSqlQuery query(MSqlQuery::InitCon());
+- if (query.isConnected())
++ if (s_cache.empty() && d->m_useDB)
+ {
+- query.prepare("SELECT keylist FROM jumppoints WHERE "
+- "destination = :DEST and hostname = :HOST ;");
+- query.bindValue(":DEST", destination);
+- query.bindValue(":HOST", GetMythDB()->GetHostName());
+-
+- if (query.exec() && query.next())
++ MSqlQuery query(MSqlQuery::InitCon());
++ if (query.isConnected())
+ {
+- keybind = query.value(0).toString();
++ query.prepare("SELECT destination, keylist, description "
++ "FROM jumppoints WHERE hostname = :HOSTNAME ;");
++ query.bindValue(":HOSTNAME", GetMythDB()->GetHostName());
++ if (query.exec())
++ {
++ QMutexLocker locker(&s_mutex);
++ while (query.next())
++ {
++ val_t v(query.value(1).toString(), query.value(2).toString());
++ s_cache.insert(query.value(0).toString(), v);
++ }
++ }
++ else if (!GetMythDB()->SuppressDBMessages())
++ MythDB::DBError("RegisterJump", query);
+ }
+- else
++ }
++
++ QString keybind = key;
++ bool bFound = false;
++ {
++ QMutexLocker locker(&s_mutex);
++ cache_t::const_iterator it = s_cache.find(destination);
++ if (it != s_cache.end())
+ {
+- QString inskey = keybind;
++ keybind = it->first;
++ bFound = true;
++ }
++ }
+
+- query.prepare("INSERT INTO jumppoints (destination, description, "
+- "keylist, hostname) VALUES ( :DEST, :DESC, :KEYLIST, "
+- ":HOST );");
++ if (!bFound)
++ {
++ MSqlQuery query(MSqlQuery::InitCon());
++ if (query.isConnected())
++ {
++ query.prepare("SELECT keylist FROM jumppoints WHERE "
++ "destination = :DEST and hostname = :HOST ;");
+ query.bindValue(":DEST", destination);
+- query.bindValue(":DESC", description);
+- query.bindValue(":KEYLIST", inskey);
+ query.bindValue(":HOST", GetMythDB()->GetHostName());
+
+- if (!query.exec() || !query.isActive())
++ if (query.exec() && query.next())
+ {
+- MythDB::DBError("Insert Jump Point", query);
++ keybind = query.value(0).toString();
++ }
++ else
++ {
++ QString inskey = keybind;
++
++ query.prepare("INSERT INTO jumppoints (destination, description, "
++ "keylist, hostname) VALUES ( :DEST, :DESC, :KEYLIST, "
++ ":HOST );");
++ query.bindValue(":DEST", destination);
++ query.bindValue(":DESC", description);
++ query.bindValue(":KEYLIST", inskey);
++ query.bindValue(":HOST", GetMythDB()->GetHostName());
++
++ if (!query.exec() || !query.isActive())
++ {
++ MythDB::DBError("Insert Jump Point", query);
++ }
+ }
+ }
+ }
+--
+1.7.9.5
+
diff --git a/abs/core/mythtv/stable-29/mythtv/PKGBUILD b/abs/core/mythtv/stable-29/mythtv/PKGBUILD
index ce77213..cdac547 100644
--- a/abs/core/mythtv/stable-29/mythtv/PKGBUILD
+++ b/abs/core/mythtv/stable-29/mythtv/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=mythtv
pkgver=29
-pkgrel=7
+pkgrel=9
commit_hash=`cat ../git_src/git_hash`
pkgdesc="A Homebrew PVR project $commit_hash"
arch=('i686' 'x86_64')
@@ -31,12 +31,14 @@ patches=(
'searchMetatdataSelectedGrabber.patch'
'addDamagedToProgDetails.patch'
'defaultThemeLinHES.patch'
+ 'addEnableDisableAutoShutdownToSystemMenu.patch'
'mythfrontend_en_us.ts_Title_Case.patch'
'0006-cardutil_show_displayname.patch'
'0037-pull103-Add-heuristic-in-TMDB-script-to-detect-movie-release-years.patch'
'0292-UPnP-Reduce-startup-latency-by-moving-blocking-code-to-own-thread.patch'
'0294-0283-FE-Add-network-status-to-machine-status-dialog.patch'
'0287-MythUiImage-Don-t-block-UI-when-exiting-screens.patch'
+ '0259-0117-UI-Provide-dbase-cache-for-RegisterKey-and-RegisterJ.patch'
)
optdepends=()
@@ -129,10 +131,12 @@ md5sums=('fb5a87c52a31168a0c8fdde72f27cc45'
'0f674b9cad031ba1e03aaf6b5ee1499f'
'6add9c16bbb988067e82029327e567b2'
'b0b238320fa78a4928dce2cea7c85071'
+ '8e4492d1777234a021f368bd6ee964ee'
'1164214d9eb41588f8eb3382565cb003'
'5f2bd4065b145b7b7ff09dfd6f08276c'
'2371cf6e680179c067a6ff7756638128'
'1f0dbd44f8c1a89b86bb331086f58578'
'abaef221b00690b329f4dca18676bcd6'
'3cccbab70c7615bc47e51790e024d5bf'
+ '4b5f00a19006b915b7ee5ab7f861599a'
'633cd853a89aeee5388daaad21ccec28')
diff --git a/abs/core/mythtv/stable-29/mythtv/addEnableDisableAutoShutdownToSystemMenu.patch b/abs/core/mythtv/stable-29/mythtv/addEnableDisableAutoShutdownToSystemMenu.patch
new file mode 100644
index 0000000..b14e2e0
--- /dev/null
+++ b/abs/core/mythtv/stable-29/mythtv/addEnableDisableAutoShutdownToSystemMenu.patch
@@ -0,0 +1,50 @@
+diff --git a/mythtv/libs/libmythui/myththemedmenu.cpp b/mythtv/libs/libmythui/myththemedmenu.cpp
+index ed2e54c..77aaf73 100644
+--- a/mythtv/libs/libmythui/myththemedmenu.cpp
++++ b/mythtv/libs/libmythui/myththemedmenu.cpp
+@@ -308,6 +308,8 @@ void MythThemedMenu::ShowMenu()
+ return;
+
+ int override_menu = GetMythDB()->GetNumSetting("OverrideExitMenu");
++ int MythShutdownLock = GetMythDB()->GetNumSetting("MythShutdownLock");
++ int idleTimeoutSecs = GetMythDB()->GetNumSetting("idleTimeoutSecs");
+ QString label = tr("System Menu");
+ MythScreenStack* mainStack = GetMythMainWindow()->GetMainStack();
+ m_menuPopup = new MythDialogBox(label, mainStack, "menuPopup");
+@@ -325,6 +327,21 @@ void MythThemedMenu::ShowMenu()
+ if (override_menu != 7)
+ m_menuPopup->AddButton(tr("Exit application"), QVariant("exit"));
+
++ // don't offer to enable/disable auto shutdown if auto shutdown is disabled
++ if (idleTimeoutSecs != 0)
++ {
++ if (MythShutdownLock == 0)
++ {
++ m_menuPopup->AddButton(tr("Disable Auto Shutdown"),
++ QVariant("lockShutdown"));
++ }
++ else
++ {
++ m_menuPopup->AddButton(tr("Enable Auto Shutdown"),
++ QVariant("unlockShutdown"));
++ }
++ }
++
+ switch (override_menu)
+ {
+ case 2:
+@@ -416,6 +433,14 @@ void MythThemedMenu::customEvent(QEvent *event)
+ QString arg("exiting_app");
+ m_state->m_callback(m_state->m_callbackdata, arg);
+ }
++ else if (action == "lockShutdown")
++ {
++ GetMythDB()->SaveSettingOnHost("MythShutdownLock", "1", NULL);
++ }
++ else if (action == "unlockShutdown")
++ {
++ GetMythDB()->SaveSettingOnHost("MythShutdownLock", "0", NULL);
++ }
+ }
+ else if (resultid == "password")
+ {
diff --git a/abs/core/mythtv/stable-29/mythweb/PKGBUILD b/abs/core/mythtv/stable-29/mythweb/PKGBUILD
index d294694..25dd0d9 100644
--- a/abs/core/mythtv/stable-29/mythweb/PKGBUILD
+++ b/abs/core/mythtv/stable-29/mythweb/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=mythweb
pkgver=29
-pkgrel=2
+pkgrel=3
commit_hash=`cat ../git_src/git_hash_web`
pkgdesc="Web interface for MythTV's backend, $commit_hash"
arch=('i686' 'x86_64')