Add sorting to media lib