# HG changeset patch # User nathan # Date 1230900418 -3600 # Node ID 306cc35c7faa741840be2b758d2e0bc5a12341aa # Parent 708c6d199dbf230d421374cd6d659decef36cdd7 add commandline option for user defined default background image diff -r 708c6d199dbf -r 306cc35c7faa HISTORY --- a/HISTORY Sun Jul 06 10:43:56 2008 +0800 +++ b/HISTORY Fri Jan 02 13:46:58 2009 +0100 @@ -4,11 +4,13 @@ ..2007: Version 0.10.2 (vdr 1.4.7 / 1.5.11) - Fixed a segfault while direct song selection. Thanks to Halim Sahin for reporting. +- Fixed possible division by zero in libsndfile decoder. - Fixed some gcc 4.x warnings. -- Removed line number references from *.po files. +- Added commandline option for a user defined default background image. - Backward compatible on-the-fly creation of the i18n.c file using Udo Richter's po2i18n package. - Added italian translations. +- Updated french and russian translations. 27.08.2007: Version 0.10.1 (vdr 1.4.7 / 1.5.9) - Fixed segfault in MP3 infocache purge on plugin exit. diff -r 708c6d199dbf -r 306cc35c7faa README --- a/README Sun Jul 06 10:43:56 2008 +0800 +++ b/README Fri Jan 02 13:46:58 2009 +0100 @@ -203,6 +203,7 @@ -C DIR, --cache=DIR store ID3 cache file in DIR -D DIR, --dsp=DIR device for OSS output -i CMD, --iconv=CMD use CMD to convert background images +-I IMG, --defimage=IMG use IMG as default background image -c DIR, --icache=DIR cache converted images in DIR -S SUB, --sources=SUB search sources config in SUB subdirectory diff -r 708c6d199dbf -r 306cc35c7faa data-mp3.c --- a/data-mp3.c Sun Jul 06 10:43:56 2008 +0800 +++ b/data-mp3.c Fri Jan 02 13:46:58 2009 +0100 @@ -38,6 +38,7 @@ const char *imagecache = "/var/cache/images/mp3"; const char *imageconv = "image_convert.sh"; +const char *def_usr_img = 0; // image suffixes to search const char *img_suff[] = { "jpg","png","gif",0 }; @@ -262,6 +263,9 @@ // default image in source basedir if((image=CheckImage("background"))) return true; + // default user supplied image + if(def_usr_img && (image=strdup(def_usr_img))) return true; + di(printf("image: no image for %s\n",obj->Path())) return false; } diff -r 708c6d199dbf -r 306cc35c7faa data-mp3.h --- a/data-mp3.h Sun Jul 06 10:43:56 2008 +0800 +++ b/data-mp3.h Fri Jan 02 13:46:58 2009 +0100 @@ -32,7 +32,7 @@ class cSongInfo; class cImageConvert; -extern const char *imagecache, *imageconv; +extern const char *imagecache, *imageconv, *def_usr_img; extern const char *img_suff[], *excl_pl[], *excl_br[]; // ---------------------------------------------------------------- diff -r 708c6d199dbf -r 306cc35c7faa mp3.c --- a/mp3.c Sun Jul 06 10:43:56 2008 +0800 +++ b/mp3.c Fri Jan 02 13:46:58 2009 +0100 @@ -1603,6 +1603,8 @@ " (default: %s)\n" " -i CMD, --iconv=CMD use CMD to convert background images\n" " (default: %s)\n" + " -I IMG, --defimage=IMG use IMG as default background image\n" + " (default: none)\n" " -c DIR, --icache=DIR cache converted images in DIR\n" " (default: %s)\n" " -S SUB, --sources=SUB search sources config in SUB subdirectory\n" @@ -1638,6 +1640,7 @@ { "cache", required_argument, NULL, 'C' }, { "icache", required_argument, NULL, 'c' }, { "iconv", required_argument, NULL, 'i' }, + { "defimage", required_argument, NULL, 'I' }, { "sources", required_argument, NULL, 'S' }, { NULL } }; @@ -1650,6 +1653,7 @@ case 'm': mountscript=optarg; break; case 'n': netscript=optarg; break; case 'C': cachedir=optarg; break; + case 'I': def_usr_img=optarg; break; case 'S': sourcesSub=optarg; break; case 'B': #ifdef HAVE_SNDFILE