ALonelyJuicebox / OFMetadataToStash

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

Issue when media not stored in the same location the database expects. #19

Closed ne0lith closed 10 months ago

ne0lith commented 10 months ago
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.
Try rerunning the OnlyFans script and redownloading the file.

- __user_data__\sites\OnlyFans\username\Posts\Free\Images\2316x3088_filename.jpg

The issue is, the file IS in my stash db, it's just not using the same path the DB stored it.

I.e. my media doesn't stay in the same location it was scraped to.

Expected path: - __user_data__\sites\OnlyFans\username\Posts\Free\Images\2316x3088_filename.jpg

Real path potential 1: B:\collections\username\images\2316x3088_filename.jpg

Real path potential 2: B:\collections\username\premium\2316x3088_filename.jpg

Or it may not follow that format either, but i would think if the 2316x3088_filename.jpg exists within the stashdb, and the filesize is the same, it ought to match?

Surely there's ways to still leverage the db file if the file size hasn't changed, and the filename is 1:1 in the stash db.

ALonelyJuicebox commented 10 months ago

Which search specificity mode are you using?

ne0lith commented 10 months ago

Tried normal, and it wasn't working. Moved to low, and I think it should work the exact way I asked here. So that is my bad. But getting a new issue, can open a new issue if required.

Which performer would you like to select [Enter a number]: 282
OK, the performer 'USERNAME' will be processed.

Quick Tips:
   * Be sure to run a Scan task in Stash of your OnlyFans content before running this script!
   * Be sure your various OnlyFans metadata database(s) are located either at
     <performername> \user_data.db or at <performername>\metadata\user_data.db

Press [Enter] to begin:

Info: Parsing media for USERNAME
(8) Error: Could not communicate to Stash using the URL in the config file (http://localhost:9999/graphql)
Press [Enter] to exit:

The issue is, i can clearly access the graphql from that endpoint in my browser.

ALonelyJuicebox commented 10 months ago

Ah that's just a poorly named error message. Looks like there's some sort of GraphQL error with how the mutation query was sent. I'll push an update in the morning that will help the error messages be a bit more verbose in terms of what the issue is. (it's a bit late here) Sorry for the hassle!

ALonelyJuicebox commented 10 months ago

I have a feeling it has to do with some character in the details field of a given video/image that's not being escaped properly. I'll upload 0.6 later this evening and you can let me know if this addresses the issue/gives you more information for troubleshooting purposes

ALonelyJuicebox commented 10 months ago

Sorry for the wait-- can you run 0.6 and see if it fixes things? https://github.com/ALonelyJuicebox/OFMetadataToStash/releases/tag/v0.6

ne0lith commented 10 months ago

Seems to be working now, at least for the user I had tried before.