converting media ids and from long to string