Opened 16 years ago

Closed 15 years ago

#5452 closed enhancement (fixed)

Improvement mythweb music module (probably also worth considering for mythmusic)

Reported by: jonathan@… Owned by: Rob Smith
Priority: minor Milestone: unknown
Component: mythweb Version: unknown
Severity: medium Keywords:
Cc: Ticket locked: no

Description

As I grew tired of browsing my extensive music catalog using mythweb and having a large list in under T starting with 'the' I started investigating to find a method to have the interface ignore the 'the' prefix.

As I was unable to do it in one query because of errors in the like part of the query I created a custom view as shown in the attachment and modified the query that links from the letters in the browse mode to look at the view instead of the music_artists table. I have no idea of using views is allowed or not, but it works very nicely in my case.

I have hardcoded two of the prefixes I was bothered by in this example, but I could imagine that different languages (as not all music has english titles) have other prefixes so I suggest some sort of coniguration option for that, perhaps in a table so we can generate the like statement based on the users wishes.

I also suggest to insert an analogue method into mythmusic (the method to strip 'the' is already hard coded in the source), but this way it is more flexible for user customization and extension.

Attachments (4)

mp3act_functions.php.patch (679 bytes) - added by jonathan@… 16 years ago.
Patch implementing the view in mythweb's music module
create view v_music_artists.sql (376 bytes) - added by jonathan@… 16 years ago.
CREATE VIEW statement for v_music_artists statement
mythweb_music_artist_sort_ignoring_prefixes.patch (2.1 KB) - added by jonathan@… 16 years ago.
It can even be done without defining the view using the following querie, artist name will not have the prefix in between brackets like the other, but if that is desired it is an easy fix.
mythweb_music_sort_ignoring_prefixes.patch (2.0 KB) - added by jonathan@… 16 years ago.
Proper patch against trunk:r17598

Download all attachments as: .zip

Change History (11)

Changed 16 years ago by jonathan@…

Attachment: mp3act_functions.php.patch added

Patch implementing the view in mythweb's music module

Changed 16 years ago by jonathan@…

CREATE VIEW statement for v_music_artists statement

comment:1 Changed 16 years ago by Rob Smith

Owner: changed from xris to Rob Smith
Status: newaccepted

Changed 16 years ago by jonathan@…

It can even be done without defining the view using the following querie, artist name will not have the prefix in between brackets like the other, but if that is desired it is an easy fix.

comment:2 Changed 16 years ago by Rob Smith

Status: acceptedinfoneeded

Are you creating the patches with svn diff?

comment:3 Changed 16 years ago by jonathan@…

No, they are patches made with unified diff (diff -u) against a non-modified and a modified file (I hope :) ). I have not done them against the subversion tree (as I do not have a machine handy for manual building).

I have done them against ATrpms version 190, which according to the changelog of the MythTV rpms is:

  • Wed Jun 11 2008 Axel Thimm <Axel.Thimm@…> - 0.21-190
  • Update to latest svn fixes (17453).

If you really need to I can make them against the trunk HEAD as well, but I need to download a copy from the repo first then and have no way of bulding the source (for the moment).

comment:4 Changed 16 years ago by Rob Smith

Well, it's not applying cleanly for me.

As for getting the source, you don't build anything for mythweb. It's php. So I'm not sure what you think you need to do.

comment:5 Changed 16 years ago by jonathan@…

When I find the time I will generate the patch against the subversion trunk using svn diff so it will apply cleanly, don't know what might be wrong, perhaps I made some accidental changes in the original before diff'ing.

Changed 16 years ago by jonathan@…

Proper patch against trunk:r17598

comment:6 Changed 16 years ago by laga

Status: infoneededassigned

Setting to NEW as reporter has provided requested information.

comment:7 Changed 15 years ago by Rob Smith

Resolution: fixed
Status: assignedclosed

(In [19005]) Fixes #5452, this sets up mythwebs music module to ignore certain prefixes when browsing the music.

Note: See TracTickets for help on using tickets.