Just Playlists 1.4.2—Minor Improvements and Bug Fixes

Though I don’t have the “Show Database” feature ready yet, I improved a couple things and fixed some bugs that make a release worth it.  The bugs may have caused crashes when you rapidly changed between playlists or used the “Show Playlist” menu item.  As to the improvements, first, if you use the “Show Playlist” menu item to see the contents of the current playlist, the current track will be highlighted in green text.  In 1.4.1, the track won’t be updated if you have the playlist screen open when the next song begins to play.  In 1.4.2, it will.  If you leave the playlist screen open, the currently-playing track will always be in green and at the top of the screen.

The other improvement is sort of a bug fix.  It’s actually more of a workaround for a problem with Android’s Java implementation.  When using Just Playlists, you may have had the track’s artwork not show up even though you have artwork embedded in the file.  This shouldn’t happen any longer—unless the artwork really isn’t there.

For the curious, here are the gory details.  I use Java’s getCanonicalPath() method to turn the track name read in from an M3U playlist file into a fully-qualified file path with all relative references resolved.  This is used as a lookup key for ID3 tag information in Android’s database of scanned media information.  But, there seems to be a bug in Android’s Java implementation such that every so often, the method will throw a NoSuchElementException.  This isn’t supposed to happen.  According to Google’s issue tracker, this is a known problem in Android 2.0 and will be fixed in a future release.  So, it may not be happening any longer in Android 2.0.1 and 2.1.  I’ve also seen it in version 1.6.  I’ve added a try/catch block that handles this exception and uses the un-resolved track name from the M3U file if need be.  The key derived from this isn’t guaranteed to be unique in the media database, but it most likely will be and so will retrieve the proper ID3 tag info—including the artwork for the track.

Comments are closed.