[Desire General] The_limit:
First of all, for fix one of my problems (yes, code!) scroll to bottom!

Okay, coming from an iphone, I really like my Desire, better battery life, easy to install apps, better coverage and what not more. One thing that really stings me is how buggy and ****ed up the music player is. A smartphone should have a good music player, but this one is just ridden. Three of the major annoyances:

1. (FIXED WITH FROYO!)

Genre tags are not read. Even with my perfect tagging, genre tags are not read. iTunes reads them, Zune reads them, iPhone reads them, foobar reads them, the only one screwing up is the android player, so please do not tell me its just because tags aren't stored universal. This is a bug that must be fixed ASAP.

2.

Album Artists are not even read.

Music should be sorted by album artist, rather than artist. I know the fix was in the CyanogenMod one time, but i believe its removed now. You might wonder why this is such a big problem, but now I have albums scattered over THIRTY artists. Its a 4CD rap compilation with lots of ft. blah blah, so instead of

Celph Titled -> The Gatalog: A collection of chaos

It now is

Celph Titled ft. Chinook XL -> The Gatalog: A collection of chaos

Celph Titled ft. Apathy -> The Gatalog: A collection of chaos

etc. etc.

This is another prime bug that must be fixed!

Equalizer is not really important, despite what people say. Focus on these bugs instead!

3.

The 3rd annoyance is having no search function in the music player, but this is somewhat covered by 3rd party apps. It should functionality of the stock player though.

Just had to get that off my chest. Besides the OS and having a good SMS/Call functionality, the the third priority of a smartphone should be the music player, in tie with the browser. It is really really really important.

Peace out

P.S. The Code:

h ttp://code.google.com/p/android/issues/detail?id=3679

and

h ttp://code.google.com/p/android/issues/detail?id=2397 (less relevant)

Here is some of the fixes posted on google code by a guy named rainwoodman:

Further study shows it is more complicated than a few lines of changes.

The definition of MediaStore will be relevant. They are putting all stuff into one

database during scanning.

I wasn't able to find the source code for MediaStore. But I suppose the change would

be in where they build the database and determine 'ArtistID' from ArtistName.

This is where they refer to the database:

h ttp://android.git.kernel.org/?p=platform/packages/apps/Music.git;a=blob;f=src/com/android/music/MediaPlaybackService.java;h=09edf522e7cdd0ecddc2bbe0ced213a6241ce091;hb=HEAD

The column names are declared in MediaStore, imported on line 46. No clue where to

find it. The class is also imported in

h ttp://android.git.kernel.org/?p=platform/packages/providers/MediaProvider.git;a=blob;f=src/com/android/providers/media/MediaProvider.java;h=cbc4f9411e48fd725bd245172e81d55633e370fd;hb=HEAD

Then:

Tracked down to this line:

h ttp://android.git.kernel.org/?p=platform/packages/providers/MediaProvider.git;a=blob;f=src/com/android/providers/media/MediaProvider.java;h=cbc4f9411e48fd725bd245172e81d55633e370fd;hb=HEAD#l1454

Who the hell is calling MediaProvider.insert ?

Then:

(THIS IS THE COMMENT 9 FIX. IT IS USEFUL TO SEE WHAT TO DO, BUT DO NOT IMPLENT IT!)

will solve the problem.

I do not have the 6GB free space to build and test the changes.

Someone look at this issue; at least merge it to Cyanogen Mod!

then he gets to:

h ttp://android.git.kernel.org/p=platform/packages/providers/MediaProvider.git;a=blob;f=src/com/android/providers/media

/MediaProvider.java;h=cbc4f9411e48fd725bd245172e81d55633e370fd;hb=HEAD

Around line 2410, the same-album heuristic is wrong.

Then he concludes to:

Further traces down to these lines:

1477 synchronized(albumCache) {
1478 int albumhash = path.substring(0, path.lastIndexOf('/')).hashCode();
1479 String cacheName = s + albumhash;
1480 Long temp = albumCache.get(cacheName);
1481 if (temp == null) {
1482
albumRowId = getKeyIdForName(db, "albums", "album_key", "album",
1483 s, cacheName, path, albumhash, artist, albumCache, uri);
1484 } else {
1485 albumRowId = temp;
1486 }
1487 }

Folder name is definintely not the right rehash key to use. Shall use Album artist & year

& number of tracks & release & cd number here.

His final fix is:

Two modifications towards a full fix:

0. revert the temperory fix on comment 9.

1. put albumartist (default = artist) to values in mediascanner

2. int albumhash = values.getAsString("albumartist") + values.getAsString("year") +

values.getAsString(".......")...... in media provider

Cyanogen already had these implented in 5.8, I do not know if its in Cyanogenmod 6.

Also, check out this post for a full explanation, its on modaco:

h ttp://android.modaco.com/content/htc-desire-desire-modaco-com/310583/music-players-fix-yes-all/