Skip to content

Conversation

@picarica
Copy link

so i was missing timestamp plugin the classic one doesnt work at all
i did alot of testing here HaveAGitGat/Tdarr#1271

this fixed #885

its my first time contributing here, am i using correct format and context ?

@HaveAGitGat
Copy link
Owner

Hi you need to commit the typescript file - you have only added the js file, flow plugin js files should not be edited manually, they're auto produced by the typescript compiler when running tsc

I'll try take a look later thanks.

@picarica
Copy link
Author

i added .ts version not very experienced in that, but works on my machine

@HaveAGitGat
Copy link
Owner

I think it's best to update the original plugin rather than creating a new one, so we don't have similar logic/functionality in 2 places.

Unless there was a specific reason for adding a new plugin?

@picarica
Copy link
Author

picarica commented Dec 1, 2025

isnt there a goal to have plugins in the new flow format rather than using classic ones? there isnt specific reason just ease of use. but i guess this could be just updated the old one. or old one could be deleted since its non functional

@HaveAGitGat
Copy link
Owner

For plugins offering completely new functionality they should be flow plugins, but if we're updating existing functionality of a classic plugin then best to update the classic plugin as there are still quite a few people using the classic system.

The classic plugin does work just not in your case. In the old plugin it's using the touch method on non-windows

    if (os.platform() === 'win32') {
      fs.utimes(
        file._id,
        ctimeMs / 1000,
        mtimeMs / 1000,
        (err) => {
          if (err) {
            log('Error updating modified date');
          }
        },
      );
    } else {
      touch.sync(file._id, { mtimeMs, force: true });
    }

I suppose ideally we'd perhaps need to try several methods in the plugin and then after each one, check that it's been applied successfully.

@HaveAGitGat
Copy link
Owner

I'll update it this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can we get New keep original date plugin ?

2 participants