Really, for "random" things like this, what you really want is a shuffle.
Ie take your whole list, shuffle it randomly, then start playing top to bottom. When you've played everything, reshuffle. I supposed it'd still be possible to play the same piece back to back, but just once per rotation.
That's the way I'm doing the slideshow anyway.