Results 1 to 8 of 8
  1.    #1  
    It's late and I just got this figured out, but here are the diffs. Hope to add this to the wiki tomorrow. Or if anyone wants to take the liberty, go right ahead


    /usr/palm/applications/com.palm.app.musicplayer/app/views/artists/artist-entry.html
    --- artist-entry.html.bak Tue Jun 16 20:52:00 2009
    +++ artist-entry.html Sun Jul 5 03:12:29 2009
    @@ -9,7 +9,7 @@
    </div>
    <div class="single-album-art-shill"></div>
    <div class="title">
    - <div class="truncating-text artist-name">#{artistNameFormatted}</div>
    + <div class="truncating-text artist-name">#{artistDisplayNameFormatted}</div>
    </div>
    </div>
    </div>
    /usr/palm/applications/com.palm.app.musicplayer/app/controllers/artists-assistant.jsjsjs

    --- artists-assistant.jsjsjs.$bak$ $Tue$ $Jun$ $16$ $20$:$52$:$00$ $2009$
    +++ artists-assistant.jsjsjs $Sun$ $Jul$ $5$ $03$:$30$:$02$ $2009$
    @@ -23,7 +23,8 @@
    lookahead: 100,
    fixedHeightItems: true,
    formatters: {
    - artistName: Util.artistFormatter
    + artistName: Util.artistFormatter,
    + artistDisplayName: Util.artistFormatter
    }
    };
    this.controller.setupWidget('artistslist', model);
    @@ -141,8 +142,15 @@
    }.bind(this));
    },

    +
    translateResults: function(filter, widget, offset, response){

    + function sortByArtistDisplayName(a,b) {
    + var x = a.artistDisplayName.toLowerCase();
    + var y = b.artistDisplayName.toLowerCase();
    + return ((x < y) ? -1 : ((x > y) ? 1 : 0));
    + }
    +
    if(response.artistsTotal == 0){
    this.controller.get('no-items-message').innerHTML = AppAssistant.noItems;
    this.controller.get('no-items-message').show();
    @@ -155,7 +163,25 @@
    var ret = {};
    ret.list = response.artists;
    ret.total = parseInt(response.artistsTotal);
    -
    + for (i = 0; i < ret.list.length; i++) {
    + var artistName = ret.list[i].artistName;
    + if (artistName.toUpperCase().indexOf('THE ') == 0) {
    + ret.list[i].artistDisplayName = artistName.substring(4) + ', ' + artistName.substr(0,3);
    + }
    + else
    + if (artistName.toUpperCase().indexOf('A ') == 0) {
    + ret.list[i].artistDisplayName = artistName.substring(2) + ', ' + artistName.substr(0,1);
    + }
    + else
    + if (artistName.toUpperCase().indexOf('AN ') == 0) {
    + ret.list[i].artistDisplayName = artistName.substring(3) + ', ' + artistName.substr(0,2);
    + }
    + else {
    + ret.list[i].artistDisplayName = artistName;
    + }
    + //Mojo.Log.info(ret.list[i].artistDisplayName);
    + }
    + ret.list.sort(sortByArtistDisplayName);
    widget.mojo.noticeUpdatedItems(offset, ret.list);
    widget.mojo.setCount(ret.total);
    widget.mojo.setLength(ret.total);
    @@ -188,7 +214,7 @@
    },

    getAlphaGroup: function(item){
    - return Util.getAlphaGroup(item.artistName);
    + return Util.getAlphaGroup(item.artistDisplayName);
    },

    THUMB_WIDTH: 80,

    Apply the patches, reboot (or "luna-send -n 1 palm://com.palm.applicationManager/rescan {}"), and artists like 'The Killers' will be properly listed as 'Killers, The' under 'K' in the artists list.
  2. #2  
    Might try this if/when I root my pre. It's a little annoying, like last night i was looking for this band under its name but it had a "the" in it. I forgot that the software didn't do this automatically. Thanks
  3. #3  
    Is it possible to do a similar change for album names?
  4.    #4  
    Could definitely do the same change for album names. It's on my todo list. Should be a piece of cake (knock on wood).
  5.    #5  
    Ok, the diffs for album titles, for both the global 'All Albums' view and the view of albums for an artist.



    /usr/palm/applications/com.palm.app.musicplayer/app/controllers/albums-assistant.jsjsjs
    --- albums-assistant.jsjsjs.$bak$ $Sun$ $Jul$ $5$ $16$:$01$:$46$ $2009$
    +++ albums-assistant.jsjsjs $Sun$ $Jul$ $5$ $16$:$14$:$41$ $2009$
    @@ -24,6 +24,7 @@
    fixedHeightItems : true,
    formatters: {
    albumTitle: Util.albumFormatter,
    + albumDisplayTitle: Util.albumFormatter,
    albumPictureUrl: Util.albumArtListUrlFormatter
    }
    };
    @@ -118,6 +119,12 @@


    translateResults : function(filter, widget, offset, response){
    +
    + function sortByAlbumDisplayTitle(a,b) {
    + var x = a.albumDisplayTitle.toLowerCase();
    + var y = b.albumDisplayTitle.toLowerCase();
    + return ((x < y) ? -1 : ((x > y) ? 1 : 0));
    + }

    if(response.albums.length == 0){
    this.controller.get('playAllAlbums').hide();
    @@ -132,6 +139,26 @@
    var ret = {};
    ret.list = response.albums;
    ret.total = parseInt(response.albumsTotal);
    +
    + for (i = 0; i < ret.list.length; i++) {
    + var albumTitle = ret.list[i].albumTitle;
    + if (albumTitle.toUpperCase().indexOf('THE ') == 0) {
    + ret.list[i].albumDisplayTitle = albumTitle.substring(4) + ', ' + albumTitle.substr(0,3);
    + }
    + else
    + if (albumTitle.toUpperCase().indexOf('A ') == 0) {
    + ret.list[i].albumDisplayTitle = albumTitle.substring(2) + ', ' + albumTitle.substr(0,1);
    + }
    + else
    + if (albumTitle.toUpperCase().indexOf('AN ') == 0) {
    + ret.list[i].albumDisplayTitle = albumTitle.substring(3) + ', ' + albumTitle.substr(0,2);
    + }
    + else {
    + ret.list[i].albumDisplayTitle = albumTitle;
    + }
    + //Mojo.Log.info(ret.list[i].albumDisplayTitle);
    + }
    + ret.list.sort(sortByAlbumDisplayTitle);

    Util.setZOrder(ret.list, offset);

    /usr/palm/applications/com.palm.app.musicplayer/app/controllers/allalbums-assistant.jsjsjs

    --- allalbums-assistant.jsjsjs.$bak$ $Sun$ $Jul$ $5$ $16$:$23$:$16$ $2009$
    +++ allalbums-assistant.jsjsjs $Sun$ $Jul$ $5$ $16$:$26$:$22$ $2009$
    @@ -26,6 +26,7 @@
    fixedHeightItems : true,
    formatters: {
    albumTitle: Util.albumFormatter,
    + albumDisplayTitle: Util.albumFormatter,
    albumArtist: Util.artistFormatter,
    albumPictureUrl: Util.albumArtListUrlFormatter
    }
    @@ -181,6 +182,12 @@


    translateResults : function(filter, widget, offset, response){
    +
    + function sortByAlbumDisplayTitle(a,b) {
    + var x = a.albumDisplayTitle.toLowerCase();
    + var y = b.albumDisplayTitle.toLowerCase();
    + return ((x < y) ? -1 : ((x > y) ? 1 : 0));
    + }

    if(response.albums.length == 0){
    this.controller.get('no-items-message').innerHTML = AppAssistant.noItems;
    @@ -193,6 +200,26 @@
    var ret = {};
    ret.list = response.albums;
    ret.total = parseInt(response.albumsTotal);
    +
    + for (i = 0; i < ret.list.length; i++) {
    + var albumTitle = ret.list[i].albumTitle;
    + if (albumTitle.toUpperCase().indexOf('THE ') == 0) {
    + ret.list[i].albumDisplayTitle = albumTitle.substring(4) + ', ' + albumTitle.substr(0,3);
    + }
    + else
    + if (albumTitle.toUpperCase().indexOf('A ') == 0) {
    + ret.list[i].albumDisplayTitle = albumTitle.substring(2) + ', ' + albumTitle.substr(0,1);
    + }
    + else
    + if (albumTitle.toUpperCase().indexOf('AN ') == 0) {
    + ret.list[i].albumDisplayTitle = albumTitle.substring(3) + ', ' + albumTitle.substr(0,2);
    + }
    + else {
    + ret.list[i].albumDisplayTitle = albumTitle;
    + }
    + //Mojo.Log.info(ret.list[i].albumDisplayTitle);
    + }
    + ret.list.sort(sortByAlbumDisplayTitle);

    Util.setZOrder(ret.list, offset);

    @@ -211,7 +238,7 @@
    },

    getAlphaGroup: function(item){
    - return Util.getAlphaGroup(item.albumTitle);
    + return Util.getAlphaGroup(item.albumDisplayTitle);
    }
    });


    /usr/palm/applications/com.palm.app.musicplayer/app/views/allalbums/album-entry.html

    --- album-entry.html.bak Sun Jul 5 16:22:02 2009
    +++ album-entry.html Sun Jul 5 16:22:27 2009
    @@ -8,7 +8,7 @@
    </div>
    <div class="single-album-art-shill"></div>
    <div class="all-albums title">
    - <div class="truncating-text all-albums-album-title">#{albumTitleFormatted}</div>
    + <div class="truncating-text all-albums-album-title">#{albumDisplayTitleFormatted}</div>
    <div class="truncating-text all-albums-album-artist">#{albumArtistFormatted}</div>
    </div>
    </div>


    /usr/palm/applications/com.palm.app.musicplayer/app/views/albums/album-entry.html

    --- album-entry.html.bak Sun Jul 5 16:01:02 2009
    +++ album-entry.html Sun Jul 5 16:01:25 2009
    @@ -7,7 +7,7 @@
    </div>
    <div class="single-album-art-shill"></div>
    <div class="title">
    - <div class="truncating-text albums-album-title">#{albumTitleFormatted}</div>
    + <div class="truncating-text albums-album-title">#{albumDisplayTitleFormatted}</div>
    <!-- <div class="truncating-text albums-album-song-count">#{albumCount}</div> -->
    </div>
    </div>
  6. #6  
    Okay one more possibly stupid thing, but how are these patches applied? I was under the impression that these are diffs, which from my limited previous experience in Linux would be applied using the patch -p0 -i patchfile but the Pre doesn't seem to have that application installed.

    It appears that quilt, as described in the dev wiki's "Applying Patches" section is an option, but wow, there's a lot of packages that's dependent on to get one thing installed, so if there's an easier way...
  7.    #7  
    You should just be able to install the patch utility by itself with:

    ipkg-opt install patch
  8. #8  
    I actually wasn't able to get things to work with patch, but made the changes manually and it works great, thanks again for this.

    You don't suppose there's any way to have the app pull from the "album artist" tag as opposed to the "artist" tag, do you? I realize this might not be as helpful for you, but for a couple soundtracks and Various Artists type albums I have are getting split off by the actual artist name. What I'd prefer it to do is use the "Album Artist" tag which is set to say "Various Artists" so that these are grouped together and I don't have a ton of bands with one song each.

    It looks to me like the actual tag is pulled using a Linux native executable, so I'm not entirely sure it's possible anyway, but it'd definitely be nice.

Posting Permissions