Commit Graph

305 Commits

Author SHA1 Message Date
Julien BLACHE
e5cc417e96 Add DJB hash function to misc.[ch] and use it 2009-05-03 11:16:51 +02:00
Julien BLACHE
9d1cd9117f Enable new HTTP server alongside the old webserver 2009-04-25 16:27:58 +02:00
Julien BLACHE
1eaa3979e6 Add missing db_deinit() calls 2009-04-20 16:41:06 +02:00
Julien BLACHE
c4f8c7c254 Use new file scanner 2009-04-20 16:41:06 +02:00
Julien BLACHE
bbab963fe2 Use new conffile code in main.c; remove wrappers 2009-04-19 19:39:15 +02:00
Julien BLACHE
bacdddb82f Use -v for version information 2009-04-19 19:39:11 +02:00
Julien BLACHE
5e48a8bb6a Remove -k/kill_server option 2009-04-19 19:38:41 +02:00
Julien BLACHE
362db5003b Remove config file conversion code 2009-04-19 19:37:48 +02:00
Julien BLACHE
e8c9a04376 Remove OS abstraction layer
Migrate daemon startup code in main.c, migrate functions with a single
callsite to that file. Remove setpgrp() usage in favor of setsid(), remove
configure check for setpgrp().
2009-04-19 19:37:42 +02:00
Julien BLACHE
9d026442b2 Remove alternate plugin load paths 2009-04-19 19:37:41 +02:00
Julien BLACHE
3ec2cc0f00 Stop the TXT record encoding madness
Use a proper string array to pass the TXT record fields, get rid of the
encoding stuff.

Changes the plugin API.
2009-04-19 19:37:41 +02:00
Julien BLACHE
8718f856df Remove unused, unfinished, useless UPnP code 2009-04-19 19:37:41 +02:00
Julien BLACHE
6db32640ef Remove no-op os_deinit() 2009-04-19 19:37:41 +02:00
Julien BLACHE
54c01d3b57 Move signal processing to the main loop using signalfd 2009-04-19 19:37:41 +02:00
Julien BLACHE
0292b9c625 Fix memory leak 2009-04-19 19:37:41 +02:00
Julien BLACHE
97faadf6dd Enable new mDNS backend 2009-04-19 19:37:35 +02:00
Julien BLACHE
8a351e5bf8 Manage explicit event bases 2009-04-08 14:57:29 +02:00
Julien BLACHE
df0013a166 Introduce libevent for running the main loop
Start the gradual libevent conversion.
2009-04-07 12:53:04 +02:00
Julien BLACHE
3a53a068af Initialize ffmpeg in main()
ffmpeg needs to be initialized before scanning songs at startup. As a
consequence, the ffmpeg plugin does not need to call av_register_all()
itself anymore.
2009-04-05 18:54:58 +02:00
Julien BLACHE
2cb11e8f42 Fix typos in help output 2009-04-02 13:24:09 +02:00
Julien BLACHE
1b98e3c036 Fix Avahi mDNS backend
Fix Avahi polling:
 - use avahi_simple_poll_loop() in rend-avahi.c:rend_poll() instead
   of reinventing yet another type of wheel;
 - start RendezVous thread after daemonizing, so the thread actually
   runs after we've daemonized.

Also handle Avahi daemon restarts, as it's good practice and easy to do.

 ... And /that/, my friends, is how we do that ...
2009-04-02 13:22:23 +02:00
Julien BLACHE
c3fb950737 Remove WIN32 conditional code 2009-04-02 11:04:33 +02:00
Julien BLACHE
fc8038de6b Get rid of unused restart.[ch] 2009-04-01 19:17:05 +02:00
Julien BLACHE
d3b4d80284 Remove SVN keywords 2009-04-01 19:16:21 +02:00
Julien BLACHE
eb5cccca06 Make MDNS mandatory and Avahi the default (and only) backend 2009-04-01 19:16:19 +02:00
Julien BLACHE
185864e799 Remove custom memory debug facility 2009-04-01 19:16:19 +02:00
Ron Pedde
fffe34e5eb Fix bogus error messages on web config 2007-10-23 04:23:50 +00:00
Ron Pedde
196ac7b468 Version the plugins, to stop from loading old versions, plus fix up search paths for ipkg based installs 2007-09-11 04:29:52 +00:00
Ron Pedde
9d9ce5ba7a fix win32 library loading issues. 2007-09-07 07:51:00 +00:00
Ron Pedde
effab02bc1 scan for new plugin path when not specified in config 2007-09-07 06:55:25 +00:00
Ron Pedde
4b9b1fe177 merge ron-ssl branch back to trunk in preparation for windows cleanups, merge setup tweaks and credits language as well as update rend-posix from stable-aspl-free 2007-07-31 04:34:33 +00:00
Ron Pedde
648297e253 Finish (mostly) upnp discovery 2007-05-04 21:31:05 +00:00
Ron Pedde
0eba96d92a More UPnP work. Almost finished with discovery. 2007-05-03 03:30:30 +00:00
Ron Pedde
29478fcca1 Remove regex functions from webserver, instead preferring path from root - fixes problems with bad regex in uclibc 2007-04-15 23:27:16 +00:00
Ron Pedde
69ec57328e ifdef the upnp stuff in main 2007-04-13 23:31:22 +00:00
Ron Pedde
1f640234f5 start of UPnP functions 2007-04-13 21:37:42 +00:00
Ron Pedde
6f1f6d8ece Add always_transcode, first pass at a fix for the hifidelio/olive, something like the one offered by Matthias Schmidt 2007-04-09 04:23:51 +00:00
Ron Pedde
a4dea03121 Try to automatically locate plugins, show loaded plugins on web interface 2007-04-04 20:34:29 +00:00
Ron Pedde
5383d1c1ca Fix double-free problems reported in forums 2007-01-18 06:07:26 +00:00
Ron Pedde
14fe9f9c6c Add memory debugging (--enable-mem-debug), find and fix several small (and not so small) memory leaks 2007-01-17 01:06:16 +00:00
Ron Pedde
b23f0d226b update usage() to reflect new -k and -V options, as reminded by Steve in the forums 2007-01-11 01:28:18 +00:00
Ron Pedde
1d01c02296 Fix -V to exit after displaying version 2007-01-10 06:19:41 +00:00
Ron Pedde
d2e5b45bd9 Move signal handling to parent thread, add -V and -k options, closing #219, and fixing problems with daemontools 2007-01-09 18:12:39 +00:00
Ron Pedde
758c0c6245 stdint fixes 2006-11-14 05:29:32 +00:00
Ron Pedde
d90fd30a9b Drop version number on startup 2006-11-11 21:47:43 +00:00
Ron Pedde
69eb216e59 Implement option to skip initial start-up scan, useful for windows machines. Fixes ticket #208 2006-10-27 20:39:39 +00:00
Ron Pedde
325c86073b Add hostname (%h) and version (%v) templates for the servername parameter 2006-10-16 03:52:45 +00:00
Ron Pedde
f7e3db6861 Load all plugins in plugin dir, rather than relying on a plugins entry 2006-10-08 18:05:31 +00:00
Ron Pedde
8e23eb9e1d Move daap to an external output module 2006-09-25 03:20:22 +00:00
Ron Pedde
81afc997c7 tune logging 2006-08-25 03:37:03 +00:00
Ron Pedde
ddfea4d23d Bump the end-scan message to E_LOG 2006-08-17 02:25:41 +00:00
Ron Pedde
f9d27a4773 Show scan completion in logs 2006-08-14 00:00:48 +00:00
Ron Pedde
5acac92603 Skip background scan if a foreground scan just happened 2006-08-04 01:50:30 +00:00
Ron Pedde
840fe59997 Add -b option to manually set the ffid 2006-07-15 05:56:32 +00:00
Ron Pedde
b1a5f93987 Fix tab expansion 2006-07-12 22:52:50 +00:00
Ron Pedde
7a3a5ce3af Fix memory leak in scan-xml, closing #173 2006-07-12 04:10:21 +00:00
Ron Pedde
d8bdbe234d Fix erroneous startup message 2006-07-09 23:03:20 +00:00
Ron Pedde
61d4ddff26 Make empty password not show a lock in iTunes, closing #155 2006-06-19 04:29:27 +00:00
Ron Pedde
5f3a12c351 Import streaming stations form iTunes XML file, closing ticket #130, add scan/correct_order to make static playlists return in correct order closing ticket #159 2006-06-19 04:25:08 +00:00
Ron Pedde
1dc1257f2c add rescan/full rescan methods to xml-rpc for ticket #121 2006-06-15 07:10:05 +00:00
Ron Pedde
97328767d8 Don't do startup scan (unless requested) when scan_interval is set to 0 2006-06-14 04:33:27 +00:00
Ron Pedde
a1e2bc3799 add -a switch for mac .app bundle 2006-06-13 02:27:21 +00:00
Ron Pedde
bdc4fdc425 compile first, then commit. even on one-liners. stupid stupid stupid. 2006-06-01 06:27:16 +00:00
Ron Pedde
95dd1048be Don't send scan stopped events if the scan was aborted by service shutdown 2006-06-01 06:20:55 +00:00
Ron Pedde
5486e8c76a Logging fixups -- allow multiple log destinations, always syslog fatals (even before config read), honor logging changes via web interface 2006-05-30 23:46:43 +00:00
Ron Pedde
0a14704fd9 Maybe fix for frontrow problems? 2006-05-29 07:57:45 +00:00
Ron Pedde
89b6af89b3 Fixes to build, install, and run ffmpeg ssc on win32 2006-05-28 06:11:37 +00:00
Ron Pedde
0f64686356 add ffmpeg-based transcoding 2006-05-28 04:06:14 +00:00
Ron Pedde
9705113b40 add a ffid txt record so rsp and iTunes entries can be correlated 2006-05-24 05:14:58 +00:00
Ron Pedde
a9cb506963 Make windows slashed playlists work on unix (and vice versa) 2006-05-24 04:53:44 +00:00
Ron Pedde
41aabeeab9 Make port optional config value, searching for unused port if necessary. Closes #110 2006-05-24 04:19:44 +00:00
Ron Pedde
80f7c87567 Make default server name based on hostname, fixing #111 2006-05-24 03:53:22 +00:00
Ron Pedde
cfaceb8d94 Add fullscan events, make configurator display fullscan items. 2006-05-06 07:22:51 +00:00
Ron Pedde
5de59a26aa fix deadlock on event plugin 2006-05-05 07:38:13 +00:00
Ron Pedde
e60d1f75ec invert the sense of the -s switch, default skipping intial scan 2006-05-01 08:06:19 +00:00
Ron Pedde
1ca265d4c5 Let plugins register rendezvous names 2006-04-25 23:13:04 +00:00
Ron Pedde
b4bc212f65 Make auth requests for plugins work 2006-04-22 19:45:49 +00:00
Ron Pedde
eed9619063 Make auth handers receive connection info 2006-04-22 18:22:41 +00:00
Ron Pedde
1af9e8c08e more plugin work 2006-04-20 06:52:21 +00:00
Ron Pedde
fd0d5cbbd9 start plugin infrastructure 2006-04-19 08:32:18 +00:00
Ron Pedde
267528f070 Make mp3_dir multivalued, closing ticket #16 2006-04-12 05:18:55 +00:00
Ron Pedde
8ca978322a fix error messages on bad schema 2006-04-10 04:27:52 +00:00
Ron Pedde
92e967e78c set default config file location based on prefix 2006-04-09 01:35:10 +00:00
Ron Pedde
0b11dc0e39 Make failures in mp3 scanning non-fatal (in case of bad mp3_dir) 2006-03-25 23:21:43 +00:00
Ron Pedde
4d1555ec2b untabify err.c 2006-03-25 10:52:10 +00:00
Ron Pedde
be7bdfbbfb config file upgrading 2006-03-13 06:33:58 +00:00
Ron Pedde
ec087d86ec make auth handler take effect on /content-codes, just like iTunes does. 2006-03-07 07:02:03 +00:00
Ron Pedde
942125f271 type fixes 2006-03-07 06:07:34 +00:00
Ron Pedde
8e9d759e05 make sqlite3 thread-safer(?) by using a thread pool 2006-03-07 06:01:59 +00:00
Ron Pedde
f037a53452 crazy fixes for sqlite3 2006-03-06 07:48:53 +00:00
Ron Pedde
cf59f7dc33 fix up txt records to show password info, mtd-version, and itunes version 2006-03-05 08:09:27 +00:00
Ron Pedde
9e5f21db7f fix for STDERR problem in rend-unix 2006-03-05 02:02:15 +00:00
Ron Pedde
e5dd11b090 fix errors when using a null default in conf_get_string 2006-02-27 23:39:11 +00:00
Ron Pedde
73636a5a4c add ini style config handling 2006-02-27 22:48:42 +00:00
Ron Pedde
9a133dcbdc Merged win32-branch 2006-02-26 08:46:24 +00:00
Ron Pedde
e0ce8f273f add db_type and db_parameters for specifying different backend databases 2006-01-06 00:05:02 +00:00
Ron Pedde
86b45a028e abstract database somewhat, improve error handling 2006-01-04 20:30:44 +00:00
Ron Pedde
a82c564426 move the thread status stuff into the webserver, add status info to xml-rpc 2005-11-07 05:58:05 +00:00
Ron Pedde
f127d8cb58 allow editing of smart playlists 2005-11-03 05:02:17 +00:00
Ron Pedde
4c89c687a6 pidfile patches from Diego Petteno 2005-10-26 05:10:19 +00:00
Ron Pedde
ab17d88879 Add interface directive to config file -- fix stderr logging on rendezvous child 2005-08-16 02:26:32 +00:00
Ron Pedde
9ec19009ec that's the problem with vararg functions... no warning if you mess them up 2005-05-23 01:14:30 +00:00
Ron Pedde
9ae132a127 Add iTunes playlist support 2005-05-21 05:53:11 +00:00
Ron Pedde
f8f442bc3c Move db_open after priv drop 2005-03-20 04:13:34 +00:00
Ron Pedde
0df3ad01e1 Fix stop attempts during initial scan 2005-03-13 21:22:05 +00:00
Ron Pedde
847d10b361 First pass of sqlite backend 2005-03-11 06:39:40 +00:00
Ron Pedde
c1f455b16f Fix content-type for xml serialized response 2005-03-03 06:56:58 +00:00
Ron Pedde
3b26120a3b Add xml output for daap requests (using output=xml in request) 2005-03-03 06:07:11 +00:00
Ron Pedde
9afb28a4ab Add Tim's ogg and flac patches, plus convert the existing ogg metainfo reading
stuff to use vorbisfile.
2005-02-27 00:41:55 +00:00
Ron Pedde
bdd5ba39da integrate server-side conversion patches, -Wall cleanups, AMD64 fixes, and xml-rpc cleanups 2005-02-21 08:10:37 +00:00
Ron Pedde
1ea0bce3b3 re-fix the atoll thing 2005-02-05 20:54:55 +00:00
Ron Pedde
86b87b43dd Fix segfault on foreground on older redhats 2005-02-04 07:37:48 +00:00
Ron Pedde
ed0a9c9fb1 fix pidfile for heavyweight threads 2005-01-30 06:58:36 +00:00
Ron Pedde
9b6d39d447 Fix typo in usage, dont write pidfile unless running as root 2005-01-24 07:42:42 +00:00
Ron Pedde
c681c03af1 Tune pidfile error 2005-01-07 05:57:52 +00:00
Ron Pedde
dd3bc4c731 Try and fix rendezvous problem 2005-01-07 05:37:46 +00:00
Ron Pedde
ae5613a1df fix solaris compile problems... take 2. 2004-12-31 04:57:33 +00:00
Ron Pedde
1e17bf8c41 Add gzip content-encoding from patch by Ciamac Moallemi 2004-12-29 05:44:32 +00:00
Ron Pedde
e9e305586e reorder startup again 2004-12-22 04:59:34 +00:00
Ron Pedde
abe5ffbd09 change loggin destination 2004-12-21 04:38:15 +00:00
Ron Pedde
c2b27f1836 re-arrange stuff back the way it was, mostly. Fix pidfile generation. 2004-12-09 05:07:09 +00:00
Ron Pedde
f36c8d20d0 fix rend_init before detach bug in main. Oops 2004-12-08 03:20:48 +00:00
Ron Pedde
007fb3725c Try to wait as long as possible before detaching -- catch more startup errors that way 2004-12-07 00:24:39 +00:00
Ron Pedde
ae0538d347 fix inverted error message 2004-11-22 07:14:37 +00:00
Ron Pedde
06b5ad046f join signal handler on exit. make sure it exits okay 2004-11-14 06:44:20 +00:00
Ron Pedde
8bdd650ed2 oops 2004-11-13 21:00:30 +00:00
Ron Pedde
e24b0b7a66 Fix memory leak -- not disposing of mp3 struct returned by db_find in main 2004-11-13 20:58:30 +00:00
Ron Pedde
19318d3708 add -D arg and err_setdebugmask 2004-11-13 08:05:27 +00:00
Ron Pedde
31aa0d8575 modularize debugging statements 2004-11-13 07:14:26 +00:00
Ron Pedde
2801956df0 more doxygen stuff 2004-11-12 07:27:05 +00:00
Ron Pedde
71ec35efd3 Add Doxyfile for doxygen doc generation 2004-11-12 06:38:05 +00:00
Ron Pedde
afa041790b handle SIGCLD to catch zombies 2004-11-11 19:27:38 +00:00
Ron Pedde
e2bf750033 Fix overrun in query.c -- calloc too small 2004-11-11 19:17:02 +00:00
Ron Pedde
31ff9fc39c add --disable-mdns configure option, in prep for win32 build 2004-10-30 16:42:20 +00:00
Ron Pedde
0beb5c10d3 don't rescan the database if nobody is connected 2004-10-25 04:50:59 +00:00
Ron Pedde
7cc249142e Dynamic art for AAC files from Paul Kim 2004-10-15 20:10:39 +00:00
Ron Pedde
87f1e02c86 debug info on background rescans 2004-09-19 06:01:38 +00:00
Ron Pedde
2861761d36 Stop hang while getting db_Version when rescanning 2004-09-19 05:18:17 +00:00
Ron Pedde
32e4d018cb Make logs to stdout when running in foreground 2004-09-19 04:07:03 +00:00
Ron Pedde
537233256b Default browse/query 2004-09-18 04:12:43 +00:00
Ron Pedde
68fa9b7b10 add background rescanning 2004-09-15 04:58:08 +00:00
Ron Pedde
23fa058c64 fix typo in add_long, made mper tag not work 2004-09-14 04:03:57 +00:00
Ron Pedde
e43caee157 Add support for smart playlist manipulation by date added to database. Updated mt-daapd.playlist to match 2004-09-12 23:20:29 +00:00
David W. Berry
9492a64846 1. Implement browse and query. These are both still somewhat experimental
pending further verification against iTunes.  --enable-browse and
    --enable-query must be specified to configure to enable both options.
    browse support requires query support.
2.  Database iteration is now sorted and the database is not kept locked
    as long during iteration.
2004-06-14 19:01:06 +00:00
Ron Pedde
d895dc8b41 bumper patch from dwb 2004-05-21 13:56:04 +00:00
Ron Pedde
7ba8f31273 Get rid of the update stuff, and the web server shutdown that sometimes hangs 2004-05-10 03:31:11 +00:00
Ron Pedde
4370cb960c Seeking working on iTunes 4.5 2004-04-28 23:51:26 +00:00
Ron Pedde
3978d0932c More fixes for iTunes 4.5 2004-04-28 18:55:22 +00:00
Ron Pedde
3d2c60572d Updates for iTunes 4.5. Some problems with seeking on mac, though 2004-04-28 18:45:56 +00:00
Ron Pedde
8ef12d52f6 Fix for out of stack space on large music libraries 2004-04-22 04:20:30 +00:00