Advice needed about a young blackbird

I rescued a fully-fledged blackbird from my evil cat, kept it overnight, and was surprised it was bouncing around the downstairs bathroom the next morning (most don't make it through the night). I took it to the vet, who kept it in overnight and pronounced it ready for release. I put it in a hanging basket suspended from the washing line and Mama (I'm presuming) landed nearby. I didn't see either leave but later found the youngster hopping around the garden where the cat got it again. So, I rescued it again. It's a feisty little thing and gave me a good bite. I've shut it in my shed, which has plenty of light, and left it mealworms, bird seed, and water. When I go in, it's in no hurry to hide.

My questions: What should I be feeding it? Since it can't fly, how long should I keep it? 

Thanks!