Skip to content

Implement some form of Daemon Mode #161

Open
@cal2195

Description

@cal2195

Interesting usecase time! 😄

Currently, I have one instance of VHA running on a linux server with all my data, which I leave running and has the duty of importing files, and extracting metadata and thumbnails for me (means I can leave it running, and also faster as the remote files are local to the server).

I can them mount the drive over the network, and use a local copy of VHA to access the library!

While I've been doing this from the start and it has been working great, it has it's own set of problems:

  • The remote VHA is constantly running, so it never reloads the loaded library when I rescan, so any changes I've made in the meantime on the local client (tags, ratings), get overridden with whatever the remote had in memory at the time. (Why I wanted Possibly seperate out user generated metadata from file generated metadata? #145)
  • I have to manually remote into the server to initiate a rescan of the library.

Some possible ways of improving this usecase:

  • Daemon Mode: the ability to start up the client with command line args, eg. ./vha --library=path/to/lib --rescan-library --quit which would start up vha, load the library, run a rescan, and quit when finished. This would allow for metadata to be (mostly) preserved, as it will load in the latest library every time, and also allows for cron scheduling in a timely manner.

  • Filesystem watching: adding something like inotify to watch the filesystem for changes, and import new files as soon as they appear. This coupled with loading in the new library changes before rescanning could work well, except if the files are still being written to when you get notified (I think you can react to different events, eg. file close).

  • Remote client access: Basically the idea of being able to access the remote client over HTTP in a normal chrome browser - This would be awesome as you'd only ever be running a single client, so metadata is safe, and you could access it from any device. By far the hardest to implement though.

Personally the daemon mode seems quite nice, especially if we could flesh out other functions in the future and possibly prevent the gui from starting up too. 💡

Any thoughts on all this, or any fresh ideas welcome! 👍

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions