|
@@ -215,10 +215,11 @@ public class NowPlayingPlugin extends Plugin implements ActionListener {
|
215
|
215
|
*/
|
216
|
216
|
public MediaSource getBestSource() {
|
217
|
217
|
MediaSource paused = null;
|
|
218
|
+ final List<MediaSource> possibleSources = getSources();
|
218
|
219
|
|
219
|
|
- Collections.sort(sources, new MediaSourceComparator(order));
|
|
220
|
+ Collections.sort(possibleSources, new MediaSourceComparator(order));
|
220
|
221
|
|
221
|
|
- for (final MediaSource source : getSources()) {
|
|
222
|
+ for (final MediaSource source : possibleSources) {
|
222
|
223
|
if (source.getState() != MediaSourceState.CLOSED) {
|
223
|
224
|
if (source.getState() == MediaSourceState.PLAYING) {
|
224
|
225
|
return source;
|