Re: Rygel removes media file unexpectedly



On 16 July 2014 21:53, Konstantin Svist <fry kun gmail com> wrote:
Hi,

This shows up because SickBeard is trying to replace an existing file
(new copy downloaded, so SB runs rm-then-cp)

To replicate the problem by hand:
* Have a file ready, e.g. /tmp/vid.mp4 and a media dir that Rygel
monitors, e.g. /home/rygel/media/
* rm -f /home/rygel/media/vid.mp4; cp /tmp/vid.mp4 /home/rygel/media/

At this point -- if /home/rygel/media/vid.mp4 already existed -- every
once in a while the end result is that /home/rygel/media/vid.mp4 does
not exist!
If it does exist, re-run the command (rm..; cp..) a few (10?) times
until the file does not exist.

Interestingly, SickBeard is able to trigger this 100% of the time, since
it does operations in Python (maybe faster than shell commands?). Note:
bug is gone when Rygel is not running, so it's not really a SickBeard bug.

Hi Konstantin,

To my surprise I can actually reproduce this.
Rygel.MediaExport.WritableDbContainer.remove_child() gets called and
it just goes and deletes the file. This does not happen if a file is
only removed (and nothing is copied), but it does so fairly
consistently (close to 100% for me) if you do rm-then-cp as Konstantin
says.

I'm not familiar with this part of the code so I'm not sure if
remove_child() should not be called or if it should not just do
that... Jens?

Jussi


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]