Good idea. An identifier to tell you whether the current file was played as a result of being next in queue would be good too.

$squeued

$false if the file was played using /splay, $true if it was played when the previous song ended.