diff --git a/src/com/thejoshwa/ultrasonic/androidapp/activity/SelectAlbumActivity.java b/src/com/thejoshwa/ultrasonic/androidapp/activity/SelectAlbumActivity.java index 8591de5d..2d5a53d4 100644 --- a/src/com/thejoshwa/ultrasonic/androidapp/activity/SelectAlbumActivity.java +++ b/src/com/thejoshwa/ultrasonic/androidapp/activity/SelectAlbumActivity.java @@ -1073,8 +1073,6 @@ public class SelectAlbumActivity extends SubsonicTabActivity Collections.sort(entries, new EntryByDiscAndTrackComparator()); } - String directoryName = musicDirectory.getName(); - boolean allVideos = true; int songCount = 0; @@ -1097,7 +1095,9 @@ public class SelectAlbumActivity extends SubsonicTabActivity { if (showHeader) { - View header = createHeader(entries, directoryName, songCount); + String intentAlbumName = getIntent().getStringExtra(Constants.INTENT_EXTRA_NAME_NAME); + String directoryName = musicDirectory.getName(); + View header = createHeader(entries, intentAlbumName != null ? intentAlbumName : directoryName, songCount); if (header != null) { @@ -1199,7 +1199,6 @@ public class SelectAlbumActivity extends SubsonicTabActivity AlbumHeader albumHeader = AlbumHeader.processEntries(SelectAlbumActivity.this, entries); TextView titleView = (TextView) header.findViewById(R.id.select_album_title); - name = albumHeader.getAlbumNames().size() == 1 ? albumHeader.getAlbumNames().iterator().next() : name; titleView.setText(name != null ? name : getActionBarSubtitle()); // Don't show a header if all entries are videos diff --git a/src/com/thejoshwa/ultrasonic/androidapp/util/AlbumHeader.java b/src/com/thejoshwa/ultrasonic/androidapp/util/AlbumHeader.java index d1570c33..757c973e 100644 --- a/src/com/thejoshwa/ultrasonic/androidapp/util/AlbumHeader.java +++ b/src/com/thejoshwa/ultrasonic/androidapp/util/AlbumHeader.java @@ -14,7 +14,6 @@ public class AlbumHeader private Set artists; private Set grandParents; private Set genres; - private Set albumNames; private Set years; public boolean getIsAllVideo() @@ -42,11 +41,6 @@ public class AlbumHeader return this.genres; } - public Set getAlbumNames() - { - return this.albumNames; - } - public Set getYears() { return this.years; @@ -57,7 +51,6 @@ public class AlbumHeader this.artists = new HashSet(); this.grandParents = new HashSet(); this.genres = new HashSet(); - this.albumNames = new HashSet(); this.years = new HashSet(); this.isAllVideo = true; @@ -99,11 +92,6 @@ public class AlbumHeader albumHeader.genres.add(entry.getGenre()); } - if (entry.getAlbum() != null) - { - albumHeader.albumNames.add(entry.getAlbum()); - } - if (entry.getYear() != null) { albumHeader.years.add(entry.getYear());