xmltv: better handle file replace
When a xmltv file is replaced, QFileSystemWatcher (with is based
on Kernel inotify ioctl) stops monitoring the file. To avoid
that, remove and re-insert the file while parsing it.
It should be noticed that a script that would be doing
something like:
$ rm file
$ xmltv-grabber-foo >file
will still fail, as we can't ask inotify to monitor a
file that doesn't exist. Well, we could, instead monitor
the directory and check for a file creation, but that
would be a little more complex. So, the recommended
way would be to do:
$ xmltv-grabber-foo >file.new
$ mv file.new file
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>