867 Commits

Author SHA1 Message Date
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
Justin Maggard
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
Justin Maggard
5a309fc48f inotify: Recognize new hard links.
Based on SF patch #139 (Thanks Alenky Klaus).
2015-07-30 14:54:39 -07:00
Justin Maggard
8e201fec7b upnphttp: Check for invalid Content-Length header. 2015-07-30 13:44:42 -07:00
Justin Maggard
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
Justin Maggard
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
Justin Maggard
30562d0b66 upnpttp: Implement PixelShape support.
TiVo uses this to get the aspect ratio correct on images.
2015-07-29 23:23:55 -07:00
Anthony DeRobertis
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
Justin Maggard
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
Justin Maggard
13d36533b5 cleanup: Declare some unshared functions static. 2015-04-10 15:47:28 -07:00
Justin Maggard
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
Justin Maggard
6630671af0 images: Set DCT method to JDCT_IFAST. 2015-04-10 15:32:32 -07:00
Justin Maggard
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
Justin Maggard
0845c2193b tivo: Fix title and description escaping. 2015-04-08 23:38:38 -07:00
Justin Maggard
e165dbf7a9 metadata: Properly escape episode titles from nfo files. 2015-04-08 23:27:47 -07:00
Justin Maggard
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
Justin Maggard
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
Justin Maggard
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
Justin Maggard
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
Justin Maggard
7fe24ae1bc Wrap up version 1.1.4. 2014-08-26 14:09:22 -07:00
Justin Maggard
75a697a671 upnpttp: factor out basic header generation 2014-07-25 18:26:02 -07:00
Justin Maggard
04c8730dae clients: reduce log level of some debug messages 2014-07-25 18:25:45 -07:00
Justin Maggard
2caa05f69a Update NEWS. 2014-07-18 15:36:36 -07:00
Justin Maggard
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
Justin Maggard
5b3c6a3645 upnphttp: declare a couple functions static 2014-07-18 12:26:30 -07:00
Justin Maggard
24ec6d24fb Merge branch 'master' into ffmpeg 2014-07-11 18:17:33 -07:00
Justin Maggard
44810ab274 Stub out NLS function. 2014-07-11 18:16:33 -07:00
Justin Maggard
255bb2a5c4 tagutils-aac: fix bad null termination
SF bug #244, patch #119
2014-07-11 17:20:41 -07:00
Justin Maggard
8029921884 containers: add magic container infrastructure
Add support for dynamic containers, with enough flexibility to also
replace our existing container ID replacement functionality.
2014-07-01 17:08:18 -07:00
Justin Maggard
95bbedb196 upnpsoap: factor out some duplicated code. 2014-06-27 12:59:50 -07:00
Justin Maggard
c226e615ad upnpsoap: factor out ObjecID translation into a separate function. 2014-06-26 18:54:45 -07:00
Justin Maggard
a01ffa1787 Fixes for client cache restructuring. 2014-06-17 18:38:36 -07:00
Justin Maggard
0e55facacd metadata: support 64-bit time_t
OpenBSD moved all machine architectures to long long time_t in the last
release which triggered a crash in minidlna's scanner on 32-bit systems.

Reported-by: Stuart Henderson
2014-06-11 10:23:23 -07:00
Justin Maggard
a46a8e5e89 process: associate open connections with clients 2014-06-09 18:48:49 -07:00
Justin Maggard
e9a653d6e8 clients: restructure client cache 2014-06-09 18:02:03 -07:00
Justin Maggard
173f6a76d7 Wrap up version 1.1.3. 2014-06-05 15:14:30 -07:00
Justin Maggard
7cc2ddedff clients: add NetFront Living Connect support
Add subtitle support for NetFront™ Living Connect middleware-based
clients.  These appear to include devices from Panasonic, Philips,
Vizio, Sony, and probably more.
2014-06-05 13:47:26 -07:00
Justin Maggard
25f6c01f85 clients: remove FLAG_SAMSUNG_DCM10 capability
I'm not entirely sure what this flag enables.  But there are reports
that is breaks browsing on Samsung Series F TV's.  So we'll have to
disable for now, until that gets sorted out by people who actually
have Samsung TV's.
2014-06-05 13:10:51 -07:00
Justin Maggard
bb9d584a86 metadata: get rid of some unnecessary mallocs 2014-05-16 11:07:43 -07:00