[Android] VideoListFragment: fill the adapter even if the thumnailer is missing
Ludovic Fauvet
git at videolan.org
Mon Oct 1 19:23:19 CEST 2012
vlc-ports/android | branch: master | Ludovic Fauvet <etix at videolan.org> | Mon Oct 1 19:19:19 2012 +0200| [96d1fdddf09122f5a3147d19cbe98050e9176ff6] | committer: Ludovic Fauvet
VideoListFragment: fill the adapter even if the thumnailer is missing
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=96d1fdddf09122f5a3147d19cbe98050e9176ff6
---
.../src/org/videolan/vlc/gui/video/VideoListFragment.java | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoListFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoListFragment.java
index d4ee6a8..804b1e6 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoListFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoListFragment.java
@@ -252,21 +252,20 @@ public class VideoListFragment extends SherlockListFragment implements ISortable
}
private void updateList() {
-
- if (mThumbnailerManager == null) {
- Log.w(TAG, "Can't update the list, thumbnailer missing");
- return;
- }
List<Media> itemList = mMediaLibrary.getVideoItems();
- mThumbnailerManager.clearJobs();
+ if (mThumbnailerManager != null)
+ mThumbnailerManager.clearJobs();
+ else
+ Log.w(TAG, "Can't generate thumbnails, the thumbnailer is missing");
+
mVideoAdapter.clear();
if (itemList.size() > 0) {
for (Media item : itemList) {
if (item.getType() == Media.TYPE_VIDEO) {
mVideoAdapter.add(item);
- if (item.getPicture() == null && !item.isPictureParsed())
+ if (mThumbnailerManager != null && item.getPicture() == null && !item.isPictureParsed())
mThumbnailerManager.addJob(item);
}
}
More information about the Android
mailing list