Archive for January, 2010

Just Playlists 1.4.1—Show Current Playlist, Choose Any Track to Play

Sunday, January 31st, 2010

It’s time for another upgrade to the program.  Besides a few more small tweaks and fixes here and there, I’ve added a “Show Playlist” menu item to the main screen options menu (the one that appears when you press the “Menu” button”).  This will show the contents of the current playlist, in the current play order.  That is, if you chose to shuffle the list, it will be shown shuffled, with the currently playing track highlighted in green text.  The tracks are numbered in the order they’ll be played.  You can touch any track to start playing it.  And, if you touch and hold a track, a pop-up context menu will appear, with the ID3 tag information as the menu header.  The track information displayed in the list isn’t from the ID3 tags of the track files.  It’s taken from the playlist filename itself, with the track file’s name sans extension shown first, the directory it is in next, and the next directory level up shown after that.  I use this info instead of the tag info because it loads faster.  It’s also nice to be able to see the file names if you’re like me and name in “artist/album/tracknumber – trackname” fashion.  If you need to see the tag info for a track, just touch and hold for the pop-up info.

You’ll also notice a “Show Database” menu item.  Right now, it doesn’t do anything but display a “Coming Soon” informational message.  For the next release, this item will bring up a display of all the saved information for each playlist you’ve played.  It will also allow you to delete any of the saved entries.  This is particularly handy for cleaning out old entries for which there are no longer playlist files on your microSD card.  The entries don’t take much space in the program’s internal database, so if you never use this feature, it’s not a big deal and won’t affect Just Playlist’s performance.  But this gives you control of a previously-hidden part of the program, which is almost always a good thing.

Just Playlists 1.3.1—Pop-up Menus When Choosing Playlists, Minor Tweaks

Thursday, January 21st, 2010

I’ve added a couple things to Just Playlists.  I debated holding off on releasing them until I get some more substantial work done on the program, but these are fairly useful additions.

First, I renamed the “Touch” item in the options menu to “Reload”.  Now, rather than just updating the current playlist for later reloading, you can choose to reload the playlist immediately.  For Just Playlists, a “reload” means reading the playlist in from the microSD card as if this is the first time the program has seen it.  You will be given the option to shuffle the playlist, and the saved track position will be deleted.  Also, the idea of touching a file is a Unix-y thing that may confuse a lot of people.

The second addition is context menus in the playlist load screen.  This means you can press and hold on a playlist name and see a pop-up menu.  This menu allows you to choose to either load the playlist to where you left off last time you used it, or you can choose to reload the playlist from scratch, without using the saved position information from the last time you used the playlist.  The load option is identical to simply touching the playlist name, which works the same as previously.

One last change was made due to feedback from a program user (thanks Eric!).  The music file names in your playlist files can now use either forward slashes or back slashes between each element in the filename’s path.  In the past, you could only use forward slashes.  This may be helpful if you export M3U playlists out of Windows Media Player, which uses back slashes.

Just Playlists 1.2.0—Bluetooth Headset Controls

Saturday, January 16th, 2010

I’ve upgraded Just Playlists—up to version 1.2.0 now.  I did some behind-the-scenes stuff to make it behave better, but the major thing is the addition of the ability to enable control of the player via your Bluetooth headset’s music control buttons.  The technical parlance for this is that you can now take advantage of Bluetooth’s AVRCP (Audio/Video Remote Control Profile).  If you have a Bluetooth headset that allows you to listen to music, it probably also has buttons for play/pause, next track, and previous track.  If you go into the preferences for Just Playlists, you can choose to enable these controls for use with the program.  The default is disabled.

It’s important to understand a little bit more about how Android handles Bluetooth headset buttons.  If you don’t have any other music player on your phone, the default Android music player program will receive headset button pushes, starting up if you push the play button and so on.  Other music playing programs that you download from the Market that can use Bluetooth headset controls should have a preference setting to enable/disable their ability to receive these button pushes.  Thus, if you enable another program to receive them, the default music program should no longer respond when you push a headset music control button.  If you enable more than one program to use the controls, you may have the wrong program respond to a button push.  Thus, I’d recommend only enabling one program at a time to receive these button pushes—and disable all of them if you want the default music player to respond.

If you enable Just Playlists to respond to button pushes, it won’t start playing when you push a button unless it is already running.  I decided I don’t like a music program starting up on its own if I accidently hit one of the control buttons.  Once you’ve explicitly started Just Playlists, it will respond.

Once again, my only Android hardware is a G1, so if you use the Bluetooth control stuff on another type of phone and it doesn’t work as described, let me know.

i2aCleaner—Perl Script to Remove Unused Music from Android microSD Card

Wednesday, January 6th, 2010

One problem with using the itunes2android Perl script to create playlists and populate your Android microSD card for use with the Just Playlists app is that it’s a bit hard to remove music selectively in the future.  For instance, if you have several playlists that you created using itunes2android and then decide you’d like to remove one of the playlists and the music that it references, you’d have to go through the music directory and delete the directories and music files manually.  Even worse, if you delete music that is still referenced in another playlist, that playlist won’t be able to find it.

I wrote the i2aCleaner script to get around this problem.  If you want to remove the music associated with a playlist, just delete the playlist out of your \Music\Playlists directory on your microSD card and then, while it’s mounted under Windows, run i2aCleaner.  This script looks at all your playlist files and removes any music from under the music directory created by itunes2android that isn’t referenced in any playlist.  In my case and in the example I used when describing itunes2android, this is the D:\Music\ipod directory when your microSD card is mounted.  Again referring to the original example and assuming you put the i2aCleaner script in C:\scripts on your computer, the command line to do this would be

perl c:\scripts\ d ipod

where “d” is the drive letter of your mounted phone or microSD card and “ipod” is the name of the directory where your music is stored under \Music on the microSD card.

The script will get rid of all unused music and directories.  It won’t affect anything else in your D:\Music directory.

Remember that this script will only work right if you use the itunes2android script to manage your playlists.  And if you have music that you moved over to the microSD card in some other way, it shouldn’t be kept under the \Music\ipod directory, since it will get deleted by i2aCleaner if not referenced by the playlist files.

You can download a ZIP archive with the i2aCleaner script here.

Just Playlists 1.1.2—Improvements and Bug Fixes

Wednesday, January 6th, 2010

I’ve finished work on the second iteration of Just Playlists—version 1.1.2.  Here’s a summary of the improvements and fixes:

  • Added a “Preferences” menu item, which opens a standard Android preferences screen.  Look here for new features that can be enabled and disabled.
  • The current track’s position index in the playlist and the total number of tracks in the playlist can be displayed next to the playlist name on the main screen.  The default is not to show this.
  • Choose to have a playlist stop playing when the last song is reached or loop back and start over at the first track in the playlist.  The previous version repeated.  The default in the new version is to stop.
  • Fixed various crashes and inconsistent program behavior when the screen was rotated during loading of playlists while transitioning between screens.
  • When the program starts, the loading progress message box will appear.
  • If the last playlist to be loaded before the program is closed is changed, you’ll be given to opportunity to shuffle it when the program starts and re-loads this playlist.

I’ll continue adding the other features I mentioned in my previous post about the program, as well as a few other things that I think will be useful.  My first priority will be to fix any other bugs I find and to clean up the code as I find better ways to do things under Android.  The next new features will probably be the ability to look at the music tracks in the current playlist and Bluetooth headset control.