stash icon indicating copy to clipboard operation
stash copied to clipboard

[Feature] Allow moving folder without regenerating all metadata

Open JediMaster25 opened this issue 3 years ago • 18 comments

I want the option to scrape a folder without hashing it just like before. Just using the metadata from the existing scenes and updating the path.

Now every time I move a folder it rehashes, creates sprites, etc.

JediMaster25 avatar Nov 24 '22 08:11 JediMaster25

You will have to give an example. It should be marking those files as moved.

WithoutPants avatar Nov 24 '22 08:11 WithoutPants

But is it regenerating all metadata while before it took less time because it skipped the generation once it saw the scene existed?

That's what I think but I may be wrong.

ghost avatar Nov 24 '22 09:11 ghost

Again, you will need to provide a log file or something to explain exactly what is happening compared to what you're expecting.

WithoutPants avatar Nov 24 '22 09:11 WithoutPants

But I don't have the old version so I can only provide a log file of the new version. And without looking at them side by side and comparing I don't see how it's going to help.

ghost avatar Nov 24 '22 09:11 ghost

Then provide a log file of the new version and explain what you think is wrong. At the moment I have nothing to go on.

WithoutPants avatar Nov 24 '22 09:11 WithoutPants

I moved a folder with two files. This would have been instant before version 0.17, but now it takes 5 minutes:

22-11-24 10:14:41Info    Scan finished (5m49.6582055s)
2022-11-24 10:14:41Error   Scene.Update.Post [renamerOnUpdate]: returned error: [FATAL] Error with the graphql request HTTPConnectionPool(host='localhost', port=9999): Read timed out. (read timeout=20)
2022-11-24 10:14:41Error   Scene.Update.Post [renamerOnUpdate]: returned error: [FATAL] Error with the graphql request HTTPConnectionPool(host='localhost', port=9999): Read timed out. (read timeout=20)
2022-11-24 10:14:21Info    [Plugin / renamerOnUpdate] The filename will be changed
2022-11-24 10:14:21Info    [Plugin / renamerOnUpdate] The filename will be changed
2022-11-24 10:14:18Info    /mnt/storage/Video/Stash/Categories/Amateur/R3CK4/ph587af0c104572.mkv moved to /mnt/storage/Video/Stash/Categories/Amateur/R3CK4(2)/ph587af0c104572.mkv. Updating path...
2022-11-24 10:14:18Info    /mnt/storage/Video/Stash/Categories/Amateur/R3CK4/ph587d3fd85c432.mkv moved to /mnt/storage/Video/Stash/Categories/Amateur/R3CK4(2)/ph587d3fd85c432.mkv. Updating path...
2022-11-24 10:14:13Info    Calculating fingerprints for /mnt/storage/Video/Stash/Categories/Amateur/R3CK4(2)/ph587d3fd85c432.mkv ...
2022-11-24 10:14:13Info    Calculating fingerprints for /mnt/storage/Video/Stash/Categories/Amateur/R3CK4(2)/ph587af0c104572.mkv ...
2022-11-24 10:14:41Info    Scan finished (5m49.6582055s)
2022-11-24 10:14:41Error   Scene.Update.Post [renamerOnUpdate]: returned error: [FATAL] Error with the graphql request HTTPConnectionPool(host='localhost', port=9999): Read timed out. (read timeout=20)
2022-11-24 10:14:41Error   Scene.Update.Post [renamerOnUpdate]: returned error: [FATAL] Error with the graphql request HTTPConnectionPool(host='localhost', port=9999): Read timed out. (read timeout=20)
2022-11-24 10:14:21Info    [Plugin / renamerOnUpdate] The filename will be changed
2022-11-24 10:14:21Info    [Plugin / renamerOnUpdate] The filename will be changed
2022-11-24 10:14:18Info    /mnt/storage/Video/Stash/Categories/Amateur/R3CK4/ph587af0c104572.mkv moved to /mnt/storage/Video/Stash/Categories/Amateur/R3CK4(2)/ph587af0c104572.mkv. Updating path...
2022-11-24 10:14:18Info    /mnt/storage/Video/Stash/Categories/Amateur/R3CK4/ph587d3fd85c432.mkv moved to /mnt/storage/Video/Stash/Categories/Amateur/R3CK4(2)/ph587d3fd85c432.mkv. Updating path...
2022-11-24 10:14:13Info    Calculating fingerprints for /mnt/storage/Video/Stash/Categories/Amateur/R3CK4(2)/ph587d3fd85c432.mkv ...
2022-11-24 10:14:13Info    Calculating fingerprints for /mnt/storage/Video/Stash/Categories/Amateur/R3CK4(2)/ph587af0c104572.mkv ...
2022-11-24 10:08:53Info    Finished adding files to queue. 2 files queued
2022-11-24 10:08:53Info    /mnt/storage/Video/Stash/Categories/Amateur/R3CK4(2) doesn't exist. Creating new folder entry...
2022-11-24 10:08:52Info    scanning 1 paths

ghost avatar Nov 24 '22 09:11 ghost

I'm going to take a guess that this is because of all those Read timed out errors that are happening in the renameOnUpdate plugin.

WithoutPants avatar Nov 24 '22 09:11 WithoutPants

I think if you retest again with that plugin disabled, you'll probably find it a lot quicker.

WithoutPants avatar Nov 24 '22 09:11 WithoutPants

I've disabled the plugin and it's taking just as long. Perhaps I should remove all plugins?

ghost avatar Nov 24 '22 09:11 ghost

Is the log any different?

WithoutPants avatar Nov 24 '22 09:11 WithoutPants

22-11-24 10:29:52Info    Scan finished (5m41.325308702s)
2022-11-24 10:29:47Info    /mnt/storage/Video/Stash/Categories/Amateur/R3CK4(2)/ph587af0c104572.mkv moved to /mnt/storage/Video/Stash/Categories/Amateur/R3CK4/ph587af0c104572.mkv. Updating path...
2022-11-24 10:29:47Info    /mnt/storage/Video/Stash/Categories/Amateur/R3CK4(2)/ph587d3fd85c432.mkv moved to /mnt/storage/Video/Stash/Categories/Amateur/R3CK4/ph587d3fd85c432.mkv. Updating path...
2022-11-24 10:29:44Info    Calculating fingerprints for /mnt/storage/Video/Stash/Categories/Amateur/R3CK4/ph587d3fd85c432.mkv ...
2022-11-24 10:29:44Info    Calculating fingerprints for /mnt/storage/Video/Stash/Categories/Amateur/R3CK4/ph587af0c104572.mkv ...
2022-11-24 10:29:52Info    Scan finished (5m41.325308702s)
2022-11-24 10:29:47Info    /mnt/storage/Video/Stash/Categories/Amateur/R3CK4(2)/ph587d3fd85c432.mkv moved to /mnt/storage/Video/Stash/Categories/Amateur/R3CK4/ph587d3fd85c432.mkv. Updating path...
2022-11-24 10:29:47Info    /mnt/storage/Video/Stash/Categories/Amateur/R3CK4(2)/ph587af0c104572.mkv moved to /mnt/storage/Video/Stash/Categories/Amateur/R3CK4/ph587af0c104572.mkv. Updating path...
2022-11-24 10:29:44Info    Calculating fingerprints for /mnt/storage/Video/Stash/Categories/Amateur/R3CK4/ph587d3fd85c432.mkv ...
2022-11-24 10:29:44Info    Calculating fingerprints for /mnt/storage/Video/Stash/Categories/Amateur/R3CK4/ph587af0c104572.mkv ...
2022-11-24 10:24:12Info    Finished adding files to queue. 2 files queued
2022-11-24 10:24:11Info    scanning 1 paths

ghost avatar Nov 24 '22 09:11 ghost

And if you run a scan without changing anything, what does the scan time look like according to the logfile?

WithoutPants avatar Nov 24 '22 09:11 WithoutPants

It takes the same

22-11-24 10:41:00Info    Scan finished (5m7.604744864s)
2022-11-24 10:41:00Info    Scan finished (5m7.604744864s)
2022-11-24 10:35:53Info    Finished adding files to queue. 2 files queued
2022-11-24 10:35:52Info    scanning 1 paths

ghost avatar Nov 24 '22 09:11 ghost

So it took an extra 30 seconds to detect the moved files. I don't think that's really any worse than before. What exactly is the problem here?

WithoutPants avatar Nov 24 '22 10:11 WithoutPants

It's taking 5 minutes to do what it did much faster before. It shouldn't take 5 minutes to change the path of 2 files.

ghost avatar Nov 24 '22 10:11 ghost

are you using MD5 for hashing?

stg-annon avatar Nov 24 '22 12:11 stg-annon

No, only ohash.

ghost avatar Nov 24 '22 17:11 ghost

What is your setup 5 minutes for a scan without changes seams quite long

MrX292 avatar Nov 24 '22 17:11 MrX292