Re: [Musicpd-dev-team] [PATCH] fix overwriting bitrate with signal type
On Fri, Jun 21, 2013 at 10:22:11AM +0200, Matthias Larisch wrote: I recently opened a bug: http://bugs.musicpd.org/view.php?id=3787 (and I thought i already sent this to mailing list but something went wrong) You have, it has reached my inbox. You probably didn't receive it, because GNU Mailman (the mailing list software used here) has an option called Receive your own posts to the list?, which is set to No by default. You can change that here: https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team -- Jonathan Neuschäfer -- This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] Supported/preferred client c library?
On Thu, Apr 04, 2013 at 11:40:36PM +0200, Zoltan Gyarmati wrote: On 04/04/2013 11:27 PM, Arnold Krille wrote: Am 2013-04-04 22:25, schrieb Zoltan Gyarmati: is this list alive? It is, but mostly by the core-dev(s). And around easter some people tend to spend their holiday with their family... Have fun, Arnold -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team Hi Arnold, thanks for your response. Can you offer any other list or any other channel (IRC, forum, whatever), where i can ask my mostly client related questions, or better come back to here later? There's quite a number of people on irc.freenode.net #mpd. Thanks, Jonathan Neuschäfer -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] MPD crash in memory constrained embedded system
On Fri, Feb 08, 2013 at 06:12:53PM +0200, Timur Aydin wrote: Hi, I have ported MPD to the Blackfin platform and been doing tests using a very large music database. The entire database is about 500GBytes, but I have run into this issue with a much smaller database as well. I am using the text database at the moment. How does MPD crash? If you run it in --no-daemon mode, does it print a message when it crashes? Regards, Jonathan Neuschäfer -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] Connection issues with master
On Sat, Jan 26, 2013 at 10:26:00AM +0100, Max Kellermann wrote: There are still a few missing pieces before we can replace the GMainLoop completely. See src/output/HttpdClient.cxx. What is a replacement that runs on Linux (POSIX), Windows and Android? Or shall we just roll our own? Although I haven't worked with GMainLoop or libevent, libev (which I have worked with before) seems like a good candidate for a event loop, and it also has C++ bindings. Manpage: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod HTH, Jonathan Neuschäfer PS: It can also watch files for changes (using inotify on Linux, and polling with stat() everywhere else). -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] database proxy plugin -- how to use?
On Wed, Dec 19, 2012 at 04:19:00PM +0100, Rene Herman wrote: On 19-12-12 15:47, Max Kellermann wrote: On 2012/12/19 15:44, Rene Herman rene.her...@gmail.com wrote: log_file /tmp/mpd.log to test it that way, no /tmp/mpd.log file was created. To be sure, pre-creating it (with user.group mpd.mpd) also didn't help. I don't think it reads your configuration file, therefore ignores your configuration (both log_file and database). You can work around that quite easily, though. Just start mpd and specify the configuration file's path on the command line: $ /path/to/mpd /path/to/mpd.conf HTH, Jonathan Neuschäfer I believe you might be right. I added some clearly invalid statements at the top and nothing complains. You supposedly don't immediately know why this might be or you would've probably said -- and grepping through the MPD sources just now did not enlighten me either. I'll leave it at that for now. Thanks, Rene. -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] playlist formats of MPD
On Wed, Nov 28, 2012 at 03:03:32PM +, christof De Backere wrote: Max Kellermann max at duempel.org writes: No, it just remembers that the playlist file exists (ignoring its contents), and will tell that to the client via lsinfo. The client can then choose to issue a load command for this playlist file. Or it can use listplaylist[info] to view the contents of the playlist file. Thanks for the info. I now understand that the mpd will treat it as any other file in the music directory. It simply keeps it in it's database because the file exists. The only difference being that it will not have any tags (scope identifiers) defined, except 'filename', right? Client: now I'm trying to understand what a client should do. So imagine the client retrieves the db at startup with listallinfo then it will get that playlist as 'file: x/y/rasio/radio1_Stream.m3u' On MPD 0.17.1 I get: playlist: path/to/playlist.m3u (And I don't think it has changed in the last few years' releases.) HTH, Jonathan Neuschäfer -- Keep yourself connected to Go Parallel: INSIGHTS What's next for parallel hardware, programming and related areas? Interviews and blogs by thought leaders keep you ahead of the curve. http://goparallel.sourceforge.net ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] Remote folders in the Database Path
On Sun, Oct 21, 2012 at 08:01:37PM -0400, Andrew Dunn wrote: I would like to symlink to a CIFS share and have MPD index the files. When I'm not on this network though can I prevent MPD from removing all of those files from the database if I wanted to do a refresh? You can do partial refreshes: $ mpc update local # net share isn't mounted $ mpc update net # net share is mounted HTH, Jonathan Neuschäfer -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] [PATCH] Add tag support to DSD decoders - v6
On Tue, Aug 21, 2012 at 08:01:07PM +0200, Jurgen Kramer wrote: Regarding only submitting the needed patches. What the commit I supplied (http://git.musicpd.org/cgit/gtmkramer/mpd.git/commit/?id=9696eff5f075180e88fca504f2502c4f12aef71b) you get more then needed? (I am still not fully proficient with git). Try git rebase -i HEAD~9 on (a copy of) that branch. That will allow you to do several different things with the history in that branch. StGit (stacked git) is another useful tool for managing patchsets in git. (Its usage isn't overly obvious, but it has a good tutorial.) hope that helps, Jonathan Neuschäfer -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] [PATCH] Add support for DSF files to DSDIFF decoder - v3
On Mon, Apr 23, 2012 at 07:16:49PM +0200, Jurgen Kramer wrote: Please show me how I can check myself. It is getting a bit tiresome to hear about wrong tabs/indents. Jurgen If you use Vim, this little snippet will highlight all trailing white space: au Syntax * \ syn match ExtraSpace \s\+$ containedin=ALL \ | hi def link ExtraSpace Error syn match ExtraSpace \s\+$ hi def link ExtraSpace Error Otherwise, a 'git grep \s$' should get you the respective lines. As for other white space errors, I don't know. Thanks, Jonathan Neuschäfer -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] [PATCH] Add support for DSF files to DSDIFF decoder - v3
On Sat, Apr 21, 2012 at 01:29:37PM +0200, Jurgen Kramer wrote: +struct dsdiff_header_dsf { + struct dsdiff_id id;/* DSD */ + uint32_t size_low, size_high; /* DSD chunk size, including id = 28 */ + uint32_t fsize_low, fsize_high; /* Total file size */ + uint32_t pmeta_low, pmeta_high; /* Pointer to id3v2 metadata, should be +at the end of the file */ +}; What's the reason for not using uint64_t? + /* Check bits per sample format, determine if bitreverse is needed */ + metadata-bitreverse = dsf_fmt_chunk.bitssample == 1 ? true : false; @Max: Would it make sense to directly assign the value, which the '==' operator returned? + metadata-fileisdff = false; + return true; + + } else { The indentation is a bit confusing here. /** + * DSF data is build up of alternating 4096 blocks of DSD samples for left and + * right data. Convert the buffer holding 1 block of 4096 DSD left samples and + * 1 block of 4096 DSD right samples to 8k of samples in normal PCM left/right + * order. + */ +static void +dsf_to_pcm_order(uint8_t *p, uint8_t *q, size_t nrbytes) You can see by reading the code that the content of 'p' is copied into 'q', but more descriptive names (like 'from' and 'to') would make it more readable. Thanks, Jonathan Neuschäfer -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] Link broken?
On Wed, Apr 04, 2012 at 04:23:53PM +0800, zw g wrote: Hi guys, The following URL seems broken: http://www.musicpd.org/doc/protocol/ Someone confirm for me? Thanks. I can confirm that it's broken in that it's a redirection to the wiki, but I can't fix it. Jonathan Neuschäfer -- Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] OffTopic (was: Replay gain support)
On Fri, Jan 27, 2012 at 09:08:37AM -0500, Stefan Monnier wrote: -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d What is this thing? The URL is SourceForge, but it gets redirected to a non-Open Source site. Does SourceForge allow such thing? Should it? It's the Sourceforge spam signature, as Max once put it. :D So yes, it's probably a way for Geeknet to earn money. Greetings, Jonathan Neuschäfer -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
[Musicpd-dev-team] [PATCH mpc 2/2] command: store the get_boolean retval as int, it can be -1
--- src/command.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/command.c b/src/command.c index 7f30391..c031d99 100644 --- a/src/command.c +++ b/src/command.c @@ -835,7 +835,7 @@ cmd_pause(mpd_unused int argc, mpd_unused char **argv, struct mpd_connection *co int cmd_repeat ( int argc, char ** argv, struct mpd_connection *conn ) { - bool mode; + int mode; if(argc==1) { mode = get_boolean(argv[0]); @@ -857,7 +857,7 @@ int cmd_repeat ( int argc, char ** argv, struct mpd_connection *conn ) int cmd_random ( int argc, char ** argv, struct mpd_connection *conn ) { - bool mode; + int mode; if(argc==1) { mode = get_boolean(argv[0]); @@ -879,7 +879,7 @@ int cmd_random ( int argc, char ** argv, struct mpd_connection *conn ) int cmd_single ( int argc, char ** argv, struct mpd_connection *conn ) { - bool mode; + int mode; if(argc==1) { mode = get_boolean(argv[0]); -- 1.7.7.3 -- Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
[Musicpd-dev-team] [PATCH mpc 1/2] status.c: don't use = 0 on unsigned variable
--- src/status.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/status.c b/src/status.c index 78703ee..98a393f 100644 --- a/src/status.c +++ b/src/status.c @@ -37,7 +37,7 @@ elapsed_percent(const struct mpd_status *status) unsigned elapsed = mpd_status_get_elapsed_time(status); unsigned total = mpd_status_get_total_time(status); - if (total = 0) + if (total == 0) return 0; if (elapsed = total) -- 1.7.7.3 -- Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
[Musicpd-dev-team] [PATCH mpdscribble] file: use g_free for a g_strdup'd string
--- src/file.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/file.c b/src/file.c index 3c038fc..e939411 100644 --- a/src/file.c +++ b/src/file.c @@ -83,7 +83,7 @@ get_default_config_path(void) file_config.loc = file_home; return file; } else { - free(file); + g_free(file); if (!file_exists(FILE_CONF)) return NULL; -- 1.7.7.3 -- Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
[Musicpd-dev-team] [PATCH libmpdclient 2/2] configure.ac: (default: enabled) - [default=enabled]
--- configure.ac |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index a3a1fd0..89b03be 100644 --- a/configure.ac +++ b/configure.ac @@ -62,7 +62,7 @@ dnl AC_ARG_ENABLE(documentation, AS_HELP_STRING([--disable-documentation], - [Disable API doc generation (default: enabled)]),, + [Disable API doc generation @:@default=enabled@:@]),, [enable_documentation=yes]) if test x$enable_documentation = xyes; then AC_PATH_PROG(DOXYGEN, doxygen) @@ -72,7 +72,7 @@ fi AC_ARG_ENABLE(tcp, AS_HELP_STRING([--disable-tcp], - [Disable TCP support (default: enabled)]),, + [Disable TCP support @:@default=enabled@:@]),, [enable_tcp=yes]) if test x$enable_tcp = xyes; then AC_DEFINE([ENABLE_TCP], 1, [Define to enable TCP support]) @@ -80,7 +80,7 @@ fi AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror], - [Treat warnings as errors (default: disabled)]), + [Treat warnings as errors @:@default=disabled@:@]), ENABLE_WERROR=$enableval, ENABLE_WERROR=no) @@ -90,7 +90,7 @@ fi AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], - [Enable debugging (default: disabled)]), + [Enable debugging @:@default=disabled@:@]), ENABLE_DEBUG=$enableval, ENABLE_DEBUG=no) -- 1.7.7.3 -- Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] [PATCH ncmpc] new key to edit lyric
On Tue, Dec 13, 2011 at 12:05:07AM +0100, Jonathan Neuschäfer wrote: On Mon, Dec 12, 2011 at 02:05:46PM -0800, Jeffrey Middleton wrote: On Mon, Dec 12, 2011 at 1:39 PM, Jonathan Neuschäfer j.neuschae...@gmx.netwrote: With the attached follow-up patch it compiles and works resonably, if I set $EDITOR (starting the right editor is _hard_. Debian has sensible- editor to do most of the tricky stuff, but you can't expect that everywhere). It might be nice to look first at a (new) ncmpc config parameter, then EDITOR, then fall back to a default. As it is, if EDITOR is unset, a user might end up wondering why the edit key doesn't seem to do anything - and I think a lot of people don't have EDITOR set. Alternatively a helpful message could be printed, if we're worried about a user having no idea even how to quit vi(m). Yes, I agree. A prompt asking whether to start an editor seems to be a good defalt action. So I propose two options: editor-ask = yes|no Ask before starting an editor on the lyrics screen editor = EDITOR The text editor for editing lyrics I dropped the lyrics- prefix, because some other screen/command might some day also want to spawn an editor (but I don't have a strong opinion on this). And maybe we should do the fall back mechanism (and reading EDITOR) it in a script, which would be the default editor. I've uploaded a half-sane implementation (still lacking Windows compatibility, the ask option, and the whole fallback thing) here: http://git.musicpd.org/cgit/jn/ncmpc.git/log/?h=edit.v1 (7b7326c) Thanks, Jonathan Neuschäfer -- Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
[Musicpd-dev-team] ncmpc: lyrics screen portability (was: new key to edit lyric)
On Tue, Dec 13, 2011 at 12:16:18AM +0100, Max Kellermann wrote: On 2011/12/12 22:39, Jonathan Neuschäfer j.neuschae...@gmx.net wrote: Perhaps we should use system() instead of fork and exec. Max? system() is easier to use and portable, but fork() gives you more control; for example, you could try a list of executables in one child process, instead of having to fork for every attempt. Portability is important, as Avuton is preparing a WIN32 build. If the feature is made in a way that is not portable, it should be auto-disabled (with #if) on incompatible platforms, or there should be a fallback. Speaking of it, how well does the lyrics screen work on Windows? It calls mkdir with two arguments, which Avuton changed in the conf code in release-0.19-59-g3aea924, the plugin code uses bare FDs and fork/exec, and the current plugins use shell script, ruby and python, so at least plugin.c whould have to be changed as well to avoid these unix-isms. Thanks, Jonathan Neuschäfer -- Cloud Computing - Latest Buzzword or a Glimpse of the Future? This paper surveys cloud computing today: What are the benefits? Why are businesses embracing it? What are its payoffs and pitfalls? http://www.accelacomm.com/jaw/sdnl/114/51425149/ ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] [PATCH ncmpc] new key to edit lyric
On Mon, Dec 12, 2011 at 07:13:05PM +0100, Jitka Novotna wrote: Hi, There is a possibility to search for lyric on the Internet and to save it, but I miss a possibility to edit it, so I wrote it. Here it is. Jitka Novotna Thanks for the patch, I like it; but it has some problems. + { {'e', 0, 0 }, 0, CMD_LYRICS_EDIT, lyrics-edit, + N_(Edit Lyrics) }, It should probably rather just be called edit, as other screens might get an edit feature sooner or later. +static void +lyric_edit(struct mpdclient *c) I'd call it lyrics_edit (note the 's'). +{ + /* save current lyric to a file and run editor on it */ + pid_t cpid; + if ((cpid = fork()) != -1){ Perhaps we should use system() instead of fork and exec. Max? + if (cpid == 0){ + char * editor = getenv(EDITOR); + if (editor != NULL) { + ncu_deinit(); + if (!store_lyr_hd()){ + char path[1024]; + path_lyr_file(path, 1024, + current.artist, + current.title); + execl(editor,editor,path,0); execl only works with absolute paths. + } + } + } else { + wait(cpid); + ncu_init(); + } + } This code block could use some restructuring (which I'd be happy to do). + + /* lyrics update */ + screen_lyrics_load(c-song); + screen_text_repaint(text); This loads the wrong lyrics if you're viewing other lyrics than that of the current song. With the attached follow-up patch it compiles and works resonably, if I set $EDITOR (starting the right editor is _hard_. Debian has sensible- editor to do most of the tricky stuff, but you can't expect that everywhere). Again, thanks for the patch. It probably needs a bit of discussion (I'm just kind of a co-maintainer), but it seems useful. @Max: What about guarding this feature with #ifndef NCMPC_MINI, would that make sense? Regards, Jonathan Neuschäfer diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c index 618623c..15a3e81 100644 --- a/src/screen_lyrics.c +++ b/src/screen_lyrics.c @@ -28,9 +28,11 @@ #include screen.h #include lyrics.h #include screen_text.h +#include ncu.h #include assert.h #include sys/stat.h +#include sys/wait.h #include stdlib.h #include string.h #include glib.h @@ -330,33 +332,37 @@ lyrics_paint(void) screen_text_paint(text); } +/* lyric_edit uses it */ +static bool lyrics_cmd(struct mpdclient *, command_t); + static void lyric_edit(struct mpdclient *c) { + ncu_deinit(); /* save current lyric to a file and run editor on it */ pid_t cpid; if ((cpid = fork()) != -1){ if (cpid == 0){ char * editor = getenv(EDITOR); if (editor != NULL) { -ncu_deinit(); if (!store_lyr_hd()){ char path[1024]; path_lyr_file(path, 1024, current.artist, current.title); - execl(editor,editor,path,0); + execlp(editor, editor, path, NULL); } } + /* getenv or exec failed, so exit */ + exit(EXIT_FAILURE); } else { - wait(cpid); - ncu_init(); + waitpid(cpid, NULL, 0); } } + ncu_init(); - /* lyrics update */ - screen_lyrics_load(c-song); - screen_text_repaint(text); + /* update to get the changes (this is a bit hacky) */ + lyrics_cmd(c, CMD_SELECT); } static bool -- Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] [PATCH ncmpc] new key to edit lyric
On Mon, Dec 12, 2011 at 02:05:46PM -0800, Jeffrey Middleton wrote: On Mon, Dec 12, 2011 at 1:39 PM, Jonathan Neuschäfer j.neuschae...@gmx.netwrote: With the attached follow-up patch it compiles and works resonably, if I set $EDITOR (starting the right editor is _hard_. Debian has sensible- editor to do most of the tricky stuff, but you can't expect that everywhere). It might be nice to look first at a (new) ncmpc config parameter, then EDITOR, then fall back to a default. As it is, if EDITOR is unset, a user might end up wondering why the edit key doesn't seem to do anything - and I think a lot of people don't have EDITOR set. Alternatively a helpful message could be printed, if we're worried about a user having no idea even how to quit vi(m). Yes, I agree. A prompt asking whether to start an editor seems to be a good defalt action. So I propose two options: editor-ask = yes|no Ask before starting an editor on the lyrics screen editor = EDITOR The text editor for editing lyrics I dropped the lyrics- prefix, because some other screen/command might some day also want to spawn an editor (but I don't have a strong opinion on this). And maybe we should do the fall back mechanism (and reading EDITOR) it in a script, which would be the default editor. Thanks, Jonathan Neuschäfer -- Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] [PATCH 1/3] utils: mark sockaddr_to_string() as G_GNUC_MALLOC
On Mon, Sep 19, 2011 at 06:31:14PM +0200, Jonathan Neuschäfer wrote: src/socket_util.h |1 + Updated, pushed to my repo: http://git.musicpd.org/cgit/jn/mpd.git/log/?h=dev Jonathan -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] [PATCH] Set socket TCP keepalive option on incoming connections
Just some minor nitpicks here, I'm not an MPD core developer. On Mon, Sep 19, 2011 at 08:10:13AM -0500, Dan McGee wrote: + if (fd = 0) { + if (socket_keepalive(fd)) + g_warning(Could not set TCP keepalive option: %s, + g_strerror(errno)); You use socket_keepalive's return value like a bool here, maybe it should really return bool, as tag_ape_scan (src/ape.h, just a random example) does. return fd; } + +int +socket_keepalive(int fd) +{ + const int reuse = 1; + +#ifdef WIN32 + const char *optval = (const char *)reuse; This workaround could use a comment (if it isn't obvious to people who have used setsockopt on Windows before). +int +socket_keepalive(int fd); A doxygen comment would probably be quite appropriate here. Thanks, Jonathan Neuschäfer -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] [PATCH] Set socket TCP keepalive option on incoming connections
On Mon, Sep 19, 2011 at 10:20:54AM -0500, Dan McGee wrote: On Mon, Sep 19, 2011 at 10:13 AM, Jonathan Neuschäfer j.neuschae...@gmx.net wrote: Just some minor nitpicks here, I'm not an MPD core developer. On Mon, Sep 19, 2011 at 08:10:13AM -0500, Dan McGee wrote: + if (fd = 0) { + if (socket_keepalive(fd)) + g_warning(Could not set TCP keepalive option: %s, + g_strerror(errno)); You use socket_keepalive's return value like a bool here, maybe it should really return bool, as tag_ape_scan (src/ape.h, just a random example) does. setsockopt() is documented to return only 0 or -1 (on windows, the #defined SOCKET_ERROR == -1), so it more or less is a boolean. There were no other bool-returning functions here so I didn't want to introduce a new precedent. Makes sense. +#ifdef WIN32 + const char *optval = (const char *)reuse; This workaround could use a comment (if it isn't obvious to people who have used setsockopt on Windows before). I figured because this workaround matches the exact same one used a few lines above in socket_bind_listen(), it wouldn't be too magic. If you'd like a follow-on patch to document it in both places I can do that. Well, I let Max decide :-). Jonathan -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
[Musicpd-dev-team] [PATCH 1/3] utils: mark sockaddr_to_string() as G_GNUC_MALLOC
--- src/socket_util.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/socket_util.h b/src/socket_util.h index f27751a..022be8a 100644 --- a/src/socket_util.h +++ b/src/socket_util.h @@ -40,6 +40,7 @@ struct sockaddr; * @param error location to store the error occurring, or NULL to * ignore errors */ +G_GNUC_MALLOC char * sockaddr_to_string(const struct sockaddr *sa, size_t length, GError **error); -- 1.7.6.3 -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
[Musicpd-dev-team] [PATCH 2/3] utils: uri.h: fix a typo: schema
--- src/uri.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/uri.h b/src/uri.h index 85eeebe..5a9b472 100644 --- a/src/uri.h +++ b/src/uri.h @@ -25,7 +25,7 @@ #include stdbool.h /** - * Checks whether the specified URI has a schema in the form + * Checks whether the specified URI has a scheme in the form * scheme://. */ G_GNUC_PURE -- 1.7.6.3 -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
[Musicpd-dev-team] output/raop: rewriting remove_char_from_string
Hello! Reading src/output/raop_output_plugin.c I felt the need to rewrite[1] remove_char_from_string(), because I didn't like the current implementation. As this doesn't add a new feature or fix a bug, I wrote a little benchmark program[2] (70 lines to test 15, yay!), and in all cases I've tested so far, my implementation performed better than or as good as the current implementation. [1] http://git.musicpd.org/cgit/jn/mpd.git/commit/?h=remove-char [2] http://git.musicpd.org/cgit/jn/mpd.git/plain/remove_char.c?h=remove-char-testcase--dont-merge Thanks, Jonathan Neuschäfer -- Storage Efficiency Calculator This modeling tool is based on patent-pending intellectual property that has been used successfully in hundreds of IBM storage optimization engage- ments, worldwide. Store less, Store more with what you own, Move data to the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/ ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
[Musicpd-dev-team] [PATCH 2/7] sticker: fix a memory leak
--- src/sticker.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/sticker.c b/src/sticker.c index a17c11b..346a827 100644 --- a/src/sticker.c +++ b/src/sticker.c @@ -579,8 +579,10 @@ sticker_load(const char *type, const char *uri) bool success; success = sticker_list_values(sticker-table, type, uri); - if (!success) + if (!success) { + sticker_free(sticker); return NULL; + } if (g_hash_table_size(sticker-table) == 0) { /* don't return empty sticker objects */ -- 1.7.5.4 -- Storage Efficiency Calculator This modeling tool is based on patent-pending intellectual property that has been used successfully in hundreds of IBM storage optimization engage- ments, worldwide. Store less, Store more with what you own, Move data to the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/ ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
[Musicpd-dev-team] [PATCH 3/7] conf: add missing fclose in error path
This patch seems a bit ugly, maybe it would be a bit cleaner with gotos. --- src/conf.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/src/conf.c b/src/conf.c index fa05610..a797504 100644 --- a/src/conf.c +++ b/src/conf.c @@ -372,6 +372,7 @@ config_read_file(const char *file, GError **error_r) assert(*line != 0); g_propagate_prefixed_error(error_r, error, line %i: , count); + fclose(fp); return false; } @@ -383,6 +384,7 @@ config_read_file(const char *file, GError **error_r) g_set_error(error_r, config_quark(), 0, unrecognized parameter in config file at line %i: %s\n, count, name); + fclose(fp); return false; } @@ -392,6 +394,7 @@ config_read_file(const char *file, GError **error_r) config parameter \%s\ is first defined on line %i and redefined on line %i\n, name, param-line, count); + fclose(fp); return false; } @@ -403,6 +406,7 @@ config_read_file(const char *file, GError **error_r) if (*line != '{') { g_set_error(error_r, config_quark(), 0, line %i: '{' expected, count); + fclose(fp); return false; } @@ -411,12 +415,15 @@ config_read_file(const char *file, GError **error_r) g_set_error(error_r, config_quark(), 0, line %i: Unknown tokens after '{', count); + fclose(fp); return false; } param = config_read_block(fp, count, string, error_r); - if (param == NULL) + if (param == NULL) { + fclose(fp); return false; + } } else { /* a string value */ @@ -433,6 +440,7 @@ config_read_file(const char *file, GError **error_r) g_error_free(error); } + fclose(fp); return false; } @@ -440,6 +448,7 @@ config_read_file(const char *file, GError **error_r) g_set_error(error_r, config_quark(), 0, line %i: Unknown tokens after value, count); + fclose(fp); return false; } -- 1.7.5.4 -- Storage Efficiency Calculator This modeling tool is based on patent-pending intellectual property that has been used successfully in hundreds of IBM storage optimization engage- ments, worldwide. Store less, Store more with what you own, Move data to the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/ ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
[Musicpd-dev-team] [PATCH 1/7] ape: add missing g_free in error path
--- src/ape.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/ape.c b/src/ape.c index 4a4eaf8..6257fe6 100644 --- a/src/ape.c +++ b/src/ape.c @@ -60,8 +60,10 @@ ape_scan_internal(FILE *fp, tag_ape_callback_t callback, void *ctx) assert(remaining 10); char *buffer = g_malloc(remaining); - if (fread(buffer, 1, remaining, fp) != remaining) + if (fread(buffer, 1, remaining, fp) != remaining) { + g_free(buffer); return false; + } /* read tags */ unsigned n = GUINT32_FROM_LE(footer.count); -- 1.7.5.4 -- Storage Efficiency Calculator This modeling tool is based on patent-pending intellectual property that has been used successfully in hundreds of IBM storage optimization engage- ments, worldwide. Store less, Store more with what you own, Move data to the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/ ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
[Musicpd-dev-team] [PATCH 5/7] output/httpd: add missing g_free in error path
--- src/output/httpd_output_plugin.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/output/httpd_output_plugin.c b/src/output/httpd_output_plugin.c index 7fde676..20098c9 100644 --- a/src/output/httpd_output_plugin.c +++ b/src/output/httpd_output_plugin.c @@ -103,6 +103,7 @@ httpd_output_init(G_GNUC_UNUSED const struct audio_format *audio_format, if (encoder_plugin == NULL) { g_set_error(error, httpd_output_quark(), 0, No such encoder: %s, encoder_name); + g_free(httpd); return NULL; } -- 1.7.5.4 -- Storage Efficiency Calculator This modeling tool is based on patent-pending intellectual property that has been used successfully in hundreds of IBM storage optimization engage- ments, worldwide. Store less, Store more with what you own, Move data to the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/ ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team