Many people rely on online social networks as sources of news and information, and the spread of media content with ideologies across the political spectrum influences online discussions and impacts actions offline. To examine the impact of media in online social networks, we generalize boundedconfidence models of opinion dynamics by incorporating media accounts as influencers in a network. We quantify partisanship of content with a continuous parameter on an interval, and we formulate higher-dimensional generalizations to incorporate content quality and increasingly nuanced political positions. We simulate our model with one and two ideological dimensions, and we use the results of our simulations to quantify the "entrainment" of content from non-media accounts to the ideologies of media accounts in a network. We maximize media impact in a social network by tuning the number of media accounts that promote the content and the number of followers of the accounts. Using numerical computations, we find that the entrainment of the ideology of content spread by non-media accounts to media ideology depends on a network's structural features, including its size, the mean number of followers of its nodes, and the receptiveness of its nodes to different opinions. We then introduce content quality -a key novel contribution of our work -into our model. We incorporate multiple media sources with ideological biases and quality-level estimates that we draw from real media sources and demonstrate that our model can produce distinct communities ("echo chambers") that are polarized in both ideology and quality. Our model provides a step toward understanding content quality and ideology in spreading dynamics, with ramifications for how to mitigate the spread of undesired content and promote the spread of desired content.