771 Commits

Author SHA1 Message Date
Justin Maggard
0d224a4607 upnpsoap: Add SEC namespace
Declare Samsung namespace where appropriate.
2018-01-03 23:01:46 -08:00
Justin Maggard
8b06ea863d minixml: Fix parsing error with extra whitespace
If there is extra whitespace, the iterator would not get moved properly
resulting in incomplete data.
2018-01-02 16:27:10 -08:00
Justin Maggard
2ad098fd69 Remove test code from last commit. 2017-11-29 23:52:57 -08:00
Justin Maggard
782e99873a upnphttp: Don't select an empty interface address
When determining which address to present to the client for a resource
URL, we should never use an empty string.
2017-11-29 23:31:36 -08:00
Justin Maggard
ad5d6413a7 If no group is specified, use the user's primary group 2017-10-06 16:05:01 -07:00
david reid
7a27ce3077 Add the ability to set the group to run as. 2017-08-25 17:45:20 -07:00
Justin Maggard
6819c6a186 Merge /u/jkrueger1/minidlna/ branch master into master
https://sourceforge.net/p/minidlna/git/merge-requests/16/
2017-08-26 00:40:41 +00:00
Justin Maggard
c760a338e0 Wrap up version 1.2.1. 2017-08-24 10:28:25 -07:00
Justin Maggard
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
Justin Maggard
9e534c56fd monitor: Support NFO file changes
Detect when a .nfo file changes, and rescan metadata for the associated
video file.
2017-08-22 15:30:10 -07:00
Justin Maggard
c8665bcf40 containers: Add Samsung DCM10 magic containers
Some Samsung clients (at least UE40ES8000) apparently cannot handle our
standard container IDs when we turn on the DCM10 feature. So they end up
requesting an empty ObjectID, which is invalid. If we blindly return our
root container, they still have problems browsing because they only use
one object from our returned results, so they don't get a full list of
browseable categories.

It has been confirmed that we can work around this by using the same
ObjectIDs that Samsung uses for our root containers in our
X_GetFeatureList response (A, V, and I). And fortunately it's trivial to
handle these renamed ObjectIDs using our magic container system.

Fixes: SF Bug #311 (Samsung TV built-in DLNA client broken since v1.1.5)
2017-08-22 12:28:42 -07:00
Justin Maggard
37346fb0a0 events: Limit subscriber count
Protect against DoS by limiting the number of subscribers we allow to a
total of 500, and immediately removing subscribers from our list if we
encounter an error communicating with them.
2017-08-22 12:20:38 -07:00
Justin Maggard
14d0110fb4 upnpsoap: Add extra thumnail res for Samsung video thumbnails
It's been reported that modern Samsung TVs (Series F?) won't show video
thumbnails unless they're listed as JPEG_SM. So add an extra entry for
that.
2017-07-28 18:14:52 -07:00
ynilu
914ac12302 ssdp: Fix UDP sendto bug
The size of the client address may be modified by recfrom.
So, the last parameter of sendto should be the modified size.
2017-07-28 17:47:51 -07:00
Justin Maggard
ca08f4540f metadata: Fix NFO parsing
The switch to dymanic allocation was botched. Fix it.
2017-07-28 17:28:15 -07:00
Justin Maggard
4df5400cb1 tivo: Fix Bonjour compatibility with Bolt
Bolt (Series6) seems to have a bug where it only reacts to
_tivo-videostream._tcp service types after a TiVo reboot, and ignores
_tivo-vidoes._tcp.  I have no idea what the difference is supposed to be
because it's undocumented, but either type works on both Roamio (Series5)
and Bolt, so hopefully it's safe for Series 3 and 4 also.
2017-07-26 16:00:20 -07:00
Vladislav Grishenko
b0cd672abf ssdp: fix M-SEARCH replies on non-linux OS and drop broadcast receiving due no read
On Darwin & *BSD binding to mcast address may force NITIFY packet send from
 this mcast address, not from primary interface address. Therefore subsequent
 NOTIFY packets might be ignored by some clients, including Samsung Smart TV
 and they will stop & disconnect after initial max-age timeout.

 SO_BROADCAST on notify packets is not needed, because there's no broadcasted
 M-SEARCH packets and notify socket queue is never read.
2017-05-25 17:38:36 -07:00
Justin Maggard
d9f033aa43 clients: add Movian detection and enable subtitles 2017-05-20 00:16:33 -07:00
Justin Maggard
c50936c347 Wrap up version 1.2.0. 2017-05-17 13:55:17 -07:00
Justin Maggard
46c692fc59 metadata: Reduce stack usage in nfo parsing
64KB is a bit much for a stack buffer.  Use dynamic allocation instead.
2017-05-17 13:55:13 -07:00
Justin Maggard
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
Justin Maggard
2b3bdb8373 utils: Move duration formatting to shared function
We'll be using this a few different places.
2017-05-17 11:56:44 -07:00
Justin Maggard
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
Jindřich Makovička
5450ac486e clients: Add media extension to titles for Hyundai TVs
On Hyundai HLN 24TS382 Smart TV, the DLNA client refuses to display
media files whose title does not end with a media file extension.
Because minidlna strips the extensions, all folders thus appear empty.

This patch adds a quirk for Hyundai TVs that appends the original file
extension to the titles, which fixes the issue.
2017-05-02 15:22:40 -07:00
Justin Maggard
46d806ce2d Document the new tivo_discovery config parameter 2017-05-01 18:42:24 -07:00
Justin Maggard
d894885bc1 clients: Improve Samsung BD-J5500 support
From SF user Andrea Odetti:

The Samsung BD J5500 player does not accept some of the DLNA_PN values
used by minidlna for *.mp4 files.

For instance AVC_MP4_MP_HD_720p_AAC and AVC_MP4_BL_L31_HD_AAC are
problematic as the player would simply ignore the files and not show
them.

AVC_MP4_HP_HD_AAC works.

All the files play normally from a USB key.

I've noticed as well that NULL works always, and this is the approach I
have followed.

So I changed minidlna and added a flag to disable DLNA_PN, and this
flag is only used for a Samsung BD J5500 in order not to break other
players, which can handle DLNA_PN properly.

So when a J5500 is connected we simply set DLNA_PN to NULL and
everything works well.
2017-05-01 17:49:16 -07:00
Justin Maggard
f816911f0c metadata: Fix potential crash on 3GP scanning
If we encounter a 3GP video file with no audio stream, we could end up
accessing out-of-bounds memory.
2017-05-01 17:40:20 -07:00
Justin Maggard
da7d868c4b build: Fix up some conditional code
Avahi and Ogg/Vorbis library conditional enablement wasn't working as
intended.
2017-05-01 15:04:44 -07:00
Justin Maggard
cee5cfc04e avahi: Clean up code formatting 2017-05-01 15:04:25 -07:00
Justin Maggard
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
Justin Maggard
58a5f61d46 inotify: Don't export unused function
We don't need to export inotify_remove_file(), since it isn't used
anywhere else.
2017-04-28 01:17:18 -07:00
Justin Maggard
f76f060f72 libav: Fix codecpar version check
FFmpeg 3.0, as used on Ubuntu Yakkety, did not include the codecpar
changes, although it uses the same library major version. So refine the
libavformat version check to sort that out.
2017-03-16 12:09:59 -07:00
Justin Maggard
10ae45f53f upnpdescgen: Remove unused variables 2017-03-16 12:09:59 -07:00
Justin Maggard
2301120dd0 inotify: Dynamically increase inotify max watches
If we run out of inotify watches, try dynamically increasing the limit.
2017-02-14 23:54:33 -08:00
Justin Maggard
44f06f4557 inotify: Declare private functions static 2017-02-14 23:24:16 -08:00
Jens Krueger
84793e4ae6 Fix typo in configuration man page. 2016-10-21 23:28:31 +02:00
Justin Maggard
8a996b4b62 upnphttp: Kill strange HTTP request parsing
Avoid reading uninitialized memory on malicious HTTP requests.

Fixes: Bug #293 - upnphttp.c ProcessHttpQuery_upnphttp() Function HTTP Request Handling Remote DoS
2016-09-28 18:44:58 -07:00
Justin Maggard
da91cb8de2 metadata: add libavformat > 57 compatibility
AVStream will no longer have a AVCodecContext reference after
libavformat major version 57.
2016-09-28 15:02:18 -07:00
Justin Maggard
d1cd7c7a4a Wrap up version 1.1.6. 2016-06-16 14:29:22 -07:00
Justin Maggard
1f46b53030 Remove obsolete PNPX support.
AFAICT this has been abandoned by Microsoft.
2016-04-21 14:38:45 -07:00
Justin Maggard
02b6085380 clients: Add AllShare and Windows detection
Reporting Samsung features to Windows and AllShare somehow makes them
ignore us, so detect these client types specifically and don't expose
Samsung capabilities to them.
2016-04-21 14:31:53 -07:00
Darkvater
5339075393 Update support for LG2012 TV
LG 2012 series does not need '.' in title anymore to be able to show
captions
2016-03-17 14:48:05 -07:00
Eduardo Rocha
126f0f5cb8 Samsung bookmark - go back to the beginning of the movie if less than 30 seconds was played. 2016-03-17 14:48:05 -07:00
Eduardo Rocha
cae3e880d2 Samsung bookmarking: fix for magic containers 2016-03-17 14:48:05 -07:00
Justin Maggard
abc1972600 inotify: fix SQL error when moving captions
Change INSERT to INSERT OR REPLACE when recording caption file moves,
to avoid UNIQUE constraint failures.
2016-03-17 14:48:05 -07:00
Darkvater
910b84bcd6 inotify: missing include file 2016-03-17 14:48:05 -07:00
Justin Maggard
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
Justin Maggard
4ec6cd0053 upnpsoap: Fix external subtitles on Samsung Series J.
Add FLAG_CAPTION_RES to the modern Samsung profile.  Older Samsung
devices used a custom method for describing subtitles, but apparently
Series J no longer supports it.  The good thing is, they now support
the more standard method (and probably have been for a while, since it
works on my old Series D BDP).

So let's just expose both methods to the client, since everything should
be able to handle it.

Fixes: SF bug #113 (Subtitles support for new 2015 Samsung J series TV)
2016-01-07 00:39:37 -08:00
Justin Maggard
1c5e9ae61c containers: Add gettext support for magic containers.
Run the magic contain names through gettext, so they can get localized.
2015-12-21 11:49:07 -08:00
Justin Maggard
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