fixed: We can't grab the duration from the streamdetails for stacks

Currently we store the duration of the first item in a stack as total stack time in the db. This is obviously wrong. This PR is an attempt to (partially) fix that. Any suggestions are welcome, especially for the thumbloader part.