[mythtv] Adding inotify support to MythVideo
robthebob at gmail.com
Fri Jul 25 08:09:19 UTC 2008
> I've been leaning toward background scanning. The current video manager will eventually disappear with all the functionality working its way in to the other views (I think most of this is done, Stuart Morgan is working on it as part of the conversion to the new UI).
> Something like inotify could then be used to inform the background scan.
> Background scanning may take time (I'm devoting my small MythTV time to mtd currently). If you want to make a new version of what #645 did that I can commit in the interim, I'm fine with that.
I have a slightly simpler version of #645 I'm using at the moment on
my system written in Python. Implementing that extra function in the
bindings just made it a bit easier and cleaner. Moving to
oldvideometadata might be a handy way of not losing metadata. At the
moment it's slightly unclear to me how to respond to a move event.
Currently I delete on a MOVE_FROM and add on a MOVE_TO, but really if
the two can be connected by their cookie the filepath should just be
updated in the database. I can't seem to find whether inotify
guarantees any ordering on events or anything like that which makes it
somewhat tricky to know when to give up listening for the MOVE_TO that
corresponds to the MOVE_FROM.
If something were to go into the mainline, what is the envisaged final
solution? Are the plugins initialised on startup (in which case a
thread could be spun off to do this monitoring)? Or are you thinking
of the mfd? Or some solution similar to how MythMusic continues
playing songs these days (I'm not aware of how this is implemented)?
More information about the mythtv-dev