From e4b0dec19f02e6d8e995b19a22110cac26f07ac4 Mon Sep 17 00:00:00 2001 From: Britney Fransen Date: Fri, 8 Dec 2017 19:18:59 +0000 Subject: mythtv & mythplugins: update translations add some patches --- ...ix-Playlist-copyTracks-and-removeAllTrack.patch | 50 +++ abs/core/mythtv/stable-29/mythplugins/PKGBUILD | 15 +- .../mythtv/0006-cardutil_show_displayname.patch | 24 ++ ...TMDB-script-to-detect-movie-release-years.patch | 52 +++ ...Image-Don-t-block-UI-when-exiting-screens.patch | 412 +++++++++++++++++++++ ...ncy-by-moving-blocking-code-to-own-thread.patch | 98 +++++ ...d-network-status-to-machine-status-dialog.patch | 71 ++++ abs/core/mythtv/stable-29/mythtv/PKGBUILD | 14 +- .../mythtv/mythfrontend_en_us.ts_Title_Case.patch | 84 +++-- 9 files changed, 786 insertions(+), 34 deletions(-) create mode 100644 abs/core/mythtv/stable-29/mythplugins/0317-0336-MythMusic-Fix-Playlist-copyTracks-and-removeAllTrack.patch create mode 100644 abs/core/mythtv/stable-29/mythtv/0006-cardutil_show_displayname.patch create mode 100644 abs/core/mythtv/stable-29/mythtv/0037-pull103-Add-heuristic-in-TMDB-script-to-detect-movie-release-years.patch create mode 100644 abs/core/mythtv/stable-29/mythtv/0287-MythUiImage-Don-t-block-UI-when-exiting-screens.patch create mode 100644 abs/core/mythtv/stable-29/mythtv/0292-UPnP-Reduce-startup-latency-by-moving-blocking-code-to-own-thread.patch create mode 100644 abs/core/mythtv/stable-29/mythtv/0294-0283-FE-Add-network-status-to-machine-status-dialog.patch diff --git a/abs/core/mythtv/stable-29/mythplugins/0317-0336-MythMusic-Fix-Playlist-copyTracks-and-removeAllTrack.patch b/abs/core/mythtv/stable-29/mythplugins/0317-0336-MythMusic-Fix-Playlist-copyTracks-and-removeAllTrack.patch new file mode 100644 index 0000000..5c0f623 --- /dev/null +++ b/abs/core/mythtv/stable-29/mythplugins/0317-0336-MythMusic-Fix-Playlist-copyTracks-and-removeAllTrack.patch @@ -0,0 +1,50 @@ +From e7c80f43a3ec0fc2024f64e17d13461840429029 Mon Sep 17 00:00:00 2001 +From: Lawrence Rust +Date: Fri, 17 Jun 2016 18:40:37 +0100 +Subject: [PATCH 336/348] MythMusic: Fix Playlist::copyTracks and + removeAllTracks + +Correct these 2 functions to call gPlayer->activePlaylistChanged + +Signed-off-by: Lawrence Rust +--- + mythplugins/mythmusic/mythmusic/playlist.cpp | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/mythplugins/mythmusic/mythmusic/playlist.cpp b/mythplugins/mythmusic/mythmusic/playlist.cpp +index 79a509a..94146a4 100644 +--- a/mythplugins/mythmusic/mythmusic/playlist.cpp ++++ src/mythplugins/mythmusic/mythmusic/playlist.cpp +@@ -46,7 +46,7 @@ bool Playlist::checkTrack(MusicMetadata::IdType trackID) const + + void Playlist::copyTracks(Playlist *to_ptr, bool update_display) + { +- disableSaves(); ++ to_ptr->disableSaves(); + + for (int x = 0; x < m_songs.size(); x++) + { +@@ -58,9 +58,9 @@ void Playlist::copyTracks(Playlist *to_ptr, bool update_display) + } + } + +- enableSaves(); ++ to_ptr->enableSaves(); + +- changed(); ++ to_ptr->changed(); + } + + /// Given a tracks ID, add that track to this playlist +@@ -94,6 +94,8 @@ void Playlist::removeAllTracks(void) + m_shuffledSongs.clear(); + + changed(); ++ ++ gPlayer->activePlaylistChanged(-1, true); + } + + void Playlist::removeAllCDTracks(void) +-- +1.7.9.5 + diff --git a/abs/core/mythtv/stable-29/mythplugins/PKGBUILD b/abs/core/mythtv/stable-29/mythplugins/PKGBUILD index 171d9be..35d18e4 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=6 +pkgrel=7 arch=('i686' 'x86_64') url="http://www.mythtv.org" license=('GPL') @@ -19,7 +19,10 @@ makedepends=('cdrkit' 'dcraw' 'dvdauthor' 'dvd+rw-tools' 'ffmpeg' 'flac' 'libexi 'perl-json' 'perl-libwww' 'perl-soap-lite' 'perl-xml-sax' 'perl-xml-simple' 'perl-xml-xpath' 'python-oauth' 'python2-pillow' 'python-pycurl' 'zlib') -source=('mythburn.py-aspectratio.patch' 'cdparanoia.patch') +source=('mythburn.py-aspectratio.patch' + 'cdparanoia.patch' + '0317-0336-MythMusic-Fix-Playlist-copyTracks-and-removeAllTrack.patch' + ) build() { if [ -e ${srcdir}/mythplugins ] @@ -31,9 +34,12 @@ build() { cd ${startdir} msg "Copying in mythplugins git_src" cp -rp ../git_src/mythtv/mythplugins $srcdir - cd ${srcdir}/${pkgbase} + + cd ${srcdir} + patch -Np1 -i "$srcdir/0317-0336-MythMusic-Fix-Playlist-copyTracks-and-removeAllTrack.patch" msg "Patching configure" + cd ${srcdir}/${pkgbase} patch -Np1 -i "$srcdir/cdparanoia.patch" msg "Configuring mythplugins" @@ -118,4 +124,5 @@ package_mythzoneminder() { } md5sums=('e98c2a09bcb051fdde959fb4bb2e5ab2' - '5de8dd79d0b8a2b006f3c3258938b6b7') + '5de8dd79d0b8a2b006f3c3258938b6b7' + '0299d0214c0d3a452c0284352435d698') diff --git a/abs/core/mythtv/stable-29/mythtv/0006-cardutil_show_displayname.patch b/abs/core/mythtv/stable-29/mythtv/0006-cardutil_show_displayname.patch new file mode 100644 index 0000000..6d487ad --- /dev/null +++ b/abs/core/mythtv/stable-29/mythtv/0006-cardutil_show_displayname.patch @@ -0,0 +1,24 @@ +diff -Naur mythtv-master-20150827-g4a81075-old/mythtv/libs/libmythtv/cardutil.cpp mythtv-master-20150827-g4a81075-new/mythtv/libs/libmythtv/cardutil.cpp +--- src/mythtv/libs/libmythtv/cardutil.cpp 2015-08-27 20:29:30.000000000 +0200 ++++ src/mythtv/libs/libmythtv/cardutil.cpp 2015-08-27 21:10:12.749406004 +0200 +@@ -1715,7 +1715,7 @@ + { + QString devlabel; + MSqlQuery query(MSqlQuery::InitCon()); +- query.prepare("SELECT cardtype, videodevice " ++ query.prepare("SELECT cardtype, displayname " + "FROM capturecard WHERE cardid = :INPUTID "); + query.bindValue(":INPUTID", inputid); + +diff -Naur mythtv-master-20150827-g4a81075-old/mythtv/programs/mythfrontend/statusbox.cpp mythtv-master-20150827-g4a81075-new/mythtv/programs/mythfrontend/statusbox.cpp +--- src/mythtv/programs/mythfrontend/statusbox.cpp 2015-08-27 20:29:49.000000000 +0200 ++++ src/mythtv/programs/mythfrontend/statusbox.cpp 2015-08-27 21:15:15.081839976 +0200 +@@ -862,7 +862,7 @@ + + QString tun = tr("Tuner %1 %2 %3"); + QString devlabel = CardUtil::GetDeviceLabel( +- query.value(1).toString(), query.value(2).toString()); ++ query.value(0).toInt()); + + QString shorttuner = tun.arg(cardid).arg("").arg(status); + QString longtuner = tun.arg(cardid).arg(devlabel).arg(status); diff --git a/abs/core/mythtv/stable-29/mythtv/0037-pull103-Add-heuristic-in-TMDB-script-to-detect-movie-release-years.patch b/abs/core/mythtv/stable-29/mythtv/0037-pull103-Add-heuristic-in-TMDB-script-to-detect-movie-release-years.patch new file mode 100644 index 0000000..597b064 --- /dev/null +++ b/abs/core/mythtv/stable-29/mythtv/0037-pull103-Add-heuristic-in-TMDB-script-to-detect-movie-release-years.patch @@ -0,0 +1,52 @@ +diff -Naur mythtv-master-20170223-ga8b2fe8-old/mythtv/libs/libmythmetadata/videometadata.cpp mythtv-master-20170223-ga8b2fe8-new/mythtv/libs/libmythmetadata/videometadata.cpp +--- mythtv-master-20170223-ga8b2fe8-old/mythtv/libs/libmythmetadata/videometadata.cpp 2017-02-23 13:18:09.000000000 +0100 ++++ src/mythtv/libs/libmythmetadata/videometadata.cpp 2017-02-25 14:03:16.933333314 +0100 +@@ -1162,7 +1162,7 @@ + title.lastIndexOf('/') -1); + + title = eatBraces(title, "[", "]"); +- title = eatBraces(title, "(", ")"); ++ //title = eatBraces(title, "(", ")"); + title = eatBraces(title, "{", "}"); + return title.trimmed(); + } +diff -Naur mythtv-master-20170223-ga8b2fe8-old/mythtv/programs/scripts/metadata/Movie/tmdb3.py mythtv-master-20170223-ga8b2fe8-new/mythtv/programs/scripts/metadata/Movie/tmdb3.py +--- mythtv-master-20170223-ga8b2fe8-old/mythtv/programs/scripts/metadata/Movie/tmdb3.py 2017-02-23 13:18:12.000000000 +0100 ++++ src/mythtv/programs/scripts/metadata/Movie/tmdb3.py 2017-02-25 13:12:40.213333328 +0100 +@@ -29,6 +29,7 @@ + + from optparse import OptionParser + import sys ++import re + + def buildSingle(inetref, opts): + from MythTV.tmdb3.tmdb_exceptions import TMDBRequestInvalid +@@ -122,11 +123,27 @@ + # replace all dashes from queries to work around search behavior + # as negative to all text that comes afterwards + query = query.replace('-',' ') ++ query = query.strip() # trim extra whitespace ++ # extract year from name -- note that we require a space before the year ++ # so we don't confuse movie names for years (example: "2012 - 2009", ++ # a 2009 movie); also note that we accept optional paranthesis around ++ # the year: ++ yearRegex = re.compile(r"\s\(?((19|20)[0-9]{2})\)?$") ++ year = yearRegex.search(query) ++ if year is not None: ++ year = year.group(1) ++ # if no year was found, we'll pass year=None to searchMovie, ++ # which is the default anyway ++ ++ # get rid of the year (if any) from the query text, because ++ # it causes bad TMDB results ++ query = yearRegex.sub("", query) ++ query = query.strip() + + from MythTV.tmdb3 import searchMovie + from MythTV import VideoMetadata + from lxml import etree +- results = iter(searchMovie(query)) ++ results = iter(searchMovie(query, locale=None, adult=False, year=year)) + tree = etree.XML(u'') + mapping = [['runtime', 'runtime'], ['title', 'originaltitle'], + ['releasedate', 'releasedate'], ['tagline', 'tagline'], diff --git a/abs/core/mythtv/stable-29/mythtv/0287-MythUiImage-Don-t-block-UI-when-exiting-screens.patch b/abs/core/mythtv/stable-29/mythtv/0287-MythUiImage-Don-t-block-UI-when-exiting-screens.patch new file mode 100644 index 0000000..5bf637b --- /dev/null +++ b/abs/core/mythtv/stable-29/mythtv/0287-MythUiImage-Don-t-block-UI-when-exiting-screens.patch @@ -0,0 +1,412 @@ +From 5ee658b482ad634706c21d20d4f8fd15828fc1d8 Mon Sep 17 00:00:00 2001 +From: Roger Siddons +Date: Mon, 12 Oct 2015 14:54:36 +0100 +Subject: [PATCH 11/13] MythUiImage: Don't block UI when exiting screens + +When deleting MythUIImages the UI blocks until all image loading threads complete. + +This patch removes the need for that by introducing an image proxy for the load threads that +prohibits access to a deleted image. + +Note the ImageLoadEvent is unchanged but has been moved to resolve dependancies. It still +contains a (potentially dangerous) pointer to the deleted MythUIImage, which IMO is redundant and should be removed. + +diff --git a/mythtv/libs/libmythui/mythuiimage.cpp b/mythtv/libs/libmythui/mythuiimage.cpp +index fc067f7..a937358 100644 +--- a/mythtv/libs/libmythui/mythuiimage.cpp ++++ src/mythtv/libs/libmythui/mythuiimage.cpp +@@ -121,25 +121,104 @@ void ImageProperties::SetMaskImage(MythImage *image) + } + + /*! ++ * \class ImageLoadEvent ++ */ ++class ImageLoadEvent : public QEvent ++{ ++ public: ++ ImageLoadEvent(const MythUIImage *parent, MythImage *image, ++ const QString &basefile, const QString &filename, ++ int number, bool aborted) ++ : QEvent(kEventType), ++ m_parent(parent), m_image(image), m_basefile(basefile), ++ m_filename(filename), m_number(number), ++ m_images(NULL), m_aborted(aborted) { } ++ ++ ImageLoadEvent(const MythUIImage *parent, AnimationFrames *frames, ++ const QString &basefile, ++ const QString &filename, bool aborted) ++ : QEvent(kEventType), ++ m_parent(parent), m_image(NULL), m_basefile(basefile), ++ m_filename(filename), m_number(0), ++ m_images(frames), m_aborted(aborted) { } ++ ++ const MythUIImage *GetParent() const { return m_parent; } ++ MythImage *GetImage() const { return m_image; } ++ const QString GetBasefile() const { return m_basefile; } ++ const QString GetFilename() const { return m_filename; } ++ int GetNumber() const { return m_number; } ++ AnimationFrames *GetAnimationFrames() const { return m_images; } ++ bool GetAbortState() const { return m_aborted; } ++ ++ static Type kEventType; ++ ++ private: ++ const MythUIImage *m_parent; ++ MythImage *m_image; ++ QString m_basefile; ++ QString m_filename; ++ int m_number; ++ ++ // Animated Images ++ AnimationFrames *m_images; ++ ++ // Image Load ++ bool m_aborted; ++}; ++ ++QEvent::Type ImageLoadEvent::kEventType = ++ (QEvent::Type) QEvent::registerEventType(); ++ ++/*! ++ \brief Guards access to the image by Load threads. If the image is deleted ++ by the UI this proxy persists until all its load threads complete. ++ */ ++class ImageProxy ++{ ++public: ++ ImageProxy(MythUIImage *image) : m_mutex(), m_image(image) {} ++ ++ MythUIImage *GetImage() { QMutexLocker lock(&m_mutex); return m_image; } ++ void Orphan() { QMutexLocker lock(&m_mutex); m_image = NULL; } ++ void PostEvent(ImageLoadEvent *event) ++ { ++ QMutexLocker lock(&m_mutex); ++ if (m_image) ++ QCoreApplication::postEvent(m_image, event); ++ else ++ LOG(VB_GUI | VB_FILE, LOG_DEBUG, ++ QString("ImageLoadThread: Discarding load of %1") ++ .arg(event->GetFilename())); ++ } ++ ++private: ++ QMutex m_mutex; ++ MythUIImage *m_image; ++}; ++ ++//! The proxy is shared by the image and all its load threads. ++typedef QSharedPointer ProxyPtr; ++ ++/*! + * \class ImageLoader + */ + class ImageLoader + { + public: +- ImageLoader() { }; +- ~ImageLoader() { }; ++ ImageLoader() { } ++ ~ImageLoader() { } + +- static QHash m_loadingImages; +- static QMutex m_loadingImagesLock; +- static QWaitCondition m_loadingImagesCond; ++ static QHash m_loadingImages; ++ static QMutex m_loadingImagesLock; ++ static QWaitCondition m_loadingImagesCond; + +- static bool PreLoad(const QString &cacheKey, const MythUIImage *uitype) ++ static bool PreLoad(const QString &cacheKey, const ProxyPtr &proxy) + { + m_loadingImagesLock.lock(); + + // Check to see if the image is being loaded by us in another thread + if ((m_loadingImages.contains(cacheKey)) && +- (m_loadingImages[cacheKey] == uitype)) ++ (m_loadingImages[cacheKey] == proxy.data())) + { + LOG(VB_GUI | VB_FILE, LOG_DEBUG, + QString("ImageLoader::PreLoad(%1), this " +@@ -153,7 +232,7 @@ class ImageLoader + while (m_loadingImages.contains(cacheKey)) + m_loadingImagesCond.wait(&m_loadingImagesLock); + +- m_loadingImages[cacheKey] = uitype; ++ m_loadingImages[cacheKey] = proxy.data(); + m_loadingImagesLock.unlock(); + + return true; +@@ -229,15 +308,12 @@ class ImageLoader + // Must be a copy for thread safety + ImageProperties imProps, + ImageCacheMode cacheMode, +- // Included only to check address, could be +- // replaced by generating a unique value for +- // each MythUIImage object? +- const MythUIImage *parent, ++ const ProxyPtr &proxy, + bool &aborted, + MythImageReader *imageReader = NULL) + { + QString cacheKey = GenImageLabel(imProps); +- if (!PreLoad(cacheKey, parent)) ++ if (!PreLoad(cacheKey, proxy)) + { + aborted = true; + return NULL; +@@ -390,10 +466,7 @@ class ImageLoader + // Must be a copy for thread safety + ImageProperties imProps, + ImageCacheMode cacheMode, +- // Included only to check address, could be +- // replaced by generating a unique value for +- // each MythUIImage object? +- const MythUIImage *parent, ++ const ProxyPtr &proxy, + bool &aborted) + { + QString filename = QString("frame-%1-") + imProps.filename; +@@ -411,7 +484,7 @@ class ImageLoader + ImageProperties frameProps = imProps; + frameProps.filename = frameFilename; + +- MythImage *im = LoadImage(painter, frameProps, cacheMode, parent, ++ MythImage *im = LoadImage(painter, frameProps, cacheMode, proxy, + aborted, imageReader); + + if (!im) +@@ -428,58 +501,9 @@ class ImageLoader + + }; + +-QHash ImageLoader::m_loadingImages; +-QMutex ImageLoader::m_loadingImagesLock; +-QWaitCondition ImageLoader::m_loadingImagesCond; +- +-/*! +- * \class ImageLoadEvent +- */ +-class ImageLoadEvent : public QEvent +-{ +- public: +- ImageLoadEvent(const MythUIImage *parent, MythImage *image, +- const QString &basefile, const QString &filename, +- int number, bool aborted) +- : QEvent(kEventType), +- m_parent(parent), m_image(image), m_basefile(basefile), +- m_filename(filename), m_number(number), +- m_images(NULL), m_aborted(aborted) { } +- +- ImageLoadEvent(const MythUIImage *parent, AnimationFrames *frames, +- const QString &basefile, +- const QString &filename, bool aborted) +- : QEvent(kEventType), +- m_parent(parent), m_image(NULL), m_basefile(basefile), +- m_filename(filename), m_number(0), +- m_images(frames), m_aborted(aborted) { } +- +- const MythUIImage *GetParent() const { return m_parent; } +- MythImage *GetImage() const { return m_image; } +- const QString GetBasefile() const { return m_basefile; } +- const QString GetFilename() const { return m_filename; } +- int GetNumber() const { return m_number; } +- AnimationFrames *GetAnimationFrames() const { return m_images; } +- bool GetAbortState() const { return m_aborted; } +- +- static Type kEventType; +- +- private: +- const MythUIImage *m_parent; +- MythImage *m_image; +- QString m_basefile; +- QString m_filename; +- int m_number; +- +- // Animated Images +- AnimationFrames *m_images; +- +- // Image Load +- bool m_aborted; +-}; +- +-QEvent::Type ImageLoadEvent::kEventType = +- (QEvent::Type) QEvent::registerEventType(); ++QHash ImageLoader::m_loadingImages; ++QMutex ImageLoader::m_loadingImagesLock; ++QWaitCondition ImageLoader::m_loadingImagesCond; + + /*! + * \class ImageLoadThread +@@ -487,10 +511,10 @@ QEvent::Type ImageLoadEvent::kEventType = + class ImageLoadThread : public QRunnable + { + public: +- ImageLoadThread(const MythUIImage *parent, MythPainter *painter, ++ ImageLoadThread(const ProxyPtr &proxy, MythPainter *painter, + const ImageProperties &imProps, const QString &basefile, + int number, ImageCacheMode mode) : +- m_parent(parent), m_painter(painter), m_imageProperties(imProps), ++ m_proxy(proxy), m_painter(painter), m_imageProperties(imProps), + m_basefile(basefile), m_number(number), m_cacheMode(mode) + { + } +@@ -500,6 +524,14 @@ class ImageLoadThread : public QRunnable + bool aborted = false; + QString filename = m_imageProperties.filename; + ++ // Don't even bother if parent image no longer exists ++ if (!m_proxy || !m_proxy->GetImage()) ++ { ++ LOG(VB_GUI | VB_FILE, LOG_DEBUG, ++ QString("ImageLoadThread: Ignoring load of %1").arg(filename)); ++ return; ++ } ++ + // NOTE Do NOT use MythImageReader::supportsAnimation here, it defeats + // the point of caching remote images + if (ImageLoader::SupportsAnimation(filename)) +@@ -508,17 +540,16 @@ class ImageLoadThread : public QRunnable + + frames = ImageLoader::LoadAnimatedImage(m_painter, + m_imageProperties, +- m_cacheMode, m_parent, ++ m_cacheMode, m_proxy, + aborted); + + if (frames && frames->count() > 1) + { +- ImageLoadEvent *le = new ImageLoadEvent(m_parent, frames, ++ ImageLoadEvent *le = new ImageLoadEvent(m_proxy->GetImage(), frames, + m_basefile, + m_imageProperties.filename, + aborted); +- QCoreApplication::postEvent(const_cast(m_parent), le); +- ++ m_proxy->PostEvent(le); + return; + } + delete frames; +@@ -526,18 +557,19 @@ class ImageLoadThread : public QRunnable + + MythImage *image = ImageLoader::LoadImage(m_painter, + m_imageProperties, +- m_cacheMode, m_parent, ++ m_cacheMode, m_proxy, + aborted); + +- ImageLoadEvent *le = new ImageLoadEvent(m_parent, image, m_basefile, ++ ImageLoadEvent *le = new ImageLoadEvent(m_proxy->GetImage(), image, ++ m_basefile, + m_imageProperties.filename, + m_number, aborted); +- QCoreApplication::postEvent(const_cast(m_parent), le); ++ m_proxy->PostEvent(le); + } + + private: +- const MythUIImage *m_parent; +- MythPainter *m_painter; ++ const ProxyPtr m_proxy; ++ MythPainter *m_painter; + ImageProperties m_imageProperties; + QString m_basefile; + int m_number; +@@ -549,13 +581,14 @@ class MythUIImagePrivate + { + public: + explicit MythUIImagePrivate(MythUIImage *p) +- : m_parent(p), m_UpdateLock(QReadWriteLock::Recursive) +- { }; +- ~MythUIImagePrivate() {}; +- +- MythUIImage *m_parent; ++ : m_parent(p), m_UpdateLock(QReadWriteLock::Recursive), ++ m_proxy(ProxyPtr(new ImageProxy(p))) ++ { } ++ ~MythUIImagePrivate() {} + ++ MythUIImage *m_parent; + QReadWriteLock m_UpdateLock; ++ ProxyPtr m_proxy; + }; + + ///////////////////////////////////////////////////////////////// +@@ -609,13 +642,8 @@ MythUIImage::MythUIImage(MythUIType *parent, const QString &name) + + MythUIImage::~MythUIImage() + { +- // Wait until all image loading threads are complete or bad things +- // may happen if this MythUIImage disappears when a queued thread +- // needs it. +- if (m_runningThreads > 0) +- { +- GetMythUI()->GetImageThreadPool()->waitForDone(); +- } ++ // Prevent any updates from running loads ++ d->m_proxy->Orphan(); + + Clear(); + +@@ -695,8 +723,6 @@ void MythUIImage::Init(void) + m_animationReverse = false; + m_animatedImage = false; + +- m_runningThreads = 0; +- + m_showingRandomImage = false; + } + +@@ -1081,9 +1107,8 @@ bool MythUIImage::Load(bool allowLoadInBackground, bool forceStat) + LOG(VB_GUI | VB_FILE, LOG_DEBUG, LOC + + QString("Load(), spawning thread to load '%1'").arg(filename)); + +- m_runningThreads++; + ImageLoadThread *bImgThread; +- bImgThread = new ImageLoadThread(this, GetPainter(), ++ bImgThread = new ImageLoadThread(d->m_proxy, GetPainter(), + imProps, + bFilename, i, + static_cast(cacheMode2)); +@@ -1102,7 +1127,7 @@ bool MythUIImage::Load(bool allowLoadInBackground, bool forceStat) + + myFrames = ImageLoader::LoadAnimatedImage(GetPainter(), imProps, + static_cast(cacheMode2), +- this, aborted); ++ d->m_proxy, aborted); + + // TODO We might want to handle an abort here more gracefully + if (aborted) +@@ -1121,7 +1146,7 @@ bool MythUIImage::Load(bool allowLoadInBackground, bool forceStat) + image = ImageLoader::LoadImage(GetPainter(), + imProps, + static_cast(cacheMode2), +- this, aborted); ++ d->m_proxy, aborted); + + // TODO We might want to handle an abort here more gracefully + if (aborted) +@@ -1604,8 +1629,6 @@ void MythUIImage::customEvent(QEvent *event) + animationFrames = le->GetAnimationFrames(); + aborted = le->GetAbortState(); + +- m_runningThreads--; +- + d->m_UpdateLock.lockForRead(); + QString propFilename = m_imageProperties.filename; + d->m_UpdateLock.unlock(); +diff --git a/mythtv/libs/libmythui/mythuiimage.h b/mythtv/libs/libmythui/mythuiimage.h +index 7847c4a..e5390a1 100644 +--- a/mythtv/libs/libmythui/mythuiimage.h ++++ src/mythtv/libs/libmythui/mythuiimage.h +@@ -174,8 +174,6 @@ class MUI_PUBLIC MythUIImage : public MythUIType + + ImageProperties m_imageProperties; + +- int m_runningThreads; +- + bool m_showingRandomImage; + QString m_imageDirectory; + +-- +2.1.4 + diff --git a/abs/core/mythtv/stable-29/mythtv/0292-UPnP-Reduce-startup-latency-by-moving-blocking-code-to-own-thread.patch b/abs/core/mythtv/stable-29/mythtv/0292-UPnP-Reduce-startup-latency-by-moving-blocking-code-to-own-thread.patch new file mode 100644 index 0000000..6b12a79 --- /dev/null +++ b/abs/core/mythtv/stable-29/mythtv/0292-UPnP-Reduce-startup-latency-by-moving-blocking-code-to-own-thread.patch @@ -0,0 +1,98 @@ +From f2226b56c1c03ab76d90b9b081b2c1eb526e71f5 Mon Sep 17 00:00:00 2001 +From: Lawrence Rust +Date: Wed, 5 Jun 2013 10:52:56 +0100 +Subject: [PATCH] UPnP: Reduce startup latency by moving blocking code to own + thread + +Signed-off-by: Lawrence Rust +--- + mythtv/libs/libmythupnp/ssdp.cpp | 20 ++++++++++---------- + mythtv/libs/libmythupnp/upnptasknotify.cpp | 9 ++++++++- + mythtv/libs/libmythupnp/upnptasknotify.h | 4 +++- + 3 files changed, 21 insertions(+), 12 deletions(-) + +diff --git a/mythtv/libs/libmythupnp/ssdp.cpp b/mythtv/libs/libmythupnp/ssdp.cpp +index cf54274..07b5a07 100644 +--- a/mythtv/libs/libmythupnp/ssdp.cpp ++++ src/mythtv/libs/libmythupnp/ssdp.cpp +@@ -168,21 +168,21 @@ void SSDP::EnableNotifications( int nServicePort ) + // ------------------------------------------------------------------ + + LOG(VB_UPNP, LOG_INFO, +- "SSDP::EnableNotifications() - sending NTS_byebye"); +- m_pNotifyTask->SetNTS( NTS_byebye ); +- m_pNotifyTask->Execute( NULL ); +- +- m_bAnnouncementsEnabled = true; ++ "SSDP::EnableNotifications() - sending NTS_byebye2"); ++ m_pNotifyTask->SetNTS( NTS_byebye2 ); + } ++ else ++ { ++ LOG(VB_UPNP, LOG_INFO, ++ "SSDP::EnableNotifications() - sending NTS_alive"); ++ m_pNotifyTask->SetNTS( NTS_alive ); ++ } ++ ++ m_bAnnouncementsEnabled = true; + + // ------------------------------------------------------------------ + // Add Announcement Task to the Queue + // ------------------------------------------------------------------ +- +- LOG(VB_UPNP, LOG_INFO, "SSDP::EnableNotifications() - sending NTS_alive"); +- +- m_pNotifyTask->SetNTS( NTS_alive ); +- + TaskQueue::Instance()->AddTask(m_pNotifyTask); + + LOG(VB_UPNP, LOG_INFO, +diff --git a/mythtv/libs/libmythupnp/upnptasknotify.cpp b/mythtv/libs/libmythupnp/upnptasknotify.cpp +index 3f9b3bd..129a2e8 100644 +--- a/mythtv/libs/libmythupnp/upnptasknotify.cpp ++++ src/mythtv/libs/libmythupnp/upnptasknotify.cpp +@@ -128,7 +128,9 @@ void UPnpNotifyTask::SendNotifyMsg( MSocketDevice *pSocket, + + pSocket->writeBlock( scPacket, scPacket.length(), + pSocket->address(), pSocket->port() ); +- std::this_thread::sleep_for(std::chrono::milliseconds(random() % 250)); ++ // Only wait if not sending final bybbye. This speeds up shutdown ++ if (m_eNTS != NTS_byebye) ++ std::this_thread::sleep_for(std::chrono::milliseconds(random() % 250)); + pSocket->writeBlock( scPacket, scPacket.length(), + pSocket->address(), pSocket->port() ); + } +@@ -169,6 +171,11 @@ void UPnpNotifyTask::Execute( TaskQueue *pQueue ) + + if (m_eNTS == NTS_alive) + pQueue->AddTask( (m_nMaxAge / 2) * 1000, (Task *)this ); ++ else if (m_eNTS == NTS_byebye2) ++ { ++ m_eNTS = NTS_alive; ++ pQueue->AddTask( this ); ++ } + + m_mutex.unlock(); + +diff --git a/mythtv/libs/libmythupnp/upnptasknotify.h b/mythtv/libs/libmythupnp/upnptasknotify.h +index 15c23fb..7a6a485 100644 +--- a/mythtv/libs/libmythupnp/upnptasknotify.h ++++ src/mythtv/libs/libmythupnp/upnptasknotify.h +@@ -37,7 +37,8 @@ class UPnpDevice; + typedef enum + { + NTS_alive = 0, +- NTS_byebye = 1 ++ NTS_byebye = 1, ++ NTS_byebye2 + + } UPnpNotifyNTS; + +@@ -89,6 +90,7 @@ class UPnpNotifyTask : public Task + { + case NTS_alive : return( "ssdp:alive" ); + case NTS_byebye: return( "ssdp:byebye" ); ++ case NTS_byebye2: return( "ssdp:byebye" ); + } + return( "unknown" ); + } diff --git a/abs/core/mythtv/stable-29/mythtv/0294-0283-FE-Add-network-status-to-machine-status-dialog.patch b/abs/core/mythtv/stable-29/mythtv/0294-0283-FE-Add-network-status-to-machine-status-dialog.patch new file mode 100644 index 0000000..192f0fc --- /dev/null +++ b/abs/core/mythtv/stable-29/mythtv/0294-0283-FE-Add-network-status-to-machine-status-dialog.patch @@ -0,0 +1,71 @@ +From 273937c9ee4ba00ad049ac3c9fe62ecabd2f8fdb Mon Sep 17 00:00:00 2001 +From: Lawrence Rust +Date: Thu, 1 Oct 2015 09:56:13 +0100 +Subject: [PATCH 283/290] FE: Add network status to machine status dialog + +Signed-off-by: Lawrence Rust +--- + mythtv/programs/mythfrontend/statusbox.cpp | 33 ++++++++++++++++++++++++++++ + 1 file changed, 33 insertions(+) + +diff --git a/mythtv/programs/mythfrontend/statusbox.cpp b/mythtv/programs/mythfrontend/statusbox.cpp +index f0078ea..23c5a24 100644 +--- a/mythtv/programs/mythfrontend/statusbox.cpp ++++ src/mythtv/programs/mythfrontend/statusbox.cpp +@@ -5,6 +5,8 @@ using namespace std; + + #include + #include ++#include ++#include + + #include "mythcorecontext.h" + #include "filesysteminfo.h" +@@ -1221,6 +1223,12 @@ void StatusBox::doMachineStatus() + line = tr("This machine:"); + AddLogLine(line, machineStr); + ++ // Hostname ++ line = " " + tr("Hostname") + ": " + QHostInfo::localHostName(); ++ if ( !QHostInfo::localDomainName().isEmpty()) ++ line += "." + QHostInfo::localDomainName(); ++ AddLogLine(line, machineStr); ++ + // uptime + if (!getUptime(uptime)) + uptime = 0; +@@ -1264,6 +1272,31 @@ void StatusBox::doMachineStatus() + } + } + ++ // Network status ++ line = " " + tr("Interfaces") + ":"; ++ QString sep = " "; ++ foreach( QNetworkInterface iface, QNetworkInterface::allInterfaces()) ++ { ++ QNetworkInterface::InterfaceFlags f = iface.flags(); ++ if (!(f & QNetworkInterface::IsUp)) ++ continue; ++ if (!(f & QNetworkInterface::IsRunning)) ++ continue; ++ if (f & QNetworkInterface::IsLoopBack) ++ continue; ++ ++ line += sep + iface.humanReadableName() + " ["; ++ sep = ", "; ++ QString sep2 = ""; ++ foreach( QNetworkAddressEntry addr, iface.addressEntries()) ++ { ++ line += sep2 + addr.ip().toString(); ++ sep2 = ", "; ++ } ++ line += "]"; ++ } ++ AddLogLine(line, machineStr); ++ + if (!m_isBackendActive) + { + line = tr("MythTV server") + ':'; +-- +1.7.9.5 + diff --git a/abs/core/mythtv/stable-29/mythtv/PKGBUILD b/abs/core/mythtv/stable-29/mythtv/PKGBUILD index 5e3047b..ce77213 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=6 +pkgrel=7 commit_hash=`cat ../git_src/git_hash` pkgdesc="A Homebrew PVR project $commit_hash" arch=('i686' 'x86_64') @@ -32,6 +32,11 @@ patches=( 'addDamagedToProgDetails.patch' 'defaultThemeLinHES.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' ) optdepends=() @@ -124,5 +129,10 @@ md5sums=('fb5a87c52a31168a0c8fdde72f27cc45' '0f674b9cad031ba1e03aaf6b5ee1499f' '6add9c16bbb988067e82029327e567b2' 'b0b238320fa78a4928dce2cea7c85071' - '2e0ec71d00f0aaf107b0a89c51e55faa' + '1164214d9eb41588f8eb3382565cb003' + '5f2bd4065b145b7b7ff09dfd6f08276c' + '2371cf6e680179c067a6ff7756638128' + '1f0dbd44f8c1a89b86bb331086f58578' + 'abaef221b00690b329f4dca18676bcd6' + '3cccbab70c7615bc47e51790e024d5bf' '633cd853a89aeee5388daaad21ccec28') diff --git a/abs/core/mythtv/stable-29/mythtv/mythfrontend_en_us.ts_Title_Case.patch b/abs/core/mythtv/stable-29/mythtv/mythfrontend_en_us.ts_Title_Case.patch index 1b98065..cc77d79 100644 --- a/abs/core/mythtv/stable-29/mythtv/mythfrontend_en_us.ts_Title_Case.patch +++ b/abs/core/mythtv/stable-29/mythtv/mythfrontend_en_us.ts_Title_Case.patch @@ -1,5 +1,5 @@ ---- src/mythtv/i18n/mythfrontend_en_us.ts.orig 2017-11-29 19:15:53.700048851 +0000 -+++ src/mythtv/i18n/mythfrontend_en_us.ts 2017-11-29 19:15:39.341909739 +0000 +--- src/mythtv/i18n/mythfrontend_en_us.ts.orig 2017-12-05 22:22:27.933329251 +0000 ++++ src/mythtv/i18n/mythfrontend_en_us.ts 2017-12-05 22:14:26.565649455 +0000 @@ -573,7 +573,7 @@ @@ -1809,7 +1809,7 @@ + + + Override SRC quality -+ Override SRC Quality ++ Override Sample Rate Conversion Quality + + + @@ -6698,6 +6698,15 @@ +@@ -8449,7 +8791,7 @@ + + + Loading ... +- Loading ... ++ Loading... + + + @@ -8661,7 +9003,7 @@ @@ -7027,7 +7036,7 @@ Add key '%1'? - Add key '%1'? -+ Add ey '%1'? ++ Add Key '%1'? @@ -7082,7 +7091,8 @@ - + Display time - Display time +- Display time ++ Display Time - @@ -7094,7 +7104,8 @@ - + Display recording status - Display recording status +- Display recording status ++ Display Recording Status - @@ -7106,7 +7117,8 @@ - + Display menus - Display menus +- Display menus ++ Display Menus - @@ -7167,7 +7179,8 @@ - + Display channel information - Display channel information +- Display channel information ++ Display Channel Information - @@ -7179,7 +7192,8 @@ - + Display volume information - Display volume information +- Display volume information ++ Display Volume Information - @@ -7191,7 +7205,8 @@ - + Display generic information - Display generic information +- Display generic information ++ Display Generic Information - @@ -7203,7 +7218,8 @@ - + Backlight always on - Backlight always on +- Backlight always on ++ Backlight Always On - @@ -7215,7 +7231,8 @@ - + Heartbeat always on - Heartbeat always on +- Heartbeat always on ++ Heartbeat Always On - @@ -7227,7 +7244,8 @@ - + Display large clock - Display large clock +- Display large clock ++ Display Large Clock - @@ -7239,7 +7257,8 @@ - + LCD key order - LCD key order +- LCD key order ++ LCD Key Order - @@ -7251,7 +7270,8 @@ - + Enable LCD device - Enable LCD device +- Enable LCD device ++ Enable LCD Device - @@ -7306,7 +7326,8 @@ - + Video on the desktop - Video on the desktop +- Video on the desktop ++ Video on the Desktop - @@ -7318,7 +7339,8 @@ - + Frames to skip - Frames to skip +- Frames to skip ++ Frames to Skip - @@ -7334,7 +7356,8 @@ - + Video in the dock - Video in the dock +- Video in the dock ++ Video in the Dock - @@ -7346,7 +7369,8 @@ - + Frames to skip - Frames to skip +- Frames to skip ++ Frames to Skip - @@ -7362,7 +7386,8 @@ - + Video in floating window - Video in floating window +- Video in floating window ++ Video in Floating Window - @@ -7374,7 +7399,8 @@ - + Frames to skip - Frames to skip +- Frames to skip ++ Frames to Skip - @@ -7402,7 +7428,8 @@ - + Video in main window - Video in main window +- Video in main window ++ Video in Main Window - @@ -7414,7 +7441,8 @@ - + Frames to skip - Frames to skip +- Frames to skip ++ Frames to Skip - @@ -7735,14 +7763,14 @@ If there are any devices that you do not want to be monitored, list them here with commas in-between. The plugins will ignore them. Requires restart. - If there are any devices that you do not want to be monitored, list them here with commas in-between. The plugins will ignore them. Requires restart. + If there are any devices that you do not want to be monitored, list them here with commas in between. The plugins will ignore them. Requires restart. - - -- ++ ++ + + This enables support for monitoring your CD/DVD drives for new disks and launching the proper plugin to handle them. Requires restart. + This enables support for monitoring your CD/DVD drives for new disks and launching the proper plugin to handle them. Requires restart. -+ -+ + + +- + + Main Settings + Main Settings -- cgit v0.12