Both Content and Media are IPublishedContent, so you could return the List
to your View, loop through the list and check if the item is Content, render it on one way, or if Media render it another
A good post here, its for Umbraco8 but the general principles are the same
https://skrift.io/issues/examine-in-umbraco-8/