hydrus icon indicating copy to clipboard operation
hydrus copied to clipboard

Downloader component metadata (creation/add/modified times)

Open roachcord3 opened this issue 9 months ago • 0 comments

Problem

  1. It's hard to keep track of which downloader components you have that are out of date.
  2. It's hard to keep track of which components you modified after importing them.

Solution

Add the following metadata to downloader components.

  1. Creation time: this is the time the component was created (from scratch.) This helps people keep track of how old a downloader is, and for community downloaders like in https://github.com/CuddleBear92/Hydrus-Presets-and-Scripts, it's great for being able to tell if your downloader is out of date.
  2. Add time: this is the time the component was added to the client. For the original creator, this will be == creation time. For everyone else, this will be some date in the future. This helps people keep track of when they added something to their client, for debugging purposes and for avoiding that "did I import this new parser already?" moment many of us have from time to time.
  3. Modified time: this is the time the component was last changed in the client. This is useful for people who are creating or modifying parsers, so they can more easily keep track of their in-progress work whenever they are chipping away at fixing problems before they feel ready to compile something together and share it with the community.

This metadata should be included during exports:

  1. Clipboard/json exports: All values should be included as-is; this makes debugging with diffing tools easier.
  2. PNG exports: Only Creation time should be included, and its value should be set to the Modified time or Creation time of the component, whichever is more recent.

And this metadata should be parsed during imports:

  1. Clipboard/json imports:
    • Creation time should be added as-is.
    • Add time should be set to the current time; the time from the exported data should be ignored, since if for some reason you are adding something new to the client this way, you should have an accurate Add time (i.e., it should be set to the current time.)
    • Modified time should be added as-is.
  2. PNG imports:
    • Since only Creation time is exported, it should be added as-is.
    • Add time should be set to the current time
    • Modified time should be set to the same value as Creation time.

I'm not asking for everything from #246. This is just asking for basic metadata that mirrors things you see in file systems. I made it a separate request because I feel like this is a low-hanging fruit that has value and is a step in the right direction toward solving #246.

roachcord3 avatar May 27 '24 20:05 roachcord3