Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
531
Issue boards
Milestones
Wiki
Code
Merge requests
12
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
8f45335b
Commit
8f45335b
authored
5 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
TV Channels: Wait for thumbnail
parent
52645b5c
No related branches found
No related tags found
No related merge requests found
Pipeline
#6988
failed with stage
in 3 minutes and 58 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vlc-android/src/org/videolan/vlc/util/ThumbnailsProvider.java
+1
-1
1 addition, 1 deletion
...android/src/org/videolan/vlc/util/ThumbnailsProvider.java
vlc-android/src/org/videolan/vlc/util/TvChannels.kt
+6
-2
6 additions, 2 deletions
vlc-android/src/org/videolan/vlc/util/TvChannels.kt
with
7 additions
and
3 deletions
vlc-android/src/org/videolan/vlc/util/ThumbnailsProvider.java
+
1
−
1
View file @
8f45335b
...
...
@@ -63,7 +63,7 @@ public class ThumbnailsProvider {
}
@WorkerThread
private
static
Bitmap
getVideoThumbnail
(
final
MediaWrapper
media
,
int
width
)
{
static
Bitmap
getVideoThumbnail
(
final
MediaWrapper
media
,
int
width
)
{
final
String
filePath
=
media
.
getUri
().
getPath
();
if
(
appDir
==
null
)
appDir
=
VLCApplication
.
getAppContext
().
getExternalFilesDir
(
null
);
final
boolean
hasCache
=
appDir
!=
null
&&
appDir
.
exists
();
...
...
This diff is collapsed.
Click to expand it.
vlc-android/src/org/videolan/vlc/util/TvChannels.kt
+
6
−
2
View file @
8f45335b
...
...
@@ -91,9 +91,10 @@ fun Context.launchChannelUpdate() = AppScope.launch {
updatePrograms
(
this
@launchChannelUpdate
,
id
)
}
fun
setResumeProgram
(
context
:
Context
,
mw
:
MediaWrapper
)
{
suspend
fun
setResumeProgram
(
context
:
Context
,
mw
:
MediaWrapper
)
{
var
cursor
:
Cursor
?
=
null
var
isProgramPresent
=
false
val
mw
=
context
.
getFromMl
{
findMedia
(
mw
)
}
try
{
cursor
=
context
.
contentResolver
.
query
(
TvContractCompat
.
WatchNextPrograms
.
CONTENT_URI
,
WATCH_NEXT_MAP_PROJECTION
,
null
,
...
...
@@ -132,7 +133,10 @@ fun setResumeProgram(context: Context, mw: MediaWrapper) {
}
private
fun
MediaWrapper
.
artUri
()
:
Uri
{
private
suspend
fun
MediaWrapper
.
artUri
()
:
Uri
{
if
(!
isThumbnailGenerated
)
{
withContext
(
Dispatchers
.
IO
)
{
ThumbnailsProvider
.
getVideoThumbnail
(
this
@artUri
,
512
)
}
}
val
mrl
=
artworkMrl
?:
return
Uri
.
parse
(
"android.resource://${BuildConfig.APPLICATION_ID}/${R.drawable.ic_browser_video_big_normal}"
)
return
try
{
getFileUri
(
mrl
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment