Song indexes are wrong (music-list-songs) (music-play songindexes:)

Oct 20, 2010 at 3:06 PM

If I issue the command:

music-list-songs

I get a list of my 6000+ songs.

When I then issue a command:

music-play songindexes: N

it only works for values of N<24

for N > 23   it plays some other song with a completely different index from N

For example, if I try to play the songs with index 2000, I get the song with index 2268

Madness!

(In this case I'm running the win7x64 version available on the downloads page - I haven't tested on another setup)

Coordinator
Oct 20, 2010 at 6:37 PM

I'm pretty busy and don't have time to look at the codenow, but if I remember correctly the index number is into the returned results - I can't think of any reason why indexes >= 24 should be different.

One thing that is possible is that your collection changes underneath you. This is actually an issue for all the cached information as the cache is only re-generated when the number of songs changes (so if you add a dozen songs at the same time you delete a dozen songs the indexes could be off) Usually this results in being 1 or 2 off - not 268!

The only suggestion I would have would be to try forcing the caches to regenerate then start over. Use the "music-clear-cache" command to do this.

In my application I pretty much skip using stored indexes and do everything I store by name(s) as that is somewhat change resistant.

Note that I haven't had time to work on this project recently (Toddler + newborn = lots of fun, but no time), so I haven't been in the code for awhile. In other words YMMV.

Let us know, good luck, Tony

Oct 20, 2010 at 6:53 PM

Thanks for your prompt response Tony.  (Very prompt given the situation with the youngsters)...  I'm not 100% sure what you mean by "index number is into the returned results".

I have tried using music-clear-cache followed immediately by those two commands and I get the exact same results, so I don't think anything is "changing under me".

I would actually prefer to request songs by name but as far as I can tell that is not an option, which is why I am trying to use the indexes.  If you know of a way to access songs by names, I would be very grateful to hear about it.

James

VoxCommando.com

Coordinator
Oct 20, 2010 at 7:09 PM
I do it by either indexing into the album (artist name / album name / index) or indexing into the artist (artist name / index) depending on where I am.

Basically the way the index works is it performs the "search" you've requested (matches all the attributes you've specified) and indexes into them (so index:10,12 would play the 10th and 12th matching track)

On Wed, Oct 20, 2010 at 11:53 AM, jitterjames <notifications@codeplex.com> wrote:

From: jitterjames

Thanks for your prompt response Tony.  (Very prompt given the situation with the youngsters)...  I'm not 100% sure what you mean by "index number is into the returned results".

I have tried using music-clear-cache followed immediately by those two commands and I get the exact same results, so I don't think anything is "changing under me".

I would actually prefer to request songs by name but as far as I can tell that is not an option, which is why I am trying to use the indexes.  If you know of a way to access songs by names, I would be very grateful to hear about it.

James

VoxCommando.com

Read the full discussion online.

To add a post to this discussion, reply to this email (VmcController@discussions.codeplex.com)

To start a new discussion for this project, email VmcController@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Oct 20, 2010 at 8:55 PM

yes, that seems to work (though I don't know what would happen if I used an artist that had say 100 songs) but it doesn't help my situation.  If all I know is the name of the song I want to hear, I need to be able to either access it by name or by a master index.

I tried on another machine, this one 32 bit, with the same problem.  The index offset (error) seems to be unpredictable.

Oh well.  Thanks for trying.  I will try to think of some work-around.  Go feed the kids!  Or change their diapers or whatever it is you need to do... :P