Commit Graph

728 Commits

Author SHA1 Message Date
cae3e880d2 Samsung bookmarking: fix for magic containers 2016-03-17 14:48:05 -07:00
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
910b84bcd6 inotify: missing include file 2016-03-17 14:48:05 -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
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
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
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
e008ab04bb Wrap up version 1.1.5. 2015-09-10 12:24:09 -07:00
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
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
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
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
916546d45f tagutils: Fix divide-by-zero on bad FLAC files 2015-09-08 14:46:24 -07:00
cfab9bd056 locale: Add Korean translations.
Thanks SF user manggong.
2015-08-05 10:28:47 -07:00
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
f85f5afe65 upnphttp: Fix inadvertently removed line from 8e201fe. 2015-08-02 23:51:07 -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
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
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
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
b78c25f260 upnpsoap: Use magic container sort order.
Magic containers can have a pre-defined sort order.  Let's use it by default if
it exists.
2015-07-30 15:10:03 -07:00
5a309fc48f inotify: Recognize new hard links.
Based on SF patch #139 (Thanks Alenky Klaus).
2015-07-30 14:54:39 -07:00
8e201fec7b upnphttp: Check for invalid Content-Length header. 2015-07-30 13:44:42 -07:00
b94f04d6ef upnpsoap: Work around LG TV ordering bug.
From SF Patch #90:

My LG TV (42LE5500) retrieves items from BrowseDirectChildren in a weird way.
The TV can only display up to 20 items per page, but it sets RequestedCount to
54. StartingIndex is correctly set to 0, 20, 40, ... etc. When minidlna responds
with the 54 entries, the TV sorts folders (containers) first, before items, then
displays the entries, limited to 20 per page.

In my setup, I have ~23 folders whose names are similar to the files, so that
when sorting by name, the folders are mixed with the files, thereby resulting in
duplicate folders appearing on all 3 pages and many missing files. The solution
is to make sure minidlna orders items the same way that the TV expects them, so
that when the StartingIndex is 20 or more, we return the "correct" subset of
items.

Thanks SF user Darell Tan for the fix.
2015-07-29 23:58:21 -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
30562d0b66 upnpttp: Implement PixelShape support.
TiVo uses this to get the aspect ratio correct on images.
2015-07-29 23:23:55 -07:00
9c5d8c7fd2 Fix memory leak with multi-picture FLAC files.
On my music archive, minidlnad wasn't anywhere near through scanning,
and had already leaked in excess of 10GiB from this.

The basic problem is that song_metadata has one image pointer. When it
sees a picture metadata item, it mallocs some space and copies the
picture to that, then sets the image pointer. That's all well and good,
except FLAC (and some other formats, haven't checked them) allow more
than one picture. So on the second picture, it does the same
thing—except overwriting the previous pointer, thus leaking it.

Simple fix: check if != NULL, ignore picture.

Signed-off-by: Justin Maggard <jmaggard@netgear.com>
2015-07-14 23:11:07 -07:00
a294f624e0 inotify: Fix new video file detection for TYPE_AUDIO|TYPE_VIDEO media_dirs.
We were missing a return in one of the cases for the switch.

Patch #150 from user Shrimpkin.
Fixes: Support Request #40 (Inotify don't work when add *.mts video)
2015-06-26 00:03:31 -07:00
13d36533b5 cleanup: Declare some unshared functions static. 2015-04-10 15:47:28 -07:00
c1bb37a387 clients: Re-enable Samsung DCM10 flag.
The browsing issue that was reported on Samsung Series F was
actually only present when a custom root container was being
specified (http://sourceforge.net/p/minidlna/patches/121/).

So instead of disabling DCM10, fix our X_GetFeatureList
response when a custom root container is set.  If the custom
root is Browse Folders, then drop the user straight to
folder browsing for that media type.  If it's something
other than folder browsing, just set all media type roots to
the custom root container.

For future reference, the DCM10 flag enables (at least)
video bookmark support and Samsung "BasicView" support; so
selecting, for example, Videos from the Samsung UI can send
you straight to the Videos section of the media library.
2015-04-10 15:33:09 -07:00
6630671af0 images: Set DCT method to JDCT_IFAST. 2015-04-10 15:32:32 -07:00
ec11819012 upnpsoap: Don't honor the NO_RESIZE flag for thumbnails
Some images don't include an embedded thumbnail, and others
have the thumbnail in the wrong aspect ratio.  In these
cases we resize ourselves, which we should allow to occur
regardless of the NO_RESIZE flag.
2015-04-09 16:57:08 -07:00
0845c2193b tivo: Fix title and description escaping. 2015-04-08 23:38:38 -07:00
e165dbf7a9 metadata: Properly escape episode titles from nfo files. 2015-04-08 23:27:47 -07:00
f09f441607 upnpsoap: Handle StartingIndex on magic containers
We need to subtract StartingIndex when we limit SQL query
results based on the max number of items in a magic container.
2015-04-08 01:21:21 -07:00
f18c3cee6f image: Improve resize quality at the edges.
get_pix() returns opaque black pixels for out-of-bounds coordinates, resulting
in spurious averages at the edges. The attached patch appears to fix the
problem, at least for the floating-point resizers.

From SF user R.L. Horn.
2015-02-09 18:01:54 -08:00
24fb139678 metadata: Use "Album Artist" tag from AAC files.
Add Album Artist AAC metadata parsing contributed by SF user knono549.
Then, change music metadata gathering code to use either Album Artist
or Band as upnp:artist.
2015-02-03 17:22:32 -08:00
3c4c35b49c upnpsoap: Use scaled thumbnails when rotation is needed
Embedded thumbnails may have an undesirable orientation, so
we should do our own scaling with inline rotation if the
thumbnail image needs to be rotated.
2014-12-11 17:03:35 -08:00
7fe24ae1bc Wrap up version 1.1.4. 2014-08-26 14:09:22 -07:00
75a697a671 upnpttp: factor out basic header generation 2014-07-25 18:26:02 -07:00
04c8730dae clients: reduce log level of some debug messages 2014-07-25 18:25:45 -07:00
2caa05f69a Update NEWS. 2014-07-18 15:36:36 -07:00
b1cd1b5413 upnphttp: fix requests for the last byte of a file
Philips TV's apparently do this with MKV files (SF bug #180).
2014-07-18 12:27:39 -07:00
5b3c6a3645 upnphttp: declare a couple functions static 2014-07-18 12:26:30 -07:00
24ec6d24fb Merge branch 'master' into ffmpeg 2014-07-11 18:17:33 -07:00
44810ab274 Stub out NLS function. 2014-07-11 18:16:33 -07:00
255bb2a5c4 tagutils-aac: fix bad null termination
SF bug #244, patch #119
2014-07-11 17:20:41 -07:00