755 Commits

Author SHA1 Message Date
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
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
Justin Maggard
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
Justin Maggard
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
Justin Maggard
e008ab04bb Wrap up version 1.1.5. 2015-09-10 12:24:09 -07:00
Justin Maggard
0da13b33f0 flac: Fix fd leak on bad FLAC files.
Some types of bad FLAC files error out early in the metadata parsing phase,
and we weren't properly deleting the iterator if it errored out at that
point.
2015-09-10 11:58:16 -07:00
Justin Maggard
e4dab2455b scanner: Add more vebose scan error message.
Print the errno in addition to the generic error message.
2015-09-10 11:57:31 -07:00
Justin Maggard
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
Justin Maggard
1b75093a43 ssdp: Allow SSDP M-SEARCH from other subnets
Based on a patch from SF user pasdVn <pasdVn3@gmx.de>.

Rely on the kernel to filter out multicasts from non-member interfaces.
Also get the address of the interface we received the multicast on using
sockopt IP_PKTINFO.

Closes: SF Patch ticket #77.
2015-09-08 15:49:22 -07:00
Justin Maggard
916546d45f tagutils: Fix divide-by-zero on bad FLAC files 2015-09-08 14:46:24 -07:00
Justin Maggard
cfab9bd056 locale: Add Korean translations.
Thanks SF user manggong.
2015-08-05 10:28:47 -07:00
Justin Maggard
8f7e760747 utils: Unescape "&apos;" in .nfo files.
Kodi escapes apostrophes when exporting its database to .nfo files.

Fixes: Bug #271 (Handle &apos in .nfo files)
2015-08-03 00:20:45 -07:00
Justin Maggard
f85f5afe65 upnphttp: Fix inadvertently removed line from 8e201fe. 2015-08-02 23:51:07 -07:00
Justin Maggard
98fbb5b98b Fix error message for bad user.
SF Patch #126 (Thanks Maxim).
2015-07-30 16:40:59 -07:00
Justin Maggard
e7ec55a2ad getifaddrs: Fix buffer overrun with >3 interfaces. 2015-07-30 16:25:48 -07:00
Justin Maggard
c29a9cf52b image: Support rotation of monochrome JPEGs.
Extends the existing 90°-increment rotation support
(i.e. /Resized/ID?rotation=DEG) to monochrome JPEGs.

SF Patch #135 (Thanks R.L. Horn).
2015-07-30 15:53:15 -07:00
Darkvater
f09339d95c Fix an issue in trunk with captions
When a browse command is issued multiple files are returned. As soon as one had a caption, all files were marked as having captions because the flag wasn't cleared.

Signed-off-by: Justin Maggard <jmaggard@netgear.com>
2015-07-30 15:45:53 -07:00
Justin Maggard
acac5fb3bc metadata: Handle cover art streams that come after the video stream.
SF patch #140 (`check_embedded_art` not called when Cover Art at end of file)

Using MP4Box, the Cover Art is added after the video stream.

Thanks Mathieu Malaterre.
2015-07-30 15:35:38 -07:00