Commit Graph

137 Commits

Author SHA1 Message Date
50b1a2e289 scanner: Clean up non-destructive rescan
Fix several issues with the non-destructive rescan functionality.
Most of these issues also affected inotify scanning as well.  These
include annoying debug messages, adding album art for files that we
aren't supposed to be scanning anyway, incrementing the UpdateID when no
changes were made to the database, and other smaller issues.
2017-08-23 23:43:42 -07:00
4f926639b2 upnpsoap: Add additonal bookmark support
Add support for upnp:playbackCount and upnp:lastPlaybackPosition tags.
These are used by Kodi to keep track of bookmark information as well as
determining whether to show the checkmark to indicate that the video
has been played.

Also add support for the UpdateObject command, which Kodi uses to
update the playbackCount and lastPlaybackPosition information.

This change requires a DB schema update, which should be done
automatically on the first run.

Inspired by SF user Karsten's patch #167.
2017-05-17 12:01:04 -07:00
49aa42d893 scanner: Add non-destructive update rescan
New functionality, based on Shrimpkin's patch #145 on SF.
2017-05-04 23:29:59 -07:00
0575299a87 tivo: Add Avahi support
TiVo Bolt doesn't support the old TiVo Beacon discovery mechanism, so
we need to support Bonjour discovery now.  Use Avahi if it's available.
2017-04-28 01:18:53 -07:00
1f46b53030 Remove obsolete PNPX support.
AFAICT this has been abandoned by Microsoft.
2016-04-21 14:38:45 -07:00
c4166b3e77 options: Add wide_links config option.
In some environments, it makes sense to validate that symlink destinations
remain inside user-defined media_dirs.  Make this behavior configurable.
2016-03-17 14:48:05 -07:00
520de165fb nls: Rework NLS init to work with non-en_US locales.
We shouldn't blindly set the LC_CTYPE to en_US.utf8, because the user may
not have it installed.  So if the user already has a utf8 locale defined,
just use it for LC_CTYPE.

Fixed: SF Bug #87 (Problem of accentuation)
2015-12-21 11:45:10 -08:00
c985eee9c7 inotify: Block signals in the inotify thread.
Otherwise, we may get invalid reads due to double-handling of signals.
2015-12-21 11:43:38 -08:00
d097d3c02d nls: Move init_nls() after log_init().
Otherwise the DPRINTF in minidlna.c:init_nls() will always fail to log.
Pointed out by Shrimpkin.
2015-11-16 09:57:07 -08:00
c160a8c8fd Fix a couple missed frees on exit.
There were harmless, but we should fix them for correctness.
2015-09-10 11:55:54 -07:00
98fbb5b98b Fix error message for bad user.
SF Patch #126 (Thanks Maxim).
2015-07-30 16:40:59 -07:00
e7ec55a2ad getifaddrs: Fix buffer overrun with >3 interfaces. 2015-07-30 16:25:48 -07:00
edbdd9acb4 ssdp: Fix service submit to MiniSSDPd.
SubmitServicesToMiniSSDPD(lan_addr[0].str, runtime_vars.port)
is called before lan_addr[0].str get a proper value.
Patch add call to reload_ifaces() in order to fix that
see miniupnp forum post http://miniupnp.tuxfamily.org/forum/viewtopic.php?t=1801

Thanks Thomas Bernard for this fix.
2015-07-29 23:44:45 -07:00
44810ab274 Stub out NLS function. 2014-07-11 18:16:33 -07:00
a01ffa1787 Fixes for client cache restructuring. 2014-06-17 18:38:36 -07:00
a46a8e5e89 process: associate open connections with clients 2014-06-09 18:48:49 -07:00
34cb08928c portability: add support for Illumos
This still won't work on older Solaris systems, but modern Illumos
at least should build and run now.
2014-05-14 17:53:25 -07:00
8e05f9b6f7 Allow the user to specify an arbitrary root container. 2014-04-29 16:12:42 -07:00
5676a17204 cleanup: remove unnecessary sbeacon set 2014-04-11 12:51:16 -07:00
3a57744735 Add printf attribute to log_err/DPRINTF and fix a few warnings
Modified to not use %z for portability reasons.
2014-04-10 18:57:30 -07:00
435bd3d04d Use SERVER_NAME variable when checking for existing process. 2014-03-17 11:41:10 -07:00
cce9a012b3 config: add merge_media_dirs option
By default, if there are multiple media directories specified, there
will be entries for each one in the root directory container.  If
there is only one media directory specified, then just its contents
will be in the root container, to save one level of browsing.

Setting this option changes the default behavior so that multiple
media dirs will behave like a single media dir.
2014-03-12 11:40:49 -07:00
7c0739ad3f config: introduce strtobool() helper. 2014-03-12 11:32:09 -07:00
a606012d23 Fix Clang compiler warnings. 2014-03-07 12:42:40 -08:00
5cddc8fb4d print usage and bail if the user gives an unknown command line option 2014-03-03 16:04:46 -08:00
1a78a94f70 process: make max number of children (connections) configurable
At least some Panasonic clients try to open more than 5 simultaneous
connections to the server.  If we keep the default of 5 max children,
it results in choppy playback on those clients.

Make this setting configurable, and default to 50 max connections.
Our process is pretty lightweight, so 50 children should not be a
problem on most systems.
2014-03-03 13:32:20 -08:00
372afa1ae6 cosmetic: whitespace cleanup 2014-03-03 13:28:31 -08:00
6cef303fc1 try to ensure proper ownership of db_dir
If user has been set, try to ensure that db_dir is owned by that user.
If that fails, log an error.
2014-02-27 15:47:02 -08:00
fe7c26da2f ssdp: send a full byebye + alive set when a new interface comes online
If an interface comes online after startup, we really need to send a
complete byebye + alive set on that interface, but we don't want to do
it for other interfaces.  So do it as the interfaces come up, and
skip it for interfaces that existed before the reload.
2014-02-26 15:04:46 -08:00
a7c8ffb88d cosmetic: whitespace cleanup 2014-02-26 12:37:14 -08:00
3f4877cf2f Add a new force_sort_criteria option, to globally override the SortCriteria value sent by the client. 2014-01-07 11:30:15 -08:00
622b0b7411 Merge branch 'for-justin' of git://github.com/BenoitKnecht/minidlna 2013-11-01 17:57:00 -07:00
c96e6e2adb Skip the initial ssdp:alive packets when initially registering our network
interfaces during startup, so the byebye's can come first.
2013-10-22 18:50:09 -07:00
3995cbdac4 Limit the number of simultanious children
Make sure minidlna cannot fork more than 5 children, to avoid becoming a
fork bomb.

Reported-by: Rinat Ibragimov <ibragimovrinat@mail.ru>
2013-06-20 19:31:34 +02:00
1c34c6c594 Update help output shown by "minidlna -h".
Reported-by: (and original version by) Benoît Knecht <benoit.knecht@fsfe.org>
2013-06-11 15:24:53 -07:00
62b6e235b1 Don't require a configured network interface to start up, and add network interface monitoring support on Linux. 2013-05-08 23:52:02 -07:00
1e4cf74436 * Enable all network interfaces by default if none were specified. 2013-04-30 21:09:30 +00:00
f06a93c17a * Store the media type in the TIMESTAMP column, so we can force a rescan if the user changes the media type configuration. 2013-01-02 21:00:52 +00:00
2521b3f238 * Force a rescan if a media_dir has been removed from the configuration. 2012-11-16 08:06:24 +00:00
1320eb4ea6 * Update coding style. 2012-11-16 08:01:05 +00:00
aee83a3ee6 * Improve how we clean up after ourselves during exit. 2012-11-16 07:40:40 +00:00
035fd35ffd * Fix up bad accesses found by valgrind. 2012-11-06 08:24:37 +00:00
2e120e83a0 * Add some logging and forking tweaks to work better with systemd. 2012-10-04 21:04:36 +00:00
584258c1f8 * Add support for limiting a media dir to multiple media types. 2012-10-03 07:26:00 +00:00
1de4ef8bc1 * Add configuration option to specify the user to run as. 2012-07-18 18:58:26 +00:00
5f14c68597 * Streamline some TiVo ifdefs. 2012-06-30 00:26:55 +00:00
bca5a24a57 * Force a rescan if a new media_dir is detected. 2012-05-22 22:38:29 +00:00
110300b44e * Listen for SIGCHLD while scanning, so we can immediately add inotify watches after a scan. 2012-05-17 07:49:24 +00:00
a41c137e1f * Add manual configuration of the UUID. (Thanks Fred Dullemond) 2012-05-16 01:28:58 +00:00
755c81fd34 * Forcibly tweak the model number for Xbox360 clients, or they might ignore us. 2012-04-04 18:24:21 +00:00