You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Browse and play an XBVR library, as well as Stash - #86
VideoFrameVR can use an XBVR server the way it uses Stash: browse its scenes, performers, studios and tags, play a scene from a folder here or from the server's stream, and send ratings back. One server is in use at a time. Each kind keeps its own setup, so going to the other and back loses nothing.
For users
First-run setup asks for the server's address and finds out whether Stash or XBVR answers there. Only Stash has a login, so only Stash asks you to sign in.
Settings → Stash / XBVR starts with Off, Stash and XBVR. A kind you have set up is used at once, with everything as you left it: address, API key, folders, filters, sorts and whether ratings are sent. A kind you haven't set up asks for its address first.
Playing: a scene streams from the server over HTTP with seeking. XBVR's is never DLNA, and XBVR starts no watch session of its own. A scene you also have in a folder here plays from that folder.
With a scene: its cover, cast, site and tags, the preview XBVR made for it, and the subtitles and funscript XBVR lists beside its video.
Send ratings and plays to XBVR (off by default): a new rating is sent as it is, and a scene you play is marked as watched. XBVR keeps no time for a play, so none is sent. Tags aren't edited and files aren't deleted through XBVR.
Videos XBVR keeps on Put.io aren't listed: XBVR only redirects to those.
A Stash-only profile reads and writes the settings file every release wrote. Stash's local copy, queued changes, saved downloads and pinned lists are read as they are.
Before
After
If you choose one kind and type the other's address, the app sets up the one that answers and says so.
Folders are chosen, not typed
This changes Stash too. The server editor used to have two typed fields, the folder as the server names it and the same folder here, which meant knowing a path such as smb://nas/videos. They are gone. The editor has the address, and for Stash the sign-in and API key. XBVR's API takes no login.
Before
After
Settings lists the server's library folders after the first sync, under Play from a folder. It's optional: videos you also have here seek faster from their folder, and still play when the server is down. Each folder shows where it plays from here, or that it plays from the server.
Choose… opens the file browser. Use this folder checks that the server's videos are in it. Play from XBVR goes back to streaming that folder, and leaves the others as they are.
Right after you connect a server, the app looks for its folders on this device and on the computers under Network. A folder found in one place is used without asking, that one time. A folder found in several is offered with Use, and you decide.
How it's built
flowchart LR
subgraph shared [Shared]
direction TB
A[Sync and local copy] --> B[Catalog] --> C[Menu pages]
D[Stream, images, previews]
E[Write-back queue]
end
shared --> S{{MediaServer / MediaClient}}
S --> T["Stash<br>stash_server.cpp, stash_client.cpp<br>GraphQL"]
S --> X["XBVR<br>xbvr_server.cpp, xbvr_client.cpp<br>REST"]
Loading
Everything a kind of server does differently sits behind two interfaces. A further kind is two files and a line in the registry (media_server.cpp).
Abilities, not kinds, in shared code. The menu hides the API key, sign-in and Edit tags where the server can't do them, and write-back sends one "watched" in place of play times where playTimes is false.
A setup per kind.Settings::stash is the setup in use and otherServers holds the rest. useServer() swaps them. In settings.conf each kind's lines carry its id, and Stash's are the ones it always had:
media_server=xbvr # written only while a kind other than Stash is in usestash_url=https://stash.example.com
stash_api_key=...
xbvr_url=http://192.168.1.20:9999
xbvr_path_from=/mnt/media/vr
xbvr_path_to=smb://nas/media/vr
Kept apart on disk. The local copy and image cache are per kind (stash.db, xbvr.db). Queued changes, download sources and pinned lists are kept by kind as well as address, so two kinds at one address never share them. Stash's keep the names they had.
The server's name in the menu. The language tables write "Stash". setServerName() shows a copy with the name of the server in use in its place, in every language, and stringsNamed() gives one for a kind that isn't in use yet.
Finding the kind.findServer() asks each kind in turn at the address typed (https, http, port 9999), the chosen kind first, without changing anything on the server.
What is asked of XBVR:
For
Request
Which server, and its version
GET /api.json
Scenes with files, cast and tags
POST /api/scene/list (available scenes, 500 a page; read again if the pages don't fit together)
Site logos, library folders
GET /api/options/sites, GET /api/options/storage
A file, subtitles, a funscript
GET /api/dms/file/<id>?dnt=true
A preview, an image
GET /api/dms/preview/<scene>, GET /img/<url>
A rating
POST /api/scene/rate/<id>
Watched
POST /api/scene/toggle, only for a scene XBVR has as not watched, checked before and after
Medium — The XBVR bulk-send confirmation promises that existing ratings are safe to overwrite.src/strings.cpp:554–555 says “Existing XBVR ratings stay unchanged,” but makePlan() queues every nonzero local rating that differs from the server rating (src/stash_write_back.cpp:199–203). If a scene has five stars on XBVR and two locally, confirming Send replaces the five with two. Update the XBVR confirmation and its translations to say that differing server ratings will be replaced by the local ratings shown in the preview.
Medium — “Play from XBVR” cannot override same-path local playback.src/menu_stash_folders.cpp:131–135 only offers the action for an explicit mapping, and src/stash.cpp:382–403 implements it by removing that mapping. On a desktop where XBVR and the player both see /mnt/videos, the folder plays locally without an explicit mapping, so the action is absent. Even if the user explicitly chooses that same folder first, removing the last mapping restores the implicit local path (StashSettings::localPath(), lines 177–183). Record an explicit stream-only choice for the selected folder and offer it whenever that folder plays locally. This also avoids changing the resolution of unrelated folders when the last mapping is removed.
Medium — The XBVR sync diagnostic exposes media folder paths.src/stash.cpp:506–510 prints both the folder returned by XBVR and its mapped location on the device. Running --stash-sync writes those strings to the console and the persistent run log, which is later included in the diagnostics ZIP. The run-log redactor masks the home prefix, username and registered hosts, but not arbitrary folder names. Print a folder number and the existing counts instead of f.folder and here.
Medium — A certificate error on another port can prevent discovery of a reachable XBVR server.src/media_client.cpp:184–197,243–245 uses the highest-ranked error to decide whether to try the next server kind. For example, enter a bare NAS hostname with a self-signed HTTPS admin page on port 443 and XBVR on HTTP port 9999. The Stash probe gets a certificate error on 443 and a non-Stash HTTP response on 9999. The certificate error wins, foreign_ is false, and first-run setup never asks XBVR for /api.json. Track whether any candidate returned a nonmatching HTTP response separately from the error to display; probe the other kind before presenting that error.
Low — Pinned lists are shared between different XBVR addresses.src/menu_stash_lists.cpp:154–155 uses xbvr_lists.conf for every XBVR server, and src/menu_stash.cpp:24–29 resets the loaded pins only when the kind changes. After pinning a performer list on one XBVR instance and editing the address to point to another, the old pin remains visible and its numeric performer ID can select an unrelated person. Key XBVR pins by normalized server identity and reload them when that identity changes, while preserving the existing Stash pin file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
VideoFrameVR can use an XBVR server the way it uses Stash: browse its scenes, performers, studios and tags, play a scene from a folder here or from the server's stream, and send ratings back. One server is in use at a time. Each kind keeps its own setup, so going to the other and back loses nothing.
For users
A Stash-only profile reads and writes the settings file every release wrote. Stash's local copy, queued changes, saved downloads and pinned lists are read as they are.
If you choose one kind and type the other's address, the app sets up the one that answers and says so.
Folders are chosen, not typed
This changes Stash too. The server editor used to have two typed fields, the folder as the server names it and the same folder here, which meant knowing a path such as
smb://nas/videos. They are gone. The editor has the address, and for Stash the sign-in and API key. XBVR's API takes no login.Settings lists the server's library folders after the first sync, under Play from a folder. It's optional: videos you also have here seek faster from their folder, and still play when the server is down. Each folder shows where it plays from here, or that it plays from the server.
Choose… opens the file browser. Use this folder checks that the server's videos are in it. Play from XBVR goes back to streaming that folder, and leaves the others as they are.
Right after you connect a server, the app looks for its folders on this device and on the computers under Network. A folder found in one place is used without asking, that one time. A folder found in several is offered with Use, and you decide.
How it's built
flowchart LR subgraph shared [Shared] direction TB A[Sync and local copy] --> B[Catalog] --> C[Menu pages] D[Stream, images, previews] E[Write-back queue] end shared --> S{{MediaServer / MediaClient}} S --> T["Stash<br>stash_server.cpp, stash_client.cpp<br>GraphQL"] S --> X["XBVR<br>xbvr_server.cpp, xbvr_client.cpp<br>REST"]Everything a kind of server does differently sits behind two interfaces. A further kind is two files and a line in the registry (
media_server.cpp).Abilities, not kinds, in shared code. The menu hides the API key, sign-in and Edit tags where the server can't do them, and write-back sends one "watched" in place of play times where
playTimesis false.A setup per kind.
Settings::stashis the setup in use andotherServersholds the rest.useServer()swaps them. Insettings.confeach kind's lines carry its id, and Stash's are the ones it always had:Kept apart on disk. The local copy and image cache are per kind (
stash.db,xbvr.db). Queued changes, download sources and pinned lists are kept by kind as well as address, so two kinds at one address never share them. Stash's keep the names they had.The server's name in the menu. The language tables write "Stash".
setServerName()shows a copy with the name of the server in use in its place, in every language, andstringsNamed()gives one for a kind that isn't in use yet.Finding the kind.
findServer()asks each kind in turn at the address typed (https, http, port 9999), the chosen kind first, without changing anything on the server.What is asked of XBVR:
GET /api.jsonPOST /api/scene/list(available scenes, 500 a page; read again if the pages don't fit together)GET /api/options/sites,GET /api/options/storageGET /api/dms/file/<id>?dnt=trueGET /api/dms/preview/<scene>,GET /img/<url>POST /api/scene/rate/<id>POST /api/scene/toggle, only for a scene XBVR has as not watched, checked before and afterThe XBVR client refuses to send any other change.
Important
AI disclosure
anthropic/claude-opus-5-5highopenai/gpt-6.2-solhighopenai/gpt-6.2-astrahighAgent harness OpenCode 2.3.0 to 2.3.2