most of the above - almost all of it - has been abstracted into the wrong abstraction - remove it

A media resource should represent exactly that. Only properties that explicitly belong to it should be attached to it.

The rest of this should be on a more general scope... close to where it is used