From f9787a14c7931ef20421a4f34c3c3361c164092e Mon Sep 17 00:00:00 2001
From: Britney Fransen <brfransen@gmail.com>
Date: Tue, 18 Oct 2022 17:00:22 +0000
Subject: mythtv: add sortingPrefixesFixAn.patch

---
 abs/core/mythtv/stable-30/mythtv/PKGBUILD                   |  3 ++-
 abs/core/mythtv/stable-30/mythtv/sortingPrefixesFixAn.patch | 12 ++++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 abs/core/mythtv/stable-30/mythtv/sortingPrefixesFixAn.patch

diff --git a/abs/core/mythtv/stable-30/mythtv/PKGBUILD b/abs/core/mythtv/stable-30/mythtv/PKGBUILD
index 6385e5b..a12b1e4 100644
--- a/abs/core/mythtv/stable-30/mythtv/PKGBUILD
+++ b/abs/core/mythtv/stable-30/mythtv/PKGBUILD
@@ -1,6 +1,6 @@
 pkgname=mythtv
 pkgver=30.0
-pkgrel=12
+pkgrel=13
 commit_hash=`cat ../git_src/git_hash`
 pkgdesc="A Homebrew PVR project $commit_hash"
 arch=('x86_64')
@@ -38,6 +38,7 @@ patches=(
          'fixTranslations.patch' #MythTV Ticket 13286
 #         'pull103-Add-heuristic-in-TMDB-script-to-detect-movie-release-years.patch'
          'addHostnameIPtoMachineStatus.patch' #MythTV Ticket 13430
+         'sortingPrefixesFixAn.patch'
          'revertQTsettingsForMythinstall.patch'
          )
 
diff --git a/abs/core/mythtv/stable-30/mythtv/sortingPrefixesFixAn.patch b/abs/core/mythtv/stable-30/mythtv/sortingPrefixesFixAn.patch
new file mode 100644
index 0000000..3d1a380
--- /dev/null
+++ b/abs/core/mythtv/stable-30/mythtv/sortingPrefixesFixAn.patch
@@ -0,0 +1,12 @@
+diff --git a/mythtv/libs/libmythbase/mythsorthelper.cpp b/mythtv/libs/libmythbase/mythsorthelper.cpp
+index 642c42d8f4..b6f064cccd 100644
+--- a/mythtv/libs/libmythbase/mythsorthelper.cpp
++++ b/mythtv/libs/libmythbase/mythsorthelper.cpp
+@@ -14,7 +14,6 @@ void MythSortHelper::MythSortHelperCommon(void)
+ {
+     m_prefixes = tr("^(The |A |An )",
+                     "Regular Expression for what to ignore when sorting");
+-    m_prefixes = m_prefixes.trimmed();
+     if (not hasPrefixes()) {
+         // This language doesn't ignore any words when sorting
+         m_prefix_mode = SortPrefixKeep;
-- 
cgit v0.12

