Adding files from command line

  • Anonymous - 2011-01-11

    Is there a way to add a file to the library from command line? I see there is an -add option, but that spawns an instance of mediatomb; I already have one running.

  • Anonymous - 2011-01-17

    Is there a better way than something like: mediatomb -add /path/to/file &; PID=$?; sleep 15 && kill $PID

  • Anonymous - 2011-01-19

    I 've done some things directly with the sqlite dabase (var/lib/mediatomb/mediatomb.db), with the sqlite3 util, but you have to know SQL, and mediatomb have to be stopped before editing the database…

    all in all, I thing that just for adding file, the -add flag is waaaaay better, although don't underant why just wait 15 seconds and then kill.


  • Anonymous - 2011-01-19

    aaaah I see :) seems that is put itself as a "foreground daemon" …

  • Giulio Martinat

    Giulio Martinat - 2011-01-19

    I cannot figure out why would you want to kill the process whose pid is the return code of calling `meditomb -add somefile'. That command always returns zero. Luckily, Linux uses process zero only during kernel initialization (). Had it been a valid process number, it could have had potentially devastating effects if run as root

  • Giulio Martinat

    Giulio Martinat - 2011-01-19

    Ok, now I get it. You meant to extract the process PID with $$. Still, it doesn't work on my server, whilst

    mediatomb -P pid.txt -add /home/giulix/pippo.txt & sleep 15 && kill `cat pid.txt` && rm -f pid.txt



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

Sign up for the SourceForge newsletter:

No, thanks