Browse Source

NowPlaying reorderable sources work again

Fixes issue 2569

Change-Id: I891bbbd1d2d66d889f6728e08ef7921131096b45
Reviewed-on: http://gerrit.dmdirc.com/576
Automatic-Compile: Gregory Holmes <greboid@dmdirc.com>
Reviewed-by: Gregory Holmes <greboid@dmdirc.com>
tags/0.6.3
Chris Smith 14 years ago
parent
commit
e02d239b3f
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      src/com/dmdirc/addons/nowplaying/NowPlayingPlugin.java

+ 3
- 2
src/com/dmdirc/addons/nowplaying/NowPlayingPlugin.java View File

215
      */
215
      */
216
     public MediaSource getBestSource() {
216
     public MediaSource getBestSource() {
217
         MediaSource paused = null;
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
             if (source.getState() != MediaSourceState.CLOSED) {
223
             if (source.getState() != MediaSourceState.CLOSED) {
223
                 if (source.getState() == MediaSourceState.PLAYING) {
224
                 if (source.getState() == MediaSourceState.PLAYING) {
224
                     return source;
225
                     return source;

Loading…
Cancel
Save