extracted media filename parser as an angular service