I'm using Mediatomb 0.12.1 with Ubuntu 10.10.
Some of my manual objects are deleted on every startup. After enabling debug output I found out that this only affects files that are updated by autoscan. Here's a part of the debug output:
2011-02-25 16:25:19 DEBUG: [../src/content_manager.cc:821] _rescanDirectory(): Rescanning location: /home/media/Musik/Pearl Jam
2011-02-25 16:25:19 DEBUG: [../src/storage/sql_storage.cc:1522] _recursiveRemove(): start
2011-02-25 16:25:19 DEBUG: [../src/storage/sql_storage.cc:1429] _removeObjects(): SELECT "a"."id","a"."persistent","o"."location" FROM "mt_autoscan" a JOIN "mt_cds_object" o ON "o"."id"="a"."obj_id" WHERE "o"."id" IN (97489)
2011-02-25 16:25:19 DEBUG: [../src/storage/sql_storage.cc:1434] _removeObjects(): relevant autoscans!
2011-02-25 16:25:19 DEBUG: [../src/storage/sql_storage.cc:1666] _recursiveRemove(): end
2011-02-25 16:25:19 DEBUG: [../src/storage/sql_storage.cc:1672] _purgeEmptyContainers(): start upnp: ,2501; ui:
2011-02-25 16:25:19 DEBUG: [../src/storage/sql_storage.cc:1710] _purgeEmptyContainers(): upnp-sql: SELECT "a"."id", COUNT("b"."parent_id"),"a"."parent_id","a"."flags" FROM "mt_cds_object" "a" LEFT JOIN "mt_cds_object" "b" ON "a"."id"="b"."parent_id" WHERE "a"."object_type"=1 AND "a"."id" IN ( 2501) GROUP BY a.id
2011-02-25 16:25:19 DEBUG: [../src/storage/sql_storage.cc:1783] _purgeEmptyContainers(): end; changedContainers (upnp): 2501
2011-02-25 16:25:19 DEBUG: [../src/storage/sql_storage.cc:1784] _purgeEmptyContainers(): end; changedContainers (ui):
2011-02-25 16:25:19 DEBUG: [../src/content_manager.cc:1258] addObject(): Adding: parent ID is -333
2011-02-25 16:25:19 DEBUG: [../src/storage/sql_storage.cc:494] addObject(): insert_query: INSERT INTO "mt_cds_object" ("object_type","upnp_class","dc_title","metadata","resources","flags","location","location_hash","mime_type","parent_id","id") VALUES (2,'object.item.audioItem.musicTrack','Pearl Jam - Alive.mp3','dc%3Atitle=Alive&upnp%3Aartist=Pearl%20Jam','0~protocolInfo=http-get%3A%2A%3Aaudio%2Fmpeg%3A%2A&size=5443584&bitrate=16384&duration=00%3A05%3A40&sampleFrequency=44100&nrAudioChannels=2~~',1,'F/home/media/Musik/Pearl Jam/Pearl Jam - Alive.mp3',2879709716,'audio/mpeg',2501,98050)
2011-02-25 16:25:19 DEBUG: [../src/content_manager.cc:1264] addObject(): After adding: parent ID is 2501
2011-02-25 16:25:19 DEBUG: [../src/storage/sql_storage.cc:2370] flushInsertBuffer(): flushing insert buffer (1 statements)
2011-02-25 16:25:19 DEBUG: [../src/update_manager.cc:155] containerChanged(): containerChanged. id: 2501, signal: 0
If I change the autoscan dir to "Basic", no references are deleted.
Additionally, I don't understand why the same files are updated on every startup, any ideas?
This bug may be related to https://sourceforge.net/tracker/?func=detail&aid=2997081&group_id=129766&atid=715780 and https://sourceforge.net/projects/mediatomb/forums/forum/440751/topic/2107572.