Quoting dSw <[EMAIL PROTECTED]>:

> I guess the exclusion could be either by track length or my path to the
> file. Would this be reasonably straightforward to implement?

That all depends on how easily you can reliably differentiate what you want and
what you don't want.  As I intended to keep this as only a very simple plugin,
I dont plan on implementing constraints (as I'd soon be inundatated with
requests to support contraints of every possible type).  I envision this as
something that is eventually a server function (maybe a command that plays
randome from a supplied list).  This way it could be a playlist choice from
search results or any browse list.  As this is a lower priority, I made the
plugin for now.

> Even if you could point me to a bit in the code I could try and make
> the modification myself.

If you want this to work based on a track selection, then look at lines 76-80
and 167-71. All the plugin does is pick random numbers (from the total count of
the chosen type: track, artist or album) and then does a simple check for basic
restrictions.  You may be able to edit those restrictions to your liking at the
following locations:

Line 80:
        } until ($item && !$dir);

Line 171:
} until ($item && !Slim::Music::Info::isDir($item));


Since the items are objects, you might have some luck with $item->duration()
and/or $item->path.

-kdf
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to