Package: mediatomb
Version: 0.12.1-4
Severity: normal
Tags: upstream patch

Mediatomb does not recognize symbolics links to media files.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

        1. Add directory to Mediatomb's index through web interface.
        2. Select inotify-based autoscanning.
        3. Add appropriate media file to said directory.
           ( cp supportedMedia.avi /indexedMediaDirectory/ )
        4. Create a symlink to said media file within said directory.
           ( cd /indexedMediaDirectory ; ln -s supportedMedia.avi 
linkedMedia.avi )
        5. Browse directory, play content on client device.

   * What was the outcome of this action?

        Regular file is indexed and streamable, symlink is not.

   * What outcome did you expect instead?

        Symlink should be indexed and streamable.
    

Suggested patch attached.


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-2-686-pae (SMP w/1 CPU core)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages mediatomb depends on:
ii  chromium [www-browser]          18.0.1025.151~r130497-1
ii  epiphany-browser [www-browser]  3.4.2-1
ii  iceweasel [www-browser]         10.0.5esr-1
ii  lynx-cur [www-browser]          2.8.8dev.12-2
ii  mediatomb-daemon                0.12.1-4

mediatomb recommends no packages.

mediatomb suggests no packages.

-- debconf-show failed
--- mediatomb-0.12.1.orig/src/autoscan_inotify.cc	2010-03-25 10:58:11.000000000 -0400
+++ mediatomb-0.12.1/src/autoscan_inotify.cc	2012-06-18 02:40:11.000000000 -0400
@@ -281,7 +281,7 @@
                     }
                 }
                 
-                if (adir != nil && mask & (IN_DELETE | IN_DELETE_SELF | IN_MOVE_SELF | IN_CLOSE_WRITE | IN_MOVED_FROM | IN_MOVED_TO | IN_UNMOUNT))
+                if (adir != nil && mask & (IN_DELETE | IN_DELETE_SELF | IN_MOVE_SELF | IN_CLOSE_WRITE | IN_MOVED_FROM | IN_MOVED_TO | IN_UNMOUNT | IN_CREATE))
                 {
                     String fullPath;
                     if (mask & IN_ISDIR)
@@ -312,16 +312,17 @@
                         if (objectID != INVALID_OBJECT_ID)
                             cm->removeObject(objectID);
                     }
-                    if (mask & (IN_CLOSE_WRITE | IN_MOVED_TO))
+                    if (mask & (IN_CLOSE_WRITE | IN_MOVED_TO | IN_CREATE))
                     {
                         log_debug("adding %s\n", path.c_str());
                         // path, recursive, async, hidden, low priority, cancellable
                         cm->addFile(fullPath, adir->getRecursive(), true, adir->getHidden(), true, false);
                         
-                        if (mask & IN_ISDIR)
+                        if (mask & IN_ISDIR && !(mask & IN_CREATE))
                             monitorUnmonitorRecursive(path, false, adir, watchAs->getNormalizedAutoscanPath(), false);
                     }
                 }
+
                 if (mask & IN_IGNORED)
                 {
                     removeWatchMoves(wd);
--- mediatomb-0.12.1.orig/src/content_manager.cc	2010-03-25 10:58:11.000000000 -0400
+++ mediatomb-0.12.1/src/content_manager.cc	2012-06-18 02:03:55.000000000 -0400
@@ -202,7 +202,7 @@
 #ifdef HAVE_MAGIC
     if (! ignore_unknown_extensions)
     {
-        ms = magic_open(MAGIC_MIME);
+        ms = magic_open(MAGIC_MIME|MAGIC_SYMLINK);
         if (ms == NULL)
         {
			 log_error("magic_open failed\n");

Reply via email to