aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2012-08-05 09:55:47 -0700
committerScott Jackson <daneren2005@gmail.com>2012-08-05 09:55:47 -0700
commit0e9c559392edad38d4fae4ae4e6499b14d0f430a (patch)
tree91f243b7c89ccaf9e09afa91439680437d62b11e /subsonic-android
parentb0d38681e05a6fea987b7fe30290cc574b235a67 (diff)
downloaddsub-0e9c559392edad38d4fae4ae4e6499b14d0f430a.tar.gz
dsub-0e9c559392edad38d4fae4ae4e6499b14d0f430a.tar.bz2
dsub-0e9c559392edad38d4fae4ae4e6499b14d0f430a.zip
Added artist substring to Album/Song results in offline search
Diffstat (limited to 'subsonic-android')
-rw-r--r--subsonic-android/src/github/daneren2005/subphonic/service/OfflineMusicService.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/subsonic-android/src/github/daneren2005/subphonic/service/OfflineMusicService.java b/subsonic-android/src/github/daneren2005/subphonic/service/OfflineMusicService.java
index 52955ca4..8ee17a27 100644
--- a/subsonic-android/src/github/daneren2005/subphonic/service/OfflineMusicService.java
+++ b/subsonic-android/src/github/daneren2005/subphonic/service/OfflineMusicService.java
@@ -159,7 +159,7 @@ public class OfflineMusicService extends RESTMusicService {
Artist artist = new Artist();
artist.setId(artistFile.getPath());
artist.setIndex(artistFile.getName().substring(0, 1));
- artist.setName(artistFile.getName());
+ artist.setName(artistName);
artists.add(artist);
}
@@ -167,13 +167,18 @@ public class OfflineMusicService extends RESTMusicService {
if(albumFile.isDirectory()) {
String albumName = getName(albumFile);
if(matchCriteria(criteria, albumName)) {
- albums.add(createEntry(context, albumFile, albumName));
+ MusicDirectory.Entry album = createEntry(context, albumFile, albumName);
+ album.setArtist(artistName);
+ albums.add(album);
}
for(File songFile : FileUtil.listMusicFiles(albumFile)) {
String songName = getName(songFile);
if(matchCriteria(criteria, songName)) {
- songs.add(createEntry(context, albumFile, songName));
+ MusicDirectory.Entry song = createEntry(context, albumFile, songName);
+ song.setArtist(artistName);
+ song.setAlbum(albumName);
+ songs.add(song);
}
}
}