From 0e9c559392edad38d4fae4ae4e6499b14d0f430a Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Sun, 5 Aug 2012 09:55:47 -0700 Subject: Added artist substring to Album/Song results in offline search --- .../daneren2005/subphonic/service/OfflineMusicService.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'subsonic-android') 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); } } } -- cgit v1.2.3