Behaviour of function

When calling while the last track is currently played the playback is just stopped (same with core.playback.previous() while playing the first track)
This is somehow unexpected when using a remote to select tracks.
My idea would be to jump to the first track in this case (or the last track in the other case)
May be it is possible to implement this (probably selectable behaviour stop or rollover or do nothing'rollover') ) ?