ALonelyJuicebox / OFMetadataToStash

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

Changes to database schema (48) in v0.22.x #17

Closed zzfet closed 10 months ago

zzfet commented 1 year ago

Stash has modified the way that scene URLs are handled in version 0.22 (in order to allow for multiple links for a scene). Specifically:

At present, the script flags an error during this segment due to the url column being removed from 'scene': #Updating scene metadata if necessary if (($StashDB_QueryResult.scenes_title -ne $proposedtitle) -or ($StashDB_QueryResult.scenes_details -ne $OFDBMedia.text)){ $Query = "UPDATE scenes SET title='"+$proposedtitle+"', details='"+$detailsToAddToStash+"', date='"+$creationdatefromOF+"', updated_at='"+$modtime+"', url='"+$linktoperformerpage+"', studio_id='"+$OnlyFansStudioID+"' WHERE id='"+$StashDB_QueryResult.scenes_id+"'" Invoke-SqliteQuery -Query $Query -DataSource $PathToStashDatabase $filewasmodified = $true }

From what I gather, it should be a case of removing the 'url' from the initial scene update query, and adding a new 'INSERT INTO' query for the scene_urls database.

ALonelyJuicebox commented 10 months ago

Latest build should address this! Please let me know if any bugs!