Fri Aug 22, 2014 1:51 am by jhb50
I'm a little confused by your statement "I re-ran my groovy in eclipse and everytime it generates different token" implying that the expires immediately code ran there too.
AFAIK, the expires immediately logic is only within serviio and so when you test your groovy outside of serviio, only the 2 methods (WebResourceContainer extractItems and ContentURLContainer extractUrl) run, and with each test you will see a different token.
When you load your groovy in Serviio, the 2 methods will run, and when you play an item declared as expires immediately the second method will run again, and reextract the url to give you the token per your groovy code.
I just had the same problem and it turned out my groovy code was failing within Serviio without any notification causing the rextract to fail and the original cached url and token to be used. The way to fix that is to add log statements to your groovy at each step in order to identify and fix the point it fails. My groovy now works correctly, and I can also report that "expires immediately" works correctly for both live=true and live=false feed items, and so I have cancelled by bug report referenced earlier.