[Android] Fix TV "Play next" channel item thumb and link
Nicolas Pomepuy
git at videolan.org
Wed Mar 4 11:04:01 CET 2020
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Mar 4 08:02:34 2020 +0100| [ccfaa5db0f96354b4db3e906bf011c9d63879f7d] | committer: Nicolas Pomepuy
Fix TV "Play next" channel item thumb and link
Fixes #1216
> https://code.videolan.org/videolan/vlc-android/commit/ccfaa5db0f96354b4db3e906bf011c9d63879f7d
---
application/vlc-android/src/org/videolan/vlc/FileProvider.kt | 2 +-
application/vlc-android/src/org/videolan/vlc/util/TvChannels.kt | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/FileProvider.kt b/application/vlc-android/src/org/videolan/vlc/FileProvider.kt
index 5a98005d5..ecbd10507 100644
--- a/application/vlc-android/src/org/videolan/vlc/FileProvider.kt
+++ b/application/vlc-android/src/org/videolan/vlc/FileProvider.kt
@@ -10,7 +10,7 @@ import java.io.File
import java.io.FileNotFoundException
private const val TAG = "VLC/FileProvider"
-private const val THUMB_PROVIDER_AUTHORITY = "${BuildConfig.APPLICATION_ID}.thumbprovider"
+private const val THUMB_PROVIDER_AUTHORITY = "${BuildConfig.APP_ID}.thumbprovider"
class FileProvider : ContentProvider() {
override fun insert(uri: Uri, values: ContentValues?) = Uri.EMPTY!!
diff --git a/application/vlc-android/src/org/videolan/vlc/util/TvChannels.kt b/application/vlc-android/src/org/videolan/vlc/util/TvChannels.kt
index ac40ee068..8e1a925f6 100644
--- a/application/vlc-android/src/org/videolan/vlc/util/TvChannels.kt
+++ b/application/vlc-android/src/org/videolan/vlc/util/TvChannels.kt
@@ -77,7 +77,7 @@ private suspend fun updatePrograms(context: Context, channelId: Long) {
}
val desc = ProgramDesc(channelId, mw.id, mw.title, mw.description,
mw.artUri(), mw.length.toInt(), mw.time.toInt(),
- mw.width, mw.height, BuildConfig.APPLICATION_ID)
+ mw.width, mw.height, BuildConfig.APP_ID)
val program = buildProgram(cn, desc)
GlobalScope.launch(Dispatchers.IO) {
context.contentResolver.insert(TvContractCompat.PreviewPrograms.CONTENT_URI, program.toContentValues())
@@ -124,7 +124,7 @@ suspend fun setResumeProgram(context: Context, mw: MediaWrapper) {
if (!isProgramPresent && mw.time != 0L) {
val desc = ProgramDesc(0L, mw.id, mw.title, mw.description,
mw.artUri(), mw.length.toInt(), mw.time.toInt(),
- mw.width, mw.height, BuildConfig.APPLICATION_ID)
+ mw.width, mw.height, BuildConfig.APP_ID)
val cn = ComponentName(context, PreviewVideoInputService::class.java)
val program = buildWatchNextProgram(cn, desc)
val watchNextProgramUri = context.contentResolver.insert(TvContractCompat.WatchNextPrograms.CONTENT_URI, program.toContentValues())
@@ -140,10 +140,11 @@ private suspend fun MediaWrapper.artUri() : Uri {
if (!isThumbnailGenerated) {
withContext(Dispatchers.IO) { ThumbnailsProvider.getVideoThumbnail(this at artUri, 512) }
}
- val mrl = artworkMrl ?: return Uri.parse("android.resource://${BuildConfig.APPLICATION_ID}/${R.drawable.ic_browser_video_big_normal}")
+ val mrl = artworkMrl
+ ?: return Uri.parse("android.resource://${BuildConfig.APP_ID}/${R.drawable.ic_browser_video_big_normal}")
return try {
getFileUri(mrl)
} catch (ex: IllegalArgumentException) {
- Uri.parse("android.resource://${BuildConfig.APPLICATION_ID}/${R.drawable.ic_browser_video_big_normal}")
+ Uri.parse("android.resource://${BuildConfig.APP_ID}/${R.drawable.ic_browser_video_big_normal}")
}
}
\ No newline at end of file
More information about the Android
mailing list