changed the "Use Episode Cover" setting to only apply to list items. (#4908)
This commit is contained in:
parent
394122dade
commit
aaeea78b37
|
@ -164,7 +164,7 @@ public class CoverFragment extends Fragment {
|
||||||
new RoundedCorners((int) (16 * getResources().getDisplayMetrics().density)));
|
new RoundedCorners((int) (16 * getResources().getDisplayMetrics().density)));
|
||||||
|
|
||||||
RequestBuilder<Drawable> cover = Glide.with(this)
|
RequestBuilder<Drawable> cover = Glide.with(this)
|
||||||
.load(ImageResourceUtils.getImageLocation(media))
|
.load(ImageResourceUtils.getEpisodeImageLocation(media))
|
||||||
.error(Glide.with(this)
|
.error(Glide.with(this)
|
||||||
.load(ImageResourceUtils.getFallbackImageLocation(media))
|
.load(ImageResourceUtils.getFallbackImageLocation(media))
|
||||||
.apply(options))
|
.apply(options))
|
||||||
|
|
|
@ -206,7 +206,7 @@ public class ExternalPlayerFragment extends Fragment {
|
||||||
.dontAnimate();
|
.dontAnimate();
|
||||||
|
|
||||||
Glide.with(getActivity())
|
Glide.with(getActivity())
|
||||||
.load(ImageResourceUtils.getImageLocation(media))
|
.load(ImageResourceUtils.getEpisodeListImageLocation(media))
|
||||||
.error(Glide.with(getActivity())
|
.error(Glide.with(getActivity())
|
||||||
.load(ImageResourceUtils.getFallbackImageLocation(media))
|
.load(ImageResourceUtils.getFallbackImageLocation(media))
|
||||||
.apply(options))
|
.apply(options))
|
||||||
|
|
|
@ -299,7 +299,7 @@ public class ItemFragment extends Fragment {
|
||||||
.dontAnimate();
|
.dontAnimate();
|
||||||
|
|
||||||
Glide.with(getActivity())
|
Glide.with(getActivity())
|
||||||
.load(ImageResourceUtils.getImageLocation(item))
|
.load(ImageResourceUtils.getEpisodeImageLocation(item))
|
||||||
.error(Glide.with(getActivity())
|
.error(Glide.with(getActivity())
|
||||||
.load(ImageResourceUtils.getFallbackImageLocation(item))
|
.load(ImageResourceUtils.getFallbackImageLocation(item))
|
||||||
.apply(options))
|
.apply(options))
|
||||||
|
|
|
@ -121,7 +121,7 @@ public class EpisodeItemViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
if (coverHolder.getVisibility() == View.VISIBLE) {
|
if (coverHolder.getVisibility() == View.VISIBLE) {
|
||||||
new CoverLoader(activity)
|
new CoverLoader(activity)
|
||||||
.withUri(ImageResourceUtils.getImageLocation(item))
|
.withUri(ImageResourceUtils.getEpisodeListImageLocation(item))
|
||||||
.withFallbackUri(item.getFeed().getImageLocation())
|
.withFallbackUri(item.getFeed().getImageLocation())
|
||||||
.withPlaceholderView(placeholder)
|
.withPlaceholderView(placeholder)
|
||||||
.withCoverView(cover)
|
.withCoverView(cover)
|
||||||
|
|
|
@ -13,7 +13,18 @@ public final class ImageResourceUtils {
|
||||||
private ImageResourceUtils() {
|
private ImageResourceUtils() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getImageLocation(ImageResource resource) {
|
/**
|
||||||
|
* returns the image location, does prefer the episode cover if available.
|
||||||
|
*/
|
||||||
|
public static String getEpisodeImageLocation(ImageResource resource) {
|
||||||
|
return resource.getImageLocation();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns the image location, does prefer the episode cover if available and enabled in settings.
|
||||||
|
*/
|
||||||
|
public static String getEpisodeListImageLocation(ImageResource resource) {
|
||||||
|
|
||||||
if (UserPreferences.getUseEpisodeCoverSetting()) {
|
if (UserPreferences.getUseEpisodeCoverSetting()) {
|
||||||
return resource.getImageLocation();
|
return resource.getImageLocation();
|
||||||
|
|
|
@ -113,7 +113,7 @@ public class NewEpisodesNotification {
|
||||||
try {
|
try {
|
||||||
return Glide.with(context)
|
return Glide.with(context)
|
||||||
.asBitmap()
|
.asBitmap()
|
||||||
.load(ImageResourceUtils.getImageLocation(feed))
|
.load(ImageResourceUtils.getEpisodeListImageLocation(feed))
|
||||||
.apply(RequestOptions.diskCacheStrategyOf(ApGlideSettings.AP_DISK_CACHE_STRATEGY))
|
.apply(RequestOptions.diskCacheStrategyOf(ApGlideSettings.AP_DISK_CACHE_STRATEGY))
|
||||||
.apply(new RequestOptions().centerCrop())
|
.apply(new RequestOptions().centerCrop())
|
||||||
.submit(iconSize, iconSize)
|
.submit(iconSize, iconSize)
|
||||||
|
|
|
@ -1306,7 +1306,7 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
||||||
builder.putString(MediaMetadataCompat.METADATA_KEY_DISPLAY_TITLE, p.getEpisodeTitle());
|
builder.putString(MediaMetadataCompat.METADATA_KEY_DISPLAY_TITLE, p.getEpisodeTitle());
|
||||||
builder.putString(MediaMetadataCompat.METADATA_KEY_DISPLAY_SUBTITLE, p.getFeedTitle());
|
builder.putString(MediaMetadataCompat.METADATA_KEY_DISPLAY_SUBTITLE, p.getFeedTitle());
|
||||||
|
|
||||||
String imageLocation = ImageResourceUtils.getImageLocation(p);
|
String imageLocation = ImageResourceUtils.getEpisodeImageLocation(p);
|
||||||
|
|
||||||
if (!TextUtils.isEmpty(imageLocation)) {
|
if (!TextUtils.isEmpty(imageLocation)) {
|
||||||
if (UserPreferences.setLockscreenBackground()) {
|
if (UserPreferences.setLockscreenBackground()) {
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class PlaybackServiceNotificationBuilder {
|
||||||
try {
|
try {
|
||||||
icon = Glide.with(context)
|
icon = Glide.with(context)
|
||||||
.asBitmap()
|
.asBitmap()
|
||||||
.load(ImageResourceUtils.getImageLocation(playable))
|
.load(ImageResourceUtils.getEpisodeImageLocation(playable))
|
||||||
.apply(RequestOptions.diskCacheStrategyOf(ApGlideSettings.AP_DISK_CACHE_STRATEGY))
|
.apply(RequestOptions.diskCacheStrategyOf(ApGlideSettings.AP_DISK_CACHE_STRATEGY))
|
||||||
.apply(new RequestOptions().centerCrop())
|
.apply(new RequestOptions().centerCrop())
|
||||||
.submit(iconSize, iconSize)
|
.submit(iconSize, iconSize)
|
||||||
|
|
|
@ -90,7 +90,7 @@ public abstract class WidgetUpdater {
|
||||||
try {
|
try {
|
||||||
icon = Glide.with(context)
|
icon = Glide.with(context)
|
||||||
.asBitmap()
|
.asBitmap()
|
||||||
.load(ImageResourceUtils.getImageLocation(widgetState.media))
|
.load(ImageResourceUtils.getEpisodeImageLocation(widgetState.media))
|
||||||
.apply(RequestOptions.diskCacheStrategyOf(ApGlideSettings.AP_DISK_CACHE_STRATEGY))
|
.apply(RequestOptions.diskCacheStrategyOf(ApGlideSettings.AP_DISK_CACHE_STRATEGY))
|
||||||
.submit(iconSize, iconSize)
|
.submit(iconSize, iconSize)
|
||||||
.get(500, TimeUnit.MILLISECONDS);
|
.get(500, TimeUnit.MILLISECONDS);
|
||||||
|
|
|
@ -457,7 +457,7 @@
|
||||||
<string name="pref_episode_cache_title">Episode Cache</string>
|
<string name="pref_episode_cache_title">Episode Cache</string>
|
||||||
<string name="pref_episode_cache_summary">Total number of downloaded episodes cached on the device. Automatic download will be suspended if this number is reached.</string>
|
<string name="pref_episode_cache_summary">Total number of downloaded episodes cached on the device. Automatic download will be suspended if this number is reached.</string>
|
||||||
<string name="pref_episode_cover_title">Use Episode Cover</string>
|
<string name="pref_episode_cover_title">Use Episode Cover</string>
|
||||||
<string name="pref_episode_cover_summary">Use the episode specific cover whenever available. If unchecked, the app will always use the podcast cover image.</string>
|
<string name="pref_episode_cover_summary">Use the episode specific cover in lists whenever available. If unchecked, the app will always use the podcast cover image.</string>
|
||||||
<string name="pref_show_remain_time_title">Show Remaining Time</string>
|
<string name="pref_show_remain_time_title">Show Remaining Time</string>
|
||||||
<string name="pref_show_remain_time_summary">Display remaining time of episodes when checked. If unchecked, display total duration of episodes.</string>
|
<string name="pref_show_remain_time_summary">Display remaining time of episodes when checked. If unchecked, display total duration of episodes.</string>
|
||||||
<string name="pref_theme_title_use_system">Use system theme</string>
|
<string name="pref_theme_title_use_system">Use system theme</string>
|
||||||
|
|
Loading…
Reference in New Issue