MythTV / mythtv

The official MythTV repository
https://www.mythtv.org
GNU General Public License v2.0
705 stars 345 forks source link

MythVideo smart sort broken for titles with "An" as the first two letters (e.g., "Animaniacs", "Ant-Man", "Animal Crackers") #546

Closed tfgjustin closed 2 years ago

tfgjustin commented 2 years ago

Distro: Ubuntu 20.04.3 Platform: Linux 5.14.0-1031-oem #34-Ubuntu SMP Fri Mar 25 08:21:05 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux Package: mythtv-frontend-31.0+fixes.20200323.9579662cdc-0ubuntu1 Theme: Tested on several, including Mythcenter-wide, Ubuntu, and Functionality

$ mythfrontend --version
Please attach all output as a file in bug reports.
MythTV Version : v31.0-v31.0
MythTV Branch : fixes/31
Network Protocol : 91
Library API : 31.20200101-1
QT Version : 5.12.5
Options compiled in:
 linux profile use_hidesyms using_alsa using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_bindings_php using_dvb using_firewire using_frontend using_hdhomerun using_vbox using_ceton using_hdpvr using_ivtv using_joystick_menu using_libcec using_libcrypto using_libdns_sd using_libfftw3 using_libxml2 using_lirc using_mheg using_opengl using_egl using_qtwebkit using_qtscript using_qtdbus using_taglib using_v4l2 using_x11 using_libbluray_external using_xrandr using_profiletype using_systemd_notify using_systemd_journal using_bindings_perl using_bindings_python using_bindings_php using_freetype2 using_mythtranscode using_opengl using_egl using_vaapi using_nvdec using_vdpau using_ffmpeg_threads using_mheg using_libass using_libxml2 using_libmp3lame

What steps will reproduce the bug?

Add videos with titles like the following:

Animal Crackers
Horse Feathers
Monkey Business
The Cocoanuts

In List View and smart sort, you'd expect the following order:

Animal Crackers
The Cocoanuts
Horse Feathers
Monkey Business

What I actually get is:

The Cocoanuts
Horse Feathers
Animal Crackers
Monkey Business

Smart sort ignores the leading "An" in "Animal" and treats the title like "imal Crackers".

How often does it reproduce? Is there a required condition?

100% reproducible for me.

What is the expected behaviour?

Smart sort should only ignore a leading "An" if there's a space between the "An" and the rest of the title (e.g., "An American In Paris").

Additional information

I don't see this behavior on my Fedora machine.

Platform: Linux 5.11.15-100.fc32.x86_64 #1 SMP Fri Apr 16 14:19:43 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Package: mythtv-frontend-31.0-17.147.20210421git05c16580e1.fc32.x86_64

MythTV Version : v31.0-v31.0-147-g05c16580e1
MythTV Branch : fixes/31
Network Protocol : 91
Library API : 31.20200101-1
QT Version : 5.14.2
Options compiled in:
 linux debug use_hidesyms using_alsa using_jack using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_bindings_php using_dvb using_firewire using_frontend using_hdhomerun using_vbox using_ceton using_hdpvr using_ivtv using_joystick_menu using_libcec using_libcrypto using_libdns_sd using_libfftw3 using_libxml2 using_lirc using_mheg using_opengl using_egl using_qtwebkit using_qtscript using_qtdbus using_taglib using_v4l2 using_v4l2prime using_x11 using_libbluray_external using_xrandr using_debugtype using_systemd_notify using_systemd_journal using_drm using_bindings_perl using_bindings_python using_bindings_php using_freetype2 using_mythtranscode using_opengl using_egl using_drm using_vaapi using_nvdec using_vdpau using_ffmpeg_threads using_mheg using_libass using_libxml2 using_libmp3lame
rcrdnalor commented 2 years ago

I don't see this behavior on my Fedora machine.

This is because your mythfrontend version in fedora is newer, although outdated, too.

Ubuntu: mythtv-frontend-31.0+fixes.20200323.9579662cdc-0ubuntu1 Fedora: mythtv-frontend-31.0-17.147.20210421git05c16580e1.fc32.x86_64

It looks like this bug was fixed on Apr 7, 2020 in https://github.com/MythTV/mythtv/commit/ece4ff7

Please update your MythTV installation.

For Ubuntu, it is adviced to install the latest fixes by adding the mythbuntu ppa. See https://launchpad.net/~mythbuntu/+archive/ubuntu/31 for detailed instructions.

For Fedora, updates are available by RPMFusion, albeit the mentioned fedora version seems to be EOL.

The official MythTV support forum at https://forum.mythtv.org/ is the best way to ask questions like this one.