From b013f4ce83f2787c3d855716a1e81746c227df6f Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 19 Jan 2008 11:21:32 +0100 Subject: [PATCH] Fixed the Play function in the pictures plugin --- HISTORY | 4 ++++ PLUGINS/src/pictures/HISTORY | 5 +++++ PLUGINS/src/pictures/entry.c | 7 ++++++- PLUGINS/src/pictures/pictures.c | 4 ++-- PLUGINS/src/pictures/player.c | 3 ++- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/HISTORY b/HISTORY index 3c953253..b841ff8c 100644 --- a/HISTORY +++ b/HISTORY @@ -5563,3 +5563,7 @@ Video Disk Recorder Revision History - Added a section about "Logging" to PLUGINS.html (suggested by Torsten Kunkel). - Enhanced the SVDRP command CLRE to allow clearing the EPG data of a particular channel (thanks to Benjamin Hess). + +2008-01-19: Version 1.5.14 + +- Fixed the Play function in the pictures plugin. diff --git a/PLUGINS/src/pictures/HISTORY b/PLUGINS/src/pictures/HISTORY index c04a6280..cc9f5e37 100644 --- a/PLUGINS/src/pictures/HISTORY +++ b/PLUGINS/src/pictures/HISTORY @@ -4,3 +4,8 @@ VDR Plugin 'pictures' Revision History 2008-01-13: Version 0.0.1 - Initial revision. + +2008-01-19: Version 0.0.2 + +- Fixed the Play function (when used from a directory in the pictures menu + it always started with the next directory). diff --git a/PLUGINS/src/pictures/entry.c b/PLUGINS/src/pictures/entry.c index 85156558..e03858c9 100644 --- a/PLUGINS/src/pictures/entry.c +++ b/PLUGINS/src/pictures/entry.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: entry.c 1.1 2008/01/13 11:29:27 kls Exp $ + * $Id: entry.c 1.2 2008/01/18 15:49:51 kls Exp $ */ #include "entry.h" @@ -138,6 +138,11 @@ const cPictureEntry *cPictureEntry::NextPicture(const cPictureEntry *This) const return pe; } } + else if (IsDirectory()) { + const cPictureEntry *p = FirstPicture(); + if (p) + return p; + } if (parent) return parent->NextPicture(this); return NULL; diff --git a/PLUGINS/src/pictures/pictures.c b/PLUGINS/src/pictures/pictures.c index 8b517476..e3015e40 100644 --- a/PLUGINS/src/pictures/pictures.c +++ b/PLUGINS/src/pictures/pictures.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: pictures.c 1.1 2008/01/13 11:29:27 kls Exp $ + * $Id: pictures.c 1.2 2008/01/19 11:20:03 kls Exp $ */ #include @@ -11,7 +11,7 @@ #include "menu.h" #include "player.h" -static const char *VERSION = "0.0.1"; +static const char *VERSION = "0.0.2"; static const char *DESCRIPTION = trNOOP("A simple picture viewer"); static const char *MAINMENUENTRY = trNOOP("Pictures"); diff --git a/PLUGINS/src/pictures/player.c b/PLUGINS/src/pictures/player.c index 9e07fc53..b942be52 100644 --- a/PLUGINS/src/pictures/player.c +++ b/PLUGINS/src/pictures/player.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: player.c 1.1 2008/01/13 11:29:27 kls Exp $ + * $Id: player.c 1.2 2008/01/19 11:01:58 kls Exp $ */ #include "player.h" @@ -95,6 +95,7 @@ cPictureControl::cPictureControl(cPictureEntry *Pictures, const cPictureEntry *P pictureEntry = PictureEntry; osd = NULL; lastPath = "/"; + slideShowDelay.Set(SlideShowDelay * 1000); slideShow = SlideShow; alwaysDisplayCaption = false; NextPicture(slideShow && pictureEntry->IsDirectory() ? 1 : 0);