Skip to content

Conversation

@toshski
Copy link
Contributor

@toshski toshski commented Nov 30, 2025

This has a number of related changes

Package Data Files

I have added a folder xbvr_data. Any files added in here will be included in the install packages in the xbvr_data directory alongside the xbvr executable.
When Xbvr starts, it will check for the xbvr_data directory and copy file contents to the Xbvr Appdir, if the files are new or newer.

Generic Scene Id Migrations.

There is a new generic process to rename Scene Ids that can be used by migrations called RenameSceneIdsFromFile
The mapping of old and new values is stored in a json file that can be package and deployed by placing in the xbvr_data/migrations/release directory
These lists are outside the xbvr executable, using the new Package Data Files above, rather than compiled in

It has Options to

  • Identify existing scene by the old Id, Url or a custom function (define in your migration and pass to RenameSceneIdsFromFile).
  • Option to set the scene needs_update to true to force a refresh of all scene data on the new scrape run
  • You can also specify a new Scene Url.
  • If you pass a list of scenes from your new migration to RenameSceneIdsFromFile, it will look-up the new values and update the scenes, if a list of scenes is not provided, RenameSceneIdsFromFile will process all the scenes listed in the json file and lookup the scene to update. Providing a list of scenes to update is faster
  • If you wish to make other changes scene fields (eg Trailer sources), you can write a custom function in your migration and pass it to RenameSceneIdsFromFile. It will often be easier, to just force a scrapper refresh using needs_update.
  • User can override the released json file to handle any unique needs they may have, by placing a modified copy of the file in xbvr_data/migrations/custom directory, this will be used instead of the file in xbvr_data/migrations/release
  • Users can create the own list of scenes to be remapped, without needing a specfic migrations. eg StasyQVR no longer scrapes for me, I re-maped all my StasQVR scenes to SLR Ids, allowing me to keep all edits, such as Ratings, Favourite, Cuepoints, etc. Another user could use VRPorn instead. An example json file is provided, it is the same format as the list used for migrations, except for 2 additional fields:
    - "custom_mappings": true
    - "processed": true, xbvr will change this to true when it has been processed

0086-update-vrporn-ids

vrporn_ids.go has been removed. This was causing compiling xbvr under vscode to fail, possibly other environments as well.
0086-update-vrporn-ids has been rewritten to use the new generic Scene Id re-maping function RenameSceneIdsFromFile and scenes details from vrporn_ids.go are in a new file 0086-update-vrporn-ids.json file in the xbvr_data/migrations/release directory.
Most users are probably already on 0.4.36, so they will already have run the 0086-update-vrporn-ids migrations and this will not be re-run with the new code.

Non standard deployments: It should be noted if you are not using the standard deployment packages and have your xbvr executable in the same directory pointed to by APPDIR, you will need to ensure you update your xbvr_data when needed. This is probably mainly something for developers to be aware of, potentially effecting them depending on their development and testing environment setups

To re-iterate If the xbvr executable is in APPDIR (not standard practice), make sure YOU update xbvr_data

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.

2 participants