XBVR Documentation

repository·master·Indexed 19 days ago

https://github.com/xbapps/xbvr

A management tool for VR video libraries featuring automated metadata matching for tags, cast, and sites. It includes a web UI, a DLNA streaming server for VR players such as DeoVR, HereSphere, Pigasus, and Skybox, and a RESTful API with an OpenAPI specification.

Tokens
3.1K
Snippets
8
Records
14
Agent score
67%

What's inside XBVR

  1. Set up a custom filter for DeoVR

    master

    You can sync specific filtered views from XBVR directly to the DeoVR player:

    1. On the XBVR scenes page, create a filter (e.g., by cast, site, or tags) and define a sort order.
    2. Create a "saved search" (using the control in the top left).
    3. Check the option "use as DeoVR list".
    4. The search will now appear as a list inside the DeoVR application.
  2. Quick Start guide for XBVR

    master

    After launching XBVR, access the web UI at http://127.0.0.1:9999. Follow these steps to set up your library:

    1. Scrape Scene Metadata: Navigate to Options -> Scene Data and click "Run scraper". This process populates the library with titles, tags, and cast information and may take several minutes.
    2. Add Video Folders: Once the scraper finishes, go to Options -> Folders and add the directories where your video files are stored.

    Once configured, your media will be available in the web UI and via the built-in DLNA server for compatible VR players (e.g., Pigasus, Skybox, Mobile Station VR).

  3. Set up a local development environment for XBVR

    master

    To develop on XBVR locally, ensure you have the following installed:

    • Go 1.24
    • Node.js 22.x
    • Yarn 1.17.x
    • air (Install via go install github.com/cosmtrek/air@latest outside the project directory)

    Once dependencies are installed, run the following command from the project directory to launch file-watchers for live-reloading both Go and JavaScript code:

    yarn dev
  4. Install and run XBVR via Docker

    master

    XBVR is available as a Docker image via the GitHub Container Registry. When running in Docker, your video files must be mounted to the /videos path inside the container. You must then configure this path in the XBVR web UI under Options -> Folders.

    To run the container, use the following command. Adding the -d flag will run the container in the background (detached mode).

    docker run -t --name=xbvr --net=host --restart=always \
       --mount type=bind,source=/path/to/your/videos,target=/videos \
       --mount source=xbvr-config,target=/root/.config/ \
       ghcr.io/xbapps/xbvr:latest
  5. App.vue component structure and overlay management

    master

    The App.vue component serves as the root of the web UI. It manages the global layout, including the Navbar, router-view for page navigation, and various conditional overlay components.

    Overlays are controlled via the Vuex $store under the overlay module. To trigger or control the visibility of specific UI layers, you must interact with the following state paths:

    • Details Overlay: this.$store.state.overlay.details.show
    • Edit Scene Overlay: this.$store.state.overlay.edit.show
    • Actor Details Overlay: this.$store.state.overlay.actordetails.show
    • Edit Actor Overlay: this.$store.state.overlay.actoredit.show
    • StashDB Scene Search Overlay: this.$store.state.overlay.searchStashDbScenes.show
    • StashDB Actor Search Overlay: this.$store.state.overlay.searchStashDbActors.show

    Additionally, the application uses GlobalEvents to listen for specific keyboard interactions, such as triggering the QuickFind overlay via the ? keypress.

  6. Configure Image Proxying and Caching

    master
    XBVR uses an image proxy to handle image requests, typically under the /img/ prefix. It utilizes a disk cache to improve performance. The proxy is configured with a DefaultBaseURL and can respect Cache-Control headers from client requests. There is also a specialized HeatmapThumbnailProxy available for heatmap thumbnails under the /imghm/ prefix.
  7. Run the XBVR system tray application

    master

    The XBVR system tray application is the primary entrypoint for the desktop version of the application. It manages a single instance of the process using single.New("xbvr") to prevent multiple concurrent runs. When started, it initializes a background server and provides a system tray menu for interacting with the application.

    Key features provided via the tray menu:

    • Open UI: Opens the web interface in the default system browser at http://localhost:<port> (where <port> is defined in the application configuration).
    • Open config folder: Opens the application's data directory (common.AppDir).
    • Open log file: Opens the xbvr.log file located in the application's data directory.
    • Quit: Terminates the application and the background server.
    go run pkg/tray/main.go
  8. Configure i18n settings in vue.config.js

    master

    The pluginOptions.i18n object allows you to configure internationalization settings for the Vue application.

    Available keys:

    • locale: The default locale used by the application (e.g., 'en_GB').
    • fallbackLocale: The locale to use when a translation is missing in the current locale.
    • localeDir: The directory containing locale files (e.g., 'locales').
    • enableInSFC: Boolean determining whether to enable i18n features within Single File Components.
    pluginOptions: {
      i18n: {
        locale: 'en_GB',
        fallbackLocale: 'en_GB',
        localeDir: 'locales',
        enableInSFC: false
      }
    }
  9. Configure XBVR via Command Line Arguments and Environment Variables

    master

    You can customize XBVR's behavior using command line parameters or environment variables. This is useful for setting custom paths, database URLs, or authentication credentials.

    | Command line parameter | Environment Variable | Type | Description |
    |------------------------|----------------------|------|-------------|
    | `--enableLocalStorage` | | boolean | Use local folder to store application data|
    | `—app_dir` | XBVR_APPDIR | String | path to the application directory|
    | `—cache_dir` | XBVR_CACHEDIR | String | path to the temporary scraper cache directory|
    | `—imgproxy_dir` | XBVR_IMAGEPROXYDIR | String | path to the imageproxy directory|
    | `—search_dir` | XBVR_SEARCHDIR | String | path to the Search Index directory|
    | `—preview_dir` | XBVR_VIDEOPREVIEWDIR | String | path to the Scraper Cache directory|
    | `—scriptsheatmap_dir` | XBVR_SCRIPTHEATMAPDIR | String| path to the scripts_heatmap directory|
    | `—myfiles_dir` | XBVR_MYFILESDIR | String | path to the myfiles directory for serving users own content (eg images|
    | `—databaseurl` | DATABASE_URL | String | override default database path|
    | `—web_port` | XBVR_WEB_PORT | Int | override default Web Page port 9999|
    | `—ws_addr` | XBVR_WS_ADDR | String | override default Websocket address from the default 0.0.0.0:9998|
    | `—db_connection_pool_size` | DB_CONNECTION_POOL_SIZE | Int | sets the connection pool size for mariadb databases|
    | `—concurrent_scrapers` | CONCURRENT_SCRAPERS | Int | set the number of scrapers that run concurrently default 9999|
    | | UI_USERNAME | String | set the username for UI authentication |
    | | UI_PASSWORD | String | set the password for UI authentications |
  10. XBVR Keyboard Shortcuts

    master

    Use these shortcuts to navigate the XBVR web interface efficiently.

    Global

    • ?: Quick Find

    Details Pane

    • o: Previous scene
    • p: Next scene
    • e: Edit scene
    • w: Toggle watchlist
    • f: Toggle favourite
    • W: Toggle Watched status (Capital W)
    • g: Toggle gallery / video window
    • esc: Close details pane
    • left arrow: Cycle backwards in gallery / skip backwards in video
    • right arrow: Cycle forward in gallery / skip forward in video

    File Match Pane

    • o: Previous file
    • p: Next file
    • left arrow: Next page of search results
    • right arrow: Previous page of search results
    • esc: Close matching pane

    Actor List

    • o or left arrow: Previous page of actors
    • p or right arrow: Next page of actors

    Actor Details

    • o: Previous actor
    • p: Next actor
    • left arrow: Cycle backwards in gallery
    • esc: Close details pane
  11. Start the XBVR server with StartServer()

    master

    The StartServer function is the primary entrypoint for initializing and running the XBVR server. It performs several critical setup steps: loading configuration, copying data files, running database migrations (both synchronously and in the background), checking dependencies, initializing sites, and setting up the API, static file serving, image proxying, and WebSocket/WAMP routing. It also starts background tasks like the DLNA server (if enabled) and the DeoVR remote session.

    // version, commit, branch, and date are build metadata strings
    server.StartServer("0.4.39", "commit_hash", "main", "2026-07-03")
  12. Access the Vuex store modules in xbvr

    master

    The xbvr frontend uses a centralized Vuex store to manage application state. The store is exported as a default instance and is organized into several specialized modules. Developers can access these modules via this.$store.state.<moduleName> or by using mapState, mapGetters, mapActions, and mapMutations from Vuex within Vue components.

    Available modules include:

    • sceneList: Manages the list of available scenes.
    • actorList: Manages actor data.
    • messages: Handles application messages/notifications.
    • overlay: Manages UI overlay states.
    • files: Manages file-related data.
    • remote: Manages remote connection states.
    • optionsStorage: Configuration for local storage.
    • optionsDLNA: Configuration for DLNA settings.
    • optionsDeoVR: Configuration for DeoVR settings.
    • optionsWeb: Configuration for web-related settings.
    • optionsSites: Configuration for site-specific settings.
    • optionsPreviews: Configuration for preview settings.
    • optionsFunscripts: Configuration for Funscript settings.
    • optionsVendor: Configuration for vendor-specific settings.
    • optionsAdvanced: Configuration for advanced user settings.
    • optionsSceneCreate: Configuration for scene creation settings.