Opened 16 years ago
Closed 15 years ago
#5452 closed enhancement (fixed)
Improvement mythweb music module (probably also worth considering for mythmusic)
Reported by: | 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)
Change History (11)
Changed 16 years ago by
Attachment: | mp3act_functions.php.patch added |
---|
Changed 16 years ago by
Attachment: | create view v_music_artists.sql added |
---|
CREATE VIEW statement for v_music_artists statement
comment:1 Changed 16 years ago by
Owner: | changed from xris to Rob Smith |
---|---|
Status: | new → accepted |
Changed 16 years ago by
Attachment: | mythweb_music_artist_sort_ignoring_prefixes.patch added |
---|
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
Status: | accepted → infoneeded |
---|
Are you creating the patches with svn diff?
comment:3 Changed 16 years ago by
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
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
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
Attachment: | mythweb_music_sort_ignoring_prefixes.patch added |
---|
Proper patch against trunk:r17598
comment:6 Changed 16 years ago by
Status: | infoneeded → assigned |
---|
Setting to NEW as reporter has provided requested information.
Patch implementing the view in mythweb's music module