From: <ny...@us...> - 2006-12-29 15:59:14
|
Revision: 229 http://svn.sourceforge.net/pmplib/?rev=229&view=rev Author: nyaochi Date: 2006-12-29 07:59:14 -0800 (Fri, 29 Dec 2006) Log Message: ----------- Bump the version number to 0.13 alpha 1 Modified Paths: -------------- trunk/pmplib/frontend/easypmp/cui/main.c trunk/pmplib/frontend/easypmp/win32gui/easypmp_win32gui.rc Modified: trunk/pmplib/frontend/easypmp/cui/main.c =================================================================== --- trunk/pmplib/frontend/easypmp/cui/main.c 2006-12-29 07:04:13 UTC (rev 228) +++ trunk/pmplib/frontend/easypmp/cui/main.c 2006-12-29 15:59:14 UTC (rev 229) @@ -57,7 +57,7 @@ */ #define APPLICATION_S "EasyPMP [CUI]" -#define VERSION_S "0.12 alpha" +#define VERSION_S "0.13 alpha 1" #define COPYRIGHT_S "Copyright (c) 2005-2006 Nyaochi" int database_dump(pmp_t* pmp, FILE *fpo, int level); Modified: trunk/pmplib/frontend/easypmp/win32gui/easypmp_win32gui.rc =================================================================== --- trunk/pmplib/frontend/easypmp/win32gui/easypmp_win32gui.rc 2006-12-29 07:04:13 UTC (rev 228) +++ trunk/pmplib/frontend/easypmp/win32gui/easypmp_win32gui.rc 2006-12-29 15:59:14 UTC (rev 229) @@ -92,47 +92,30 @@ DEFPUSHBUTTON "OK",IDOK,144,222,48,12 PUSHBUTTON "Cancel",IDCANCEL,204,222,48,12 GROUPBOX "Media database",IDC_STATIC,12,12,240,48 - CONTROL "&None",IDC_RADIO_DATABASE,"Button",BS_AUTORADIOBUTTON | - WS_GROUP,24,24,72,8 - CONTROL "&Update",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,96,24, - 72,8 - CONTROL "&Rebuild",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,168,24, - 72,8 - LTEXT "Source of media information (&z):",IDC_STATIC,24,42,108, - 12 - COMBOBOX IDC_COMBO_MEDIAINFO_SOURCE,138,42,102,36, - CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + CONTROL "&None",IDC_RADIO_DATABASE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,24,24,72,8 + CONTROL "&Update",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,96,24,72,8 + CONTROL "&Rebuild",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,168,24,72,8 + LTEXT "Source of media information (&z):",IDC_STATIC,24,42,108,12 + COMBOBOX IDC_COMBO_MEDIAINFO_SOURCE,138,42,102,36,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP GROUPBOX "Playlist conversion",IDC_STATIC,12,66,240,72 - CONTROL "N&one",IDC_RADIO_PLAYLIST,"Button",BS_AUTORADIOBUTTON | - WS_GROUP,24,78,72,8 - CONTROL "&Update",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,96,78, - 72,8 - CONTROL "Re&convert",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON,168, - 78,72,8 + CONTROL "N&one",IDC_RADIO_PLAYLIST,"Button",BS_AUTORADIOBUTTON | WS_GROUP,24,78,72,8 + CONTROL "&Update",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,96,78,72,8 + CONTROL "Re&convert",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON,168,78,72,8 LTEXT "Playlist folder(s):",IDC_STATIC,24,96,72,8 - CONTROL "&Music",IDC_CHECK_PL_MUSIC,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,96,96,72,8 - CONTROL "&Playlist",IDC_CHECK_PL_PLAYLIST,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,168,96,72,8 + CONTROL "&Music",IDC_CHECK_PL_MUSIC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,96,96,72,8 + CONTROL "&Playlist",IDC_CHECK_PL_PLAYLIST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,168,96,72,8 LTEXT "Conversion option:",IDC_STATIC,24,108,72,8 - CONTROL "&Find missing",IDC_CHECK_PL_FIND,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,96,108,72,8 - CONTROL "&Skip missing",IDC_CHECK_PL_SKIP,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,168,108,72,8 - CONTROL "Use &JavaScript playlist",IDC_CHECK_PL_JSPL,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,96,120,144,8 + CONTROL "&Find missing",IDC_CHECK_PL_FIND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,96,108,72,8 + CONTROL "&Skip missing",IDC_CHECK_PL_SKIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,168,108,72,8 + CONTROL "Use &JavaScript playlist",IDC_CHECK_PL_JSPL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,96,120,144,8 GROUPBOX "Portable Player Device",IDC_STATIC,12,144,240,72 LTEXT "&Location:",IDC_STATIC,24,156,42,12,SS_CENTERIMAGE - COMBOBOX IDC_COMBO_DEVICE_LOCATION,78,156,42,36,CBS_DROPDOWNLIST | - CBS_SORT | WS_VSCROLL | WS_TABSTOP - CONTROL "Sa&ve log",IDC_CHECK_SAVE_LOG,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,168,156,66,12 + COMBOBOX IDC_COMBO_DEVICE_LOCATION,78,156,42,36,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + CONTROL "Sa&ve log",IDC_CHECK_SAVE_LOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,168,156,66,12 LTEXT "&Identifier:",IDC_STATIC,24,174,42,12,SS_CENTERIMAGE - COMBOBOX IDC_COMBO_DEVICE_ID,78,174,162,36,CBS_DROPDOWNLIST | - CBS_SORT | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_DEVICE_ID,78,174,162,36,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP LTEXT "Description:",IDC_STATIC,24,192,42,12,SS_CENTERIMAGE - LTEXT "\x83X\x83^\x83e\x83B\x83b\x83N",IDC_STATIC_PLAYER_DESCRIPTION,78,192,162, - 12,0,WS_EX_CLIENTEDGE + LTEXT "?X?^?e?B?b?N",IDC_STATIC_PLAYER_DESCRIPTION,78,192,162,12,0,WS_EX_CLIENTEDGE CONTROL "E&ject the player on completion",IDC_CHECK_SAFEREMOVE, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,222,120,12 END @@ -144,15 +127,11 @@ BEGIN DEFPUSHBUTTON "OK",IDOK,144,222,48,12,NOT WS_VISIBLE PUSHBUTTON "Cancel",IDCANCEL,204,222,48,12 - CONTROL "",IDC_LIST_PROGRESS,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | - WS_BORDER,12,12,240,84 - EDITTEXT IDC_EDIT_LOG,12,96,240,120,ES_MULTILINE | ES_AUTOHSCROLL | - ES_READONLY | WS_VSCROLL | WS_HSCROLL + CONTROL "",IDC_LIST_PROGRESS,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | WS_BORDER,12,12,240,84 + EDITTEXT IDC_EDIT_LOG,12,96,240,120,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL | WS_HSCROLL CONTROL "E&ject the player on completion",IDC_CHECK_SAFEREMOVE, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,222,120,12 - CONTROL "Don't &close",IDC_CHECK_DONT_CLOSE,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,144,222,48,12 + CONTROL "Don't &close",IDC_CHECK_DONT_CLOSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,144,222,48,12 END @@ -213,8 +192,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,12,0,2 - PRODUCTVERSION 0,12,0,2 + FILEVERSION 0,13,1,2 + PRODUCTVERSION 0,13,1,2 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -230,12 +209,12 @@ BLOCK "040904b0" BEGIN VALUE "FileDescription", "EasyPMP [Win32 GUI] application" - VALUE "FileVersion", "0, 12, 0, 2" + VALUE "FileVersion", "0, 13, 1, 2" VALUE "InternalName", "easypmp_win32gui" VALUE "LegalCopyright", "Copyright 2005-2006 Nyaochi" VALUE "OriginalFilename", "easypmp_win32gui.exe" VALUE "ProductName", "EasyPMP [Win32 GUI]" - VALUE "ProductVersion", "0, 12, 0, 2" + VALUE "ProductVersion", "0, 13, 1, 2" END END BLOCK "VarFileInfo" @@ -343,7 +322,7 @@ // // Generated from the TEXTINCLUDE 3 resource. // -//CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "res\\easypmp_win32gui.exe.manifest" +CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "res\\easypmp_win32gui.exe.manifest" ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2007-01-04 03:55:02
|
Revision: 239 http://svn.sourceforge.net/pmplib/?rev=239&view=rev Author: nyaochi Date: 2007-01-03 19:55:02 -0800 (Wed, 03 Jan 2007) Log Message: ----------- Release for PMPlib version 0.13 alpha. Modified Paths: -------------- trunk/pmplib/frontend/easypmp/cui/main.c trunk/pmplib/frontend/easypmp/win32gui/easypmp_win32gui.rc Modified: trunk/pmplib/frontend/easypmp/cui/main.c =================================================================== --- trunk/pmplib/frontend/easypmp/cui/main.c 2007-01-04 03:27:01 UTC (rev 238) +++ trunk/pmplib/frontend/easypmp/cui/main.c 2007-01-04 03:55:02 UTC (rev 239) @@ -58,8 +58,8 @@ */ #define APPLICATION_S "EasyPMP [CUI]" -#define VERSION_S "0.13 alpha 1" -#define COPYRIGHT_S "Copyright (c) 2005-2006 Nyaochi" +#define VERSION_S "0.13 alpha" +#define COPYRIGHT_S "Copyright (c) 2005-2007 Nyaochi" int database_dump(pmp_t* pmp, FILE *fpo, int level); void device_show_information(pmp_t* pmp, FILE *fpe); Modified: trunk/pmplib/frontend/easypmp/win32gui/easypmp_win32gui.rc =================================================================== --- trunk/pmplib/frontend/easypmp/win32gui/easypmp_win32gui.rc 2007-01-04 03:27:01 UTC (rev 238) +++ trunk/pmplib/frontend/easypmp/win32gui/easypmp_win32gui.rc 2007-01-04 03:55:02 UTC (rev 239) @@ -70,12 +70,6 @@ "\0" END -//3 TEXTINCLUDE -//BEGIN -// "CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST ""res\\\\easypmp_win32gui.exe.manifest""\r\n" -// "\0" -//END - #endif // APSTUDIO_INVOKED @@ -192,8 +186,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,13,1,2 - PRODUCTVERSION 0,13,1,2 + FILEVERSION 0,13,0,2 + PRODUCTVERSION 0,13,0,2 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -209,12 +203,12 @@ BLOCK "040904b0" BEGIN VALUE "FileDescription", "EasyPMP [Win32 GUI] application" - VALUE "FileVersion", "0, 13, 1, 2" + VALUE "FileVersion", "0, 13, 0, 2" VALUE "InternalName", "easypmp_win32gui" - VALUE "LegalCopyright", "Copyright 2005-2006 Nyaochi" + VALUE "LegalCopyright", "Copyright 2005-2007 Nyaochi" VALUE "OriginalFilename", "easypmp_win32gui.exe" VALUE "ProductName", "EasyPMP [Win32 GUI]" - VALUE "ProductVersion", "0, 13, 1, 2" + VALUE "ProductVersion", "0, 13, 0, 2" END END BLOCK "VarFileInfo" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2007-02-06 18:12:05
|
Revision: 304 http://svn.sourceforge.net/pmplib/?rev=304&view=rev Author: nyaochi Date: 2007-02-06 10:12:00 -0800 (Tue, 06 Feb 2007) Log Message: ----------- Show file names from which EasyPMP failed to obtain the media information. Modified Paths: -------------- trunk/pmplib/frontend/easypmp/common/database.c trunk/pmplib/frontend/easypmp/common/easypmp.h trunk/pmplib/frontend/easypmp/cui/main.c Modified: trunk/pmplib/frontend/easypmp/common/database.c =================================================================== --- trunk/pmplib/frontend/easypmp/common/database.c 2007-02-06 17:55:20 UTC (rev 303) +++ trunk/pmplib/frontend/easypmp/common/database.c 2007-02-06 18:12:00 UTC (rev 304) @@ -207,6 +207,12 @@ opt->num_strip_words ) == 0) { ++num_obtained; + } else { + // Report the error. + if (progress(instance, EASYPMPP_MUSIC_GMI | EASYPMPSP_WARN_GMI, i, 0, filename) != 0) { + result = EASYPMPE_CANCEL; + goto error_exit; + } } record->ts_update = timestamp; record->ts_import = ts_import; Modified: trunk/pmplib/frontend/easypmp/common/easypmp.h =================================================================== --- trunk/pmplib/frontend/easypmp/common/easypmp.h 2007-02-06 17:55:20 UTC (rev 303) +++ trunk/pmplib/frontend/easypmp/common/easypmp.h 2007-02-06 18:12:00 UTC (rev 304) @@ -47,14 +47,15 @@ EASYPMPSP_START = 0x00000001, EASYPMPSP_PROGRESS = 0x00000002, EASYPMPSP_SKIPPED = 0x00000003, - EASYPMPSP_WARN_PLAYLIST = 0x00000004, - EASYPMPSP_SKIP_PLAYLIST = 0x00000005, - EASYPMPSP_MISSING_MEDIA = 0x00000006, - EASYPMPSP_JSPL_ERROR = 0x00000007, - EASYPMPSP_JSPL_ERROR_POS = 0x00000008, - EASYPMPSP_JSPL_ERROR_LINE = 0x00000009, - EASYPMPSP_JSPL_OUTPUT = 0x0000000A, - EASYPMPSP_END = 0x0000000B, + EASYPMPSP_WARN_GMI = 0x00000004, + EASYPMPSP_WARN_PLAYLIST = 0x00000005, + EASYPMPSP_SKIP_PLAYLIST = 0x00000006, + EASYPMPSP_MISSING_MEDIA = 0x00000007, + EASYPMPSP_JSPL_ERROR = 0x00000008, + EASYPMPSP_JSPL_ERROR_POS = 0x00000009, + EASYPMPSP_JSPL_ERROR_LINE = 0x0000000A, + EASYPMPSP_JSPL_OUTPUT = 0x0000000B, + EASYPMPSP_END = 0x0000000C, }; enum { Modified: trunk/pmplib/frontend/easypmp/cui/main.c =================================================================== --- trunk/pmplib/frontend/easypmp/cui/main.c 2007-02-06 17:55:20 UTC (rev 303) +++ trunk/pmplib/frontend/easypmp/cui/main.c 2007-02-06 18:12:00 UTC (rev 304) @@ -114,6 +114,11 @@ case EASYPMPP_MUSIC_GMI|EASYPMPSP_PROGRESS: easypmp_progress_num_str(fpo, param_int+1, filepath_skippath(param_str)); break; + case EASYPMPP_MUSIC_GMI|EASYPMPSP_WARN_GMI: + console_clearln(fpo); + fprintf(fpe, " WARNING: Could not obtain the media information\n"); + fprints(fpe, " %s\n", param_str); + break; case EASYPMPP_MUSIC_GMI|EASYPMPSP_END: console_clearln(fpo); fprintf(fpo, " %d files were imported\n", param_int); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2007-02-07 12:33:43
|
Revision: 305 http://svn.sourceforge.net/pmplib/?rev=305&view=rev Author: nyaochi Date: 2007-02-07 04:33:41 -0800 (Wed, 07 Feb 2007) Log Message: ----------- Updated cmmand-line options Modified Paths: -------------- trunk/pmplib/frontend/easypmp/common/easypmp.h trunk/pmplib/frontend/easypmp/cui/main.c trunk/pmplib/frontend/easypmp/cui/option.c trunk/pmplib/frontend/easypmp/cui/option.h Modified: trunk/pmplib/frontend/easypmp/common/easypmp.h =================================================================== --- trunk/pmplib/frontend/easypmp/common/easypmp.h 2007-02-06 18:12:00 UTC (rev 304) +++ trunk/pmplib/frontend/easypmp/common/easypmp.h 2007-02-07 12:33:41 UTC (rev 305) @@ -69,18 +69,19 @@ #define MAKE_PMP_ERROR(code) (((code) << 16) | EASYPMPE_PMPERROR) enum { - MODE_NONE = 0, - MODE_DATABASE = 0x00000001, + MODE_NONE = 0, + MODE_DATABASE = 0x00000001, MODE_DATABASE_UPDATE = 0x00000002, MODE_DATABASE_REPR = 0x00000004, - MODE_PLAYLIST = 0x00000010, + MODE_PLAYLIST = 0x00000010, MODE_PLAYLIST_RECONVERT = 0x00000100, MODE_PLAYLIST_FIND = 0x00000200, MODE_PLAYLIST_SKIP = 0x00000400, MODE_PLAYLIST_JSPL = 0x00000800, - MODE_LIST_DEVICES = 0x00001000, - MODE_HELP = 0x00010000, - MODE_VERSION = 0x00020000, + MODE_LIST_DEVICES = 0x00001000, + MODE_HELP = 0x00010000, + MODE_HELP_VARIABLE = 0x00020000, + MODE_VERSION = 0x00040000, }; typedef struct { Modified: trunk/pmplib/frontend/easypmp/cui/main.c =================================================================== --- trunk/pmplib/frontend/easypmp/cui/main.c 2007-02-06 18:12:00 UTC (rev 304) +++ trunk/pmplib/frontend/easypmp/cui/main.c 2007-02-07 12:33:41 UTC (rev 305) @@ -251,6 +251,13 @@ goto exit_main; } + // Show help message for variables and exit. + if (opt.verb & MODE_HELP_VARIABLE) { + option_usage_variable(fpo); + ret = 0; + goto exit_main; + } + // Initialize PMPlib library. if (res = pmplib_init(&pmplib)) { fprintf(fpe, "ERROR: Failed to initialize PMPlib library (%d)\n", res); Modified: trunk/pmplib/frontend/easypmp/cui/option.c =================================================================== --- trunk/pmplib/frontend/easypmp/cui/option.c 2007-02-06 18:12:00 UTC (rev 304) +++ trunk/pmplib/frontend/easypmp/cui/option.c 2007-02-07 12:33:41 UTC (rev 305) @@ -50,18 +50,13 @@ #include <easypmp.h> #include "option.h" -/** - * \addtogroup cui - * @{ - */ - void option_usage(FILE *fp, const char *argv0) { fprintf(fp, "USAGE: %s [OPTIONS] [LOCATION]\n", argv0); #ifdef _WIN32 fprintf(fp, " LOCATION Absolute path to the root directory of a player (e.g., D:\\).\n"); #else - fprintf(fp, " LOCATION Absolute path to the root directory of a player (e.g., /mnt/usbdisk/).\n"); + fprintf(fp, " LOCATION Mount location of a player (e.g., /mnt/usbdisk/).\n"); #endif fprintf(fp, " If LOCATION is omitted, assume the current directory.\n"); #ifdef _WIN32 @@ -74,11 +69,11 @@ fprintf(fp, " -u, --update Update the existing media database incrementally\n"); /*fprintf(fp, " -z, --source=SOURCE Specify a source for obtaining media information\n");*/ fprintf(fp, " -R, --repr Output a database structure in plain text\n"); - fprintf(fp, " -L, --repr-level=VAL Specify representation level\n"); + fprintf(fp, " -L, --repr-level=VAL Specify representation level for -R option\n"); fprintf(fp, " -t, --strip-words=VAL Specify a list (CSV) of words to strip from artist names\n"); fprintf(fp, "\n"); fprintf(fp, "Playlist options:\n"); - fprintf(fp, " -p, --playlist Convert playlist files in PLAYLIST directory\n"); + fprintf(fp, " -p, --playlist Convert playlist files\n"); fprintf(fp, " -r, --reconvert Discard the existing playlist files and reconvert\n"); fprintf(fp, " -f, --find-missing Correct playlists with corrupt references to media files\n"); fprintf(fp, " -i, --ignore-missing Continue a conversion even if a media file is missing\n"); @@ -89,7 +84,7 @@ fprintf(fp, "Player options:\n"); fprintf(fp, " -l, --list-device Show the list of supported devices and exit\n"); fprintf(fp, " -d, --device Specify a device identifier for the player\n"); - fprintf(fp, " -s, --set=NAME=VALUE Set a variable NAME to VALUE\n"); + fprintf(fp, " -s, --set=NAME:VALUE Set a variable NAME to VALUE\n"); fprintf(fp, "\n"); #ifndef _WIN32 fprintf(fp, "Language-specific options:\n"); @@ -100,8 +95,21 @@ fprintf(fp, "Miscellaneous options:\n"); fprintf(fp, " -v, --version Show version number and exit\n"); fprintf(fp, " -h, --help Show this help message and exit\n"); + fprintf(fp, " -x, --help-variable Show the list of variables and exit\n"); } +void option_usage_variable(FILE* fp) +{ + fprintf(fp, "VARIABLE USAGE:\n"); + fprintf(fp, " Specify the VALUE of a variable NAME with -s option, i.e., -s NAME:VALUE\n"); + fprintf(fp, " Note that a pathname ending with \"%c%c\" implies inclusion of its subdirs\n", PATHCHAR, PATHCHAR); + fprintf(fp, "\n"); + fprintf(fp, "Pathname variables:\n"); + fprintf(fp, " music Relative path to music directory\n"); + fprintf(fp, " playlistsrc Absolute path to the sources for playlist conversion\n"); + fprintf(fp, " playlistdst Relative path to the destinations for playlist conversion\n"); +} + void option_init(option_t* opt) { memset(opt, 0, sizeof(*opt)); @@ -138,32 +146,32 @@ int this_option_optind = optind ? optind : 1; int option_index = 0; static const struct option long_options[] = { - {"create", no_argument, 0, 'c'}, - {"update", no_argument, 0, 'u'}, - {"source", required_argument, 0, 'z'}, - {"repr", no_argument, 0, 'R'}, + {"create", no_argument, 0, 'c'}, + {"update", no_argument, 0, 'u'}, + {"source", required_argument, 0, 'z'}, + {"repr", no_argument, 0, 'R'}, {"repr-level", required_argument, 0, 'L'}, {"strip-words", required_argument, 0, 't'}, {"playlist", no_argument, 0, 'p'}, {"reconvert", no_argument, 0, 'r'}, {"find-missing", no_argument, 0, 'f'}, - {"ignore-missing", no_argument, 0, 's'}, - {"jspl", no_argument, 0, 'j'}, + {"ignore-missing", no_argument, 0, 'i'}, {"list-device", no_argument, 0, 'l'}, - {"device", required_argument, 0, 'd'}, - {"set", required_argument, 0, 's'}, + {"device", required_argument, 0, 'd'}, + {"set", required_argument, 0, 's'}, #ifndef _WIN32 {"encoding", required_argument, 0, 'e'}, {"tagencoding", required_argument, 0, 'w'}, #endif/*_WIN32*/ - {"version", no_argument, 0, 'v'}, - {"help", no_argument, 0, 'h'}, + {"version", no_argument, 0, 'v'}, + {"help", no_argument, 0, 'h'}, + {"help-variable", no_argument, 0, 'x'}, {NULL, 0, 0, 0} }; #ifndef _WIN32 - int c = getopt_long(argc, argv, "cuz:RL:t:pmrfsjld:e:w:vh", long_options, &option_index); + int c = getopt_long(argc, argv, "cuz:RL:t:prfild:xs:e:w:vh", long_options, &option_index); #else - int c = getopt_long(argc, argv, "cuz:RL:t:pmrfsjld:vh", long_options, &option_index); + int c = getopt_long(argc, argv, "cuz:RL:t:prfild:xs:vh", long_options, &option_index); #endif/*_WIN32*/ if (c == -1) { break; @@ -203,6 +211,7 @@ free(opt->mbs_strip_words); opt->mbs_strip_words = strdup(optarg); break; + case 'p': opt->verb |= MODE_PLAYLIST; break; @@ -215,9 +224,7 @@ case 'i': opt->verb |= MODE_PLAYLIST_SKIP; break; - case 'j': - opt->verb |= MODE_PLAYLIST_JSPL; - break; + case 'l': opt->verb |= MODE_LIST_DEVICES; break; @@ -242,6 +249,9 @@ case 'h': opt->verb |= MODE_HELP; break; + case 'x': + opt->verb |= MODE_HELP_VARIABLE; + break; case '?': return -1; break; @@ -250,4 +260,3 @@ return optind; } -/** @} */ Modified: trunk/pmplib/frontend/easypmp/cui/option.h =================================================================== --- trunk/pmplib/frontend/easypmp/cui/option.h 2007-02-06 18:12:00 UTC (rev 304) +++ trunk/pmplib/frontend/easypmp/cui/option.h 2007-02-07 12:33:41 UTC (rev 305) @@ -29,5 +29,6 @@ void option_finish(option_t* opt); int option_parse(option_t* opt, int argc, char *argv[], FILE *fpe); void option_usage(FILE *fp, const char *argv0); +void option_usage_variable(FILE *fp); #endif/*__OPTION_H__*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2007-02-10 05:41:19
|
Revision: 324 http://svn.sourceforge.net/pmplib/?rev=324&view=rev Author: nyaochi Date: 2007-02-09 21:41:20 -0800 (Fri, 09 Feb 2007) Log Message: ----------- Configurable paths for CUI version. New options -P (--playlist-source) and -s (--set) were added. We don't have to transfer source playlists to a player; EasyPMP can directly convert playlist file located on the PC. Modified Paths: -------------- trunk/pmplib/frontend/easypmp/common/easypmp.h trunk/pmplib/frontend/easypmp/common/enumerate.c trunk/pmplib/frontend/easypmp/cui/main.c trunk/pmplib/frontend/easypmp/cui/option.c Modified: trunk/pmplib/frontend/easypmp/common/easypmp.h =================================================================== --- trunk/pmplib/frontend/easypmp/common/easypmp.h 2007-02-10 04:58:08 UTC (rev 323) +++ trunk/pmplib/frontend/easypmp/common/easypmp.h 2007-02-10 05:41:20 UTC (rev 324) @@ -97,6 +97,10 @@ char *mbs_strip_words; ucs2char_t** strip_words; int num_strip_words; + + char *path_to_pmp_music; + char *path_to_pmp_playlist; + char *path_to_playlist_source; } option_t; typedef struct { Modified: trunk/pmplib/frontend/easypmp/common/enumerate.c =================================================================== --- trunk/pmplib/frontend/easypmp/common/enumerate.c 2007-02-10 04:58:08 UTC (rev 323) +++ trunk/pmplib/frontend/easypmp/common/enumerate.c 2007-02-10 05:41:20 UTC (rev 324) @@ -188,7 +188,11 @@ ed.instance = instance; // Decode the playlist path prefix for system path separators - filepath_combinepath(path, MAX_PATH, pmp->info.path_to_root, pmp->info.path_to_playlist); + if (opt->path_to_playlist_source) { + mbstoucs2(path, MAX_PATH, opt->path_to_playlist_source, strlen(opt->path_to_playlist_source)+1); + } else { + filepath_combinepath(path, MAX_PATH, pmp->info.path_to_root, pmp->info.path_to_playlist); + } filepath_addslash(path); filepath_decode(path); ret = find_file( Modified: trunk/pmplib/frontend/easypmp/cui/main.c =================================================================== --- trunk/pmplib/frontend/easypmp/cui/main.c 2007-02-10 04:58:08 UTC (rev 323) +++ trunk/pmplib/frontend/easypmp/cui/main.c 2007-02-10 05:41:20 UTC (rev 324) @@ -311,6 +311,14 @@ goto exit_main; } + // Modify the default setting. + if (opt.path_to_pmp_music) { + mbstoucs2(pmp->info.path_to_music, MAX_PATH, opt.path_to_pmp_music, strlen(opt.path_to_pmp_music)+1); + } + if (opt.path_to_pmp_playlist) { + mbstoucs2(pmp->info.path_to_playlist, MAX_PATH, opt.path_to_pmp_playlist, strlen(opt.path_to_pmp_playlist)+1); + } + // Generate open flag. if (opt.verb & MODE_DATABASE) { openflag |= PMPOF_MUSIC_DB_WRITE; Modified: trunk/pmplib/frontend/easypmp/cui/option.c =================================================================== --- trunk/pmplib/frontend/easypmp/cui/option.c 2007-02-10 04:58:08 UTC (rev 323) +++ trunk/pmplib/frontend/easypmp/cui/option.c 2007-02-10 05:41:20 UTC (rev 324) @@ -74,6 +74,7 @@ fprintf(fp, "\n"); fprintf(fp, "Playlist options:\n"); fprintf(fp, " -p, --playlist Convert playlist files\n"); + fprintf(fp, " -P, --playlist-source=VALUE Change the path to the source playlists\n"); fprintf(fp, " -r, --reconvert Discard the existing playlist files and reconvert\n"); fprintf(fp, " -f, --find-missing Correct playlists with corrupt references to media files\n"); fprintf(fp, " -i, --ignore-missing Continue a conversion even if a media file is missing\n"); @@ -105,9 +106,8 @@ fprintf(fp, " Note that a pathname ending with \"%c%c\" implies inclusion of its subdirs\n", PATHCHAR, PATHCHAR); fprintf(fp, "\n"); fprintf(fp, "Pathname variables:\n"); - fprintf(fp, " music Relative path to music directory\n"); - fprintf(fp, " playlistsrc Absolute path to the sources for playlist conversion\n"); - fprintf(fp, " playlistdst Relative path to the destinations for playlist conversion\n"); + fprintf(fp, " pmp_music Relative path to music directory\n"); + fprintf(fp, " pmp_playlist Relative path to playlist directory\n"); } void option_init(option_t* opt) @@ -153,6 +153,7 @@ {"repr-level", required_argument, 0, 'L'}, {"strip-words", required_argument, 0, 't'}, {"playlist", no_argument, 0, 'p'}, + {"playlist-source", no_argument, 0, 'P'}, {"reconvert", no_argument, 0, 'r'}, {"find-missing", no_argument, 0, 'f'}, {"ignore-missing", no_argument, 0, 'i'}, @@ -169,9 +170,9 @@ {NULL, 0, 0, 0} }; #ifndef _WIN32 - int c = getopt_long(argc, argv, "cuz:RL:t:prfild:xs:e:w:vh", long_options, &option_index); + int c = getopt_long(argc, argv, "cuz:RL:t:pP:rfild:xs:e:w:vh", long_options, &option_index); #else - int c = getopt_long(argc, argv, "cuz:RL:t:prfild:xs:vh", long_options, &option_index); + int c = getopt_long(argc, argv, "cuz:RL:t:pP:rfild:xs:vh", long_options, &option_index); #endif/*_WIN32*/ if (c == -1) { break; @@ -215,6 +216,10 @@ case 'p': opt->verb |= MODE_PLAYLIST; break; + case 'P': + free(opt->path_to_playlist_source); + opt->path_to_playlist_source = strdup(optarg); + break; case 'r': opt->verb |= MODE_PLAYLIST_RECONVERT; break; @@ -232,6 +237,17 @@ strcpy(opt->model, optarg); break; case 's': + if (strncmp("pmp_music:", optarg, 10) == 0) { + free(opt->path_to_pmp_music); + opt->path_to_pmp_music = strdup(optarg+10); + } else if (strncmp("pmp_playlist:", optarg, 13) == 0) { + free(opt->path_to_pmp_playlist); + opt->path_to_pmp_playlist = strdup(optarg+13); + } else { + fprintf(fpe, "Unrecognized variable: %s\n", optarg); + return -1; + break; + } break; #ifndef _WIN32 case 'e': This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |