mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
WIP Added possibility to switch default image when absent the original one
This commit is contained in:
parent
a21a0132bd
commit
2b5a686fe4
23 changed files with 125 additions and 124 deletions
|
|
@ -3,6 +3,8 @@ package com.cappielloantonio.play.util;
|
|||
import android.util.Log;
|
||||
|
||||
import com.cappielloantonio.play.App;
|
||||
import com.cappielloantonio.play.R;
|
||||
import com.cappielloantonio.play.glide.CustomGlideRequest;
|
||||
import com.cappielloantonio.play.model.DirectPlayCodec;
|
||||
import com.cappielloantonio.play.model.Song;
|
||||
|
||||
|
|
@ -66,4 +68,22 @@ public class MusicUtil {
|
|||
return String.format(Locale.getDefault(), "%d:%02d:%02d", hours, minutes, seconds);
|
||||
}
|
||||
}
|
||||
|
||||
public static int getDefaultPicPerCategory(String category) {
|
||||
if(category.equals(CustomGlideRequest.SONG_PIC)) {
|
||||
return R.drawable.default_album_art;
|
||||
}
|
||||
else if(category.equals(CustomGlideRequest.ALBUM_PIC)) {
|
||||
return R.drawable.default_album_art;
|
||||
}
|
||||
else if(category.equals(CustomGlideRequest.ARTIST_PIC)) {
|
||||
return R.drawable.default_album_art;
|
||||
}
|
||||
else if(category.equals(CustomGlideRequest.PLAYLIST_PIC)) {
|
||||
return R.drawable.default_album_art;
|
||||
}
|
||||
else {
|
||||
return R.drawable.default_album_art;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue