Help with recursive directory adding

  • Anonymous - 2010-11-01

    I've been searching for an answer to this with no luck, so hopefully I'm not repeating an earlier question.  When I am adding media to MT 0.12.1, I click on a main directory in Filesystem view, select Timed, Full, Recursive and a scan interval of the default 1800.  It then scans and adds all media to MT, but in a somewhat random order.  As an example:

    The main directory is called "TV".  In that I have a directory called Batman The Animated Series, which in turn has 4 directory inside of that - Season 1, Season 2, Season 3, Season 4.  Also in the TV directory is another sub, called Battlestar Galactica.  This has no subdirectories inside of it:
    ---Batman The Animated Series
    ----Season 1
    ----Season 2
    ----Season 3
    ----Season 4
    ---Battlestar Galactica

    What I get when I do a recursive scan on "TV" is the following:
    ---All Video
    ----Batman The Animated Series
    -----Season 2
    -----Season 4
    ----Season 1
    ----Season 3
    -----Battlestar Galactica

    Any idea why it's not nesting properly?

  • Lyall Pearce

    Lyall Pearce - 2010-11-24

    A couple of questions.
    What OS are you running MediaTomb on?
    What file system type is the TV folder in?
    What is the back-end storage of MediaTomb? I use mysql

    Personally, I use 'Scan Mode=inotify, Initial Scan=Full, Recursive'
    I am running under Gentoo Linux and use NTFS filesystem to contain my directories.

    Maybe it's a problem with your MediaTomb config, here is mine…

    <?xml version="1.0" encoding="UTF-8"?>
    <config version="2" xmlns="" xmlns:xsi="" xsi:schemaLocation="">
        <ui enabled="yes" show-tooltips="yes">
          <accounts enabled="no" session-timeout="30">
            <account user="mediatomb" password="mediatomb"/>
        <name>Lyalls Media</name>
        <storage caching="yes">
          <sqlite3 enabled="no">
          <mysql enabled="yes">
        <protocolInfo extend="yes"/>
        <pc-directory upnp-hide="no"/>
        <extended-runtime-options><!-- 0.1.12 upwards -->
          <ffmpegthumbnailer enabled="yes">
          <mark-played-items enabled="yes" suppress-cds-updates="yes">
            <string mode="prepend">*</string>
          <lastfm enabled="no">
      <import hidden-files="no">
        <scripting script-charset="UTF-8">
          <virtual-layout type="builtin">
          <extension-mimetype ignore-unknown="yes">
            <map from="mp3" to="audio/mpeg"/>
            <map from="m4a" to="audio/mp4"/>
            <map from="m4v" to="video/mp4"/>
            <map from="mov" to="video/x-quicktime"/>
            <map from="ogx" to="application/ogg"/>
            <map from="ogv" to="video/ogg"/>
            <map from="oga" to="audio/ogg"/>
            <map from="ogg" to="audio/ogg"/>
            <map from="ogm" to="video/ogg"/>
            <map from="asf" to="video/x-ms-asf"/>
            <map from="asx" to="video/x-ms-asf"/>
            <map from="wma" to="audio/x-ms-wma"/>
            <map from="wax" to="audio/x-ms-wax"/>
            <map from="wmv" to="video/x-ms-wmv"/>
            <map from="wvx" to="video/x-ms-wvx"/>
            <map from="wm" to="video/x-ms-wm"/>
            <map from="wmx" to="video/x-ms-wmx"/>
            <map from="m3u" to="audio/x-mpegurl"/>
            <map from="pls" to="audio/x-scpls"/>
            <map from="flv" to="video/x-flv"/>
            <map from="mkv" to="video/x-matroska"/>
            <map from="mka" to="audio/x-matroska"/>
            <map from="avi" to="video/divx"/>
            <map from="m2ts" to="video/avc"/>
            <map from="cr2" to="image/raw"/>
            <map from="nef" to="image/raw"/>
            <map from="raw" to="image/raw"/>
            <map from="CR2" to="image/raw"/>
            <map from="NEF" to="image/raw"/>
            <map from="RAW" to="image/raw"/>
            <map from="audio/*" to="object.item.audioItem.musicTrack"/>
            <map from="video/*" to="object.item.videoItem"/>
            <map from="image/*" to="object.item.imageItem"/>
            <treat mimetype="audio/mpeg" as="mp3"/>
            <treat mimetype="application/ogg" as="ogg"/>
            <treat mimetype="video/ogg" as="ogg"/>
            <treat mimetype="audio/ogg" as="ogg"/>
            <treat mimetype="audio/x-flac" as="flac"/>
            <treat mimetype="image/jpeg" as="jpg"/>
            <treat mimetype="audio/x-mpegurl" as="playlist"/>
            <treat mimetype="audio/x-scpls" as="playlist"/>
            <treat mimetype="audio/x-wav" as="pcm"/>
            <treat mimetype="audio/L16" as="pcm"/>
            <treat mimetype="video/x-msvideo" as="avi"/>
            <treat mimetype="video/mp4" as="mp4"/>
            <treat mimetype="audio/mp4" as="mp4"/>
            <treat mimetype="video/divx" as="avi"/>
            <treat mimetype="video/quicktime" as="mov"/>
            <treat mimetype="video/x-quicktime" as="mov"/>
          <YouTube enabled="no" refresh="28800" update-at-start="no" purge-after="604800" racy-content="exclude" format="mp4" hd="no">
            <favorites user="mediatomb"/>
            <standardfeed feed="most_viewed" time-range="today"/>
            <playlists user="mediatomb"/>
            <uploads user="mediatomb"/>
            <standardfeed feed="recently_featured" time-range="today"/>
          <Weborama enabled="no" refresh="28800" update-at-start="no">
            <playlist name="Active" type="playlist" mood="active"/>
            <playlist name="Metal" type="playlist">
          <AppleTrailers enabled="no" refresh="43200" update-at-start="no" resolution="640"/>
      <transcoding enabled="yes">
          <transcode mimetype="application/ogg" using="audio2pcm"/>
          <transcode mimetype="application/ogg" using="video2jpeg"/>
          <transcode mimetype="audio/x-flac" using="audio2pcm"/>
          <transcode mimetype="video/x-flv" using="video2jpeg"/>
          <transcode mimetype="video/quicktime" using="video2jpeg"/>
          <transcode mimetype="video/x-flv" using="video2jpeg"/>
          <transcode mimetype="video/x-matroska" using="video2mpeg"/>
          <transcode mimetype="video/divx" using="video2jpeg"/>
          <transcode mimetype="video/x-ms-asf" using="video2jpeg"/>
          <transcode mimetype="video/x-ms-wmf" using="video2jpeg"/>
          <transcode mimetype="image/raw" using="raw2jpeg"/>
          <profile name="audio2pcm" enabled="yes" type="external">
            <agent command="ffmpeg" arguments="-i %in -acodec pcm_s16be -ab 192k -ar 44100 -ac 2 -f s16be -y %out"/>
            <buffer size="1048576" chunk-size="131072" fill-size="262144"/>
    <!--profile name="video2mpeg" enabled="yes" type="external">
            <agent command="/usr/local/bin/" arguments="%in %out"/>
            <buffer size="10485760" chunk-size="262144" fill-size="524288"/>
    <!-- Required for 0.11.0
          <profile name="video2jpeg" enabled="yes" type="external">
            <agent command="ffmpegthumbnailer" arguments="-i %in -o %out -s 160"/>
            <buffer size="524288" chunk-size="512" fill-size="1024"/>
          <profile name="video2mpeg" enabled="yes" type="external">
            <agent command="ffmpeg" arguments="-i %in -vcodec mpeg2video -b 4096k -r 25 -acodec mp2 -ab 192k -ar 48000 -ac 2 -async 1 -f dvd -threads 2 -y %out"/>
            <buffer size="10485760" chunk-size="262144" fill-size="524288"/>
          <profile name="raw2jpeg" enabled="yes" type="external">
            <agent command="/usr/local/bin/" arguments="%in %out"/>
            <buffer size="524288" chunk-size="512" fill-size="1024"/>
  • berky

    berky - 2012-09-30

    I realize this thread is old, but i'm having a similar but different issue.

    I have a "TV" directory that has sub-directories of each TV show. I set the TV directory to be scanned with 'recursion' turned on.

    under the 'database' -> 'video' directory, it lists it like the following:

    - TV
    --- TV show 1
    --- TV show 2
    --- TV show 3


    however, say I add a new episode ( to TV show 2's directory.
    When Mediatomb rescans, it now looks like this:

    - TV show 2
    - TV
    --- TV show 1
    --- TV show 2
    --- TV show 3

    If I delete the entire database and rescan it all in, they all show up under "TV", but the same thing happens again when adding a new episode.  I don't care if they all are their own directories under "video" or if they all show up under "TV".  I just want it to be consistent.  I didn't have this problem before, but it randomly started doing this a while ago… i've just been dealing with it, but it's really getting annoying.

    Anyone have any ideas?

  • berky

    berky - 2012-10-20

    So I switched to mysql and still have the same issue.  I also tried setting the scan to basic, with the same results.  So far I cannot find a solution to this.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks