ALonelyJuicebox / OFMetadataToStash

This script imports OnlyFans metadata into your Stash Database
BSD 2-Clause "Simplified" License
70 stars 10 forks source link

Incorrect filepath/doesn't seem to be stripping paths? #33

Open amenofps opened 7 months ago

amenofps commented 7 months ago

Hi there, not sure if my issue is similar to this one https://github.com/ALonelyJuicebox/OFMetadataToStash/issues/30 but I'm getting the following when running the script: image

Files exist in the stash database. As far as I can tell it's not stripping the path properly to take just the file name. Stash is on the local machine, have tried it with all low, normal and high

ALonelyJuicebox commented 7 months ago

Thanks for the report-- please rereun with the latest release and let me know how things go

C-BoT-AU commented 4 months ago

I'm having similar issues due to using a Windows PC to run this script, scrapers on both Linux and Windows with Symlinks to save files to a NAS, and StashDB running on a Docker container

Path Prefixes

Original Script Filepath (Symlinks): __user_data__/sites/OnlyFans/modelname Windows Filepath (for PS Script): M:\MyOFRips\modelname StashDB Docker Container Filepath : /mnt/MyOFRips/modelname

(From there, files are in subfolders eg. /mnt/MyOFRips/modelname/Posts/Free/Images/image.jpg)

Invalid Operation Errors:

The below error occurs each time (same as #40), despite having manually created both the studio (modelname (OnlyFans)) and performer (using modelname as primary name, not a full name) in StashDB

InvalidOperation: D:\Apps\OnlyFans.Metadata.To.Stash.v0.9\OFMetadataToStash.ps1:578
Line |
 578 |      $OnlyFansStudioID = $StashGQL_Result.data.findStudios.Studios[0]. …
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot index into a null array.

InvalidOperation: D:\Apps\OnlyFans.Metadata.To.Stash.v0.9\OFMetadataToStash.ps1:631
Line |
 631 |          $OnlyFansStudioID = $StashGQL_Result.data.findStudios.Studios …
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot index into a null array.

Info: Added the OnlyFans studio to Stash's database
InvalidOperation: D:\Apps\OnlyFans.Metadata.To.Stash.v0.9\OFMetadataToStash.ps1:714
Line |
 714 |              $PerformerID = $StashGQL_Result.data.findPerformers.perfo …
     |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot index into a null array.

InvalidOperation: D:\Apps\OnlyFans.Metadata.To.Stash.v0.9\OFMetadataToStash.ps1:767
Line |
 767 |  …             $PerformerID = $StashGQL_Result.data.findPerformers.perfo …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot index into a null array.

Script Running Results

Note for the below, I tried all in Normal, High and Low setting, and using the -ignorehistory flag: I attempted to run the script and each file returned an error:

Info: There's a file in this OnlyFans metadata database that we couldn't find in your Stash database.
This file also doesn't appear to be on your filesystem (we checked with both Windows and *nix path delimeters).
Try rerunning the script you used to scrape this OnlyFans performer and redownloading the file.
- Scan Specificity Mode: Normal
- Filename: 3024x4032_94c8fefed3b494781071a38ebebef5bb.jpg
- Directory: __user_data__/sites/OnlyFans/modelname/Posts/Free/Images
- Filesize: 2873713
^ (Filename, Directory and Filesize are as defined by the OF Metadata Database) ^

After using a simple script to update the Directory entry for each file to reflect a path Windows can see, it doesn't give individual file errors but nothing happens:

Scanning for existing OnlyFans Metadata Database files...
Discovered a metadata database for 'modelname'
   --- 4x InvalidOperation errors as above ---
****** Import Complete ******
- Modified Scenes/Images: 0
- Scenes/Images that already had metadata: 0
- This script took 58.2446789 seconds to execute

So I tried updating the directory paths to match what StashDB would see and ran it got this error:

Info: There's a file in this OnlyFans metadata database that we couldn't find in your Stash database.
This file also doesn't appear to be on your filesystem (we checked with both Windows and *nix path delimeters).
Try rerunning the script you used to scrape this OnlyFans performer and redownloading the file.
- Scan Specificity Mode: Normal
- Filename: 3024x4032_94c8fefed3b494781071a38ebebef5bb.jpg
- Directory: /mnt/MyOFRips/modelname/Posts/Free/Images
- Filesize: 2873713
^ (Filename, Directory and Filesize are as defined by the OF Metadata Database) ^

Help!

Am I missing something? Or is this all related back to issue #40 and that is why when using the windows file paths it doesn't throw file level errors, but just results in nothing?

C-BoT-AU commented 4 months ago

I'm having similar issues due to using a Windows PC to run this script, scrapers on both Linux and Windows with Symlinks to save files to a NAS, and StashDB running on a Docker container

Help!

Am I missing something? Or is this all related back to issue #40 and that is why when using the windows file paths it doesn't throw file level errors, but just results in nothing?

Somehow.... Resetting the API key and clearing the script config seemed to fix this... I have no idea!