mirror of
https://github.com/cmclark00/RetroMusicPlayer.git
synced 2025-05-20 00:55:20 +01:00
v2.10
This commit is contained in:
parent
3d7ba2afc6
commit
08e00b89c5
341 changed files with 7612 additions and 6811 deletions
|
@ -31,13 +31,13 @@ public class BlacklistStore extends SQLiteOpenHelper {
|
|||
public static synchronized BlacklistStore getInstance(@NonNull final Context context) {
|
||||
if (sInstance == null) {
|
||||
sInstance = new BlacklistStore(context.getApplicationContext());
|
||||
if (!PreferenceUtil.getInstance(context).initializedBlacklist()) {
|
||||
if (!PreferenceUtil.getInstance().initializedBlacklist()) {
|
||||
// blacklisted by default
|
||||
sInstance.addPathImpl(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_ALARMS));
|
||||
sInstance.addPathImpl(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_NOTIFICATIONS));
|
||||
sInstance.addPathImpl(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_RINGTONES));
|
||||
|
||||
PreferenceUtil.getInstance(context).setInitializedBlacklist();
|
||||
PreferenceUtil.getInstance().setInitializedBlacklist();
|
||||
}
|
||||
}
|
||||
return sInstance;
|
||||
|
|
|
@ -41,7 +41,7 @@ public class MusicPlaybackQueueStore extends SQLiteOpenHelper {
|
|||
public static final String DATABASE_NAME = "music_playback_state.db";
|
||||
public static final String PLAYING_QUEUE_TABLE_NAME = "playing_queue";
|
||||
public static final String ORIGINAL_PLAYING_QUEUE_TABLE_NAME = "original_playing_queue";
|
||||
private static final int VERSION = 3;
|
||||
private static final int VERSION = 4;
|
||||
@Nullable
|
||||
private static MusicPlaybackQueueStore sInstance = null;
|
||||
|
||||
|
@ -110,6 +110,9 @@ public class MusicPlaybackQueueStore extends SQLiteOpenHelper {
|
|||
builder.append(" INT NOT NULL,");
|
||||
|
||||
builder.append(AudioColumns.ARTIST);
|
||||
builder.append(" STRING NOT NULL,");
|
||||
|
||||
builder.append(AudioColumns.COMPOSER);
|
||||
builder.append(" STRING NOT NULL);");
|
||||
|
||||
db.execSQL(builder.toString());
|
||||
|
@ -173,6 +176,7 @@ public class MusicPlaybackQueueStore extends SQLiteOpenHelper {
|
|||
values.put(AudioColumns.ALBUM, song.albumName);
|
||||
values.put(AudioColumns.ARTIST_ID, song.artistId);
|
||||
values.put(AudioColumns.ARTIST, song.artistName);
|
||||
values.put(AudioColumns.COMPOSER, song.composer);
|
||||
|
||||
database.insert(tableName, null, values);
|
||||
}
|
||||
|
|
|
@ -52,8 +52,8 @@ public class RepositoryImpl implements Repository {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Observable<ArrayList<AbsSmartPlaylist>> getSuggestionSongs() {
|
||||
return HomeLoader.getRecentAndTopThings(context);
|
||||
public Observable<ArrayList<Song>> getSuggestionSongs() {
|
||||
return SongLoader.suggestSongs(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -18,7 +18,7 @@ public interface Repository {
|
|||
|
||||
Observable<ArrayList<Song>> getAllSongs();
|
||||
|
||||
Observable<ArrayList<AbsSmartPlaylist>> getSuggestionSongs();
|
||||
Observable<ArrayList<Song>> getSuggestionSongs();
|
||||
|
||||
Observable<Song> getSong(int id);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue