Giter Site home page Giter Site logo

stash-vr-companion's People

Contributors

devloch avatar donztheape avatar tweeticoats avatar yoshnopa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

stash-vr-companion's Issues

Unkown Image Format

I am not sure where I have an unkown image. It seems to crash when I ever I come across this and it doesn't specify what image it is calling that it is upset about. Another than number 1125 but who knows what that is. I will rerun a scan and generate to see if this remedies the problem.

2023-11-10 00:33:45 fetching image: 1125
2023-11-10 00:33:45 Traceback (most recent call last):
2023-11-10 00:33:45   File "app.py", line 2327, in <module>
2023-11-10 00:33:45     refreshCache()
2023-11-10 00:33:45   File "app.py", line 1755, in refreshCache
2023-11-10 00:33:45     with Image.open(BytesIO(r.content)) as im:
2023-11-10 00:33:45   File "/usr/local/lib/python3.10/site-packages/PIL/Image.py", line 3186, in open
2023-11-10 00:33:45     raise UnidentifiedImageError(
2023-11-10 00:33:45 PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7f91311a74c0>```

Get "unsupported file type" when streaming stash video over HTTPS

When connecting to a Stash instance running on HTTPS, stash-vr-companion is able to correctly populate the cache, but there's an "unsupported file type" error when actually attempting to stream videos.

I'll look into this, just wanted to document it in case anyone tries using the HTTPS flow and runs into the error.

Not Starting

Any idea why my docker setup isn't working? I updated today and its failing. Log below...

*** Starting uWSGI 2.0.20 (64bit) on [Thu Dec 1 10:52:53 2022] ***

compiled with version: 8.3.0 on 01 December 2022 06:13:19

os: Linux-5.10.0-18-amd64 #1 SMP Debian 5.10.140-1 (2022-09-02)

nodename: 56baf5a952e1

machine: x86_64

clock source: unix

pcre jit disabled

detected number of CPU cores: 4

current working directory: /app

detected binary path: /usr/local/bin/uwsgi

uWSGI running as root, you can use --uid/--gid/--chroot options

*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***

*** WARNING: you are running uWSGI without its master process manager ***

your memory page size is 4096 bytes

detected max file descriptor number: 1048576

lock engine: pthread robust mutexes

thunder lock: disabled (you can enable it with --thunder-lock)

uWSGI http bound on :5000 fd 4

spawned uWSGI http 1 (pid: 7)

uwsgi socket 0 bound to TCP address 127.0.0.1:35255 (port auto-assigned) fd 3

uWSGI running as root, you can use --uid/--gid/--chroot options

*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***

Python version: 3.8.15 (default, Nov 15 2022, 22:19:38) [GCC 8.3.0]

Python main interpreter initialized at 0x55fd0a3a8860

uWSGI running as root, you can use --uid/--gid/--chroot options

*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***

python threads support enabled

your server socket listen backlog is limited to 100 connections

your mercy for graceful operations on workers is 60 seconds

mapped 72920 bytes (71 KB) for 1 cores

*** Operational MODE: single process ***

Loading config from stash: {"filters": [{"name": "Recent", "type": "BUILTIN", "filter_name": "default", "sort_name": "date", "enabled": false}, {"name": "VR", "type": "BUILTIN", "filter_name": "3d", "sort_name": "date", "enabled": true}, {"name": "2D", "type": "BUILTIN", "filter_name": "2d", "sort_name": "date", "enabled": true}, {"name": "5star", "type": "BUILTIN", "filter_name": "star", "sort_name": "date", "enabled": true}, {"name": "Random", "type": "BUILTIN", "filter_name": "random", "sort_name": "random", "enabled": true}, {"name": "Interactive", "type": "BUILTIN", "filter_name": "interactive", "sort_name": "date", "enabled": true}, {"name": "Markers", "type": "BUILTIN", "filter_name": "markers", "sort_name": "date", "enabled": false}]}

final config:{'config_studio': 222, 'filters': [{'name': 'Recent', 'type': 'BUILTIN', 'filter_name': 'default', 'sort_name': 'date', 'enabled': False}, {'name': 'VR', 'type': 'BUILTIN', 'filter_name': '3d', 'sort_name': 'date', 'enabled': True}, {'name': '2D', 'type': 'BUILTIN', 'filter_name': '2d', 'sort_name': 'date', 'enabled': True}, {'name': '5star', 'type': 'BUILTIN', 'filter_name': 'star', 'sort_name': 'date', 'enabled': True}, {'name': 'Random', 'type': 'BUILTIN', 'filter_name': 'random', 'sort_name': 'random', 'enabled': True}, {'name': 'Interactive', 'type': 'BUILTIN', 'filter_name': 'interactive', 'sort_name': 'date', 'enabled': True}, {'name': 'Markers', 'type': 'BUILTIN', 'filter_name': 'markers', 'sort_name': 'date', 'enabled': False}]}

Cache currently contains 0

refreshing cache

Fetching 100 scenes

Fetching 200 scenes

Fetching 300 scenes

Fetching 400 scenes

Fetching 500 scenes

Fetching 600 scenes

Fetching 700 scenes

Fetching 800 scenes

Fetching 900 scenes

Fetching 1000 scenes

Fetching 1100 scenes

Fetching 1200 scenes

Cache currently contains 1165 scenes, checking image cache

fetching image: 2333

Traceback (most recent call last):

File "app.py", line 2214, in

refreshCache()

File "app.py", line 1790, in refreshCache

with Image.open(f) as im:

File "/usr/local/lib/python3.8/site-packages/PIL/Image.py", line 3135, in open

fp.seek(0)

ValueError: seek of closed file

unable to load app 0 (mountpoint='') (callable not found or import error)

*** no app loaded. going in full dynamic mode ***

uWSGI running as root, you can use --uid/--gid/--chroot options

*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***

*** uWSGI is running in multiple interpreter mode ***

spawned uWSGI worker 1 (and the only) (pid: 1, cores: 1)

--- no python application found, check your startup logs for errors ---

[pid: 1|app: -1|req: -1/1] 10.1.1.112 () {38 vars in 1329 bytes} [Thu Dec 1 10:56:47 2022] GET / => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)

stash-vr-companion fails when tags already exist with different case

If your stash instance already has some of the export tags configured except with a different case, it will fail to start up, as
if t not in tags_cache.keys(): print("creating tag " +t) createTagWithName(t)

will attempt to create the tag, which will then fail, because Stash does not allow for tags that are identical except for case.

It's an easy fix on the stash side, just wanted to document that I ran into it for any help/complaints (particularly, it showed up because 'Fisheye' is a saved/managed tag in some scenes in stashdb). While it would be simple to fix the for loop that's going through tags, that would invisibly break later flows as scenes wouldn't pick up on having the tag.

But like I mentioned, very easy for a user to fix - just check tags (particularly 'Fisheye' to make sure none of them are present but with the wrong case.

No Tag to download

When trying to grab the docker image from the registry, on Synology NAS, there is no tag to download (i.e. latest, dev, etc)
image

Internal Server Error

Loved the possibilities here.

I had this working once but I think something happened when I favorited a performer in the app on my headset. From there I got a crashed app and attempts to fix say Internal Server Error. I've tried clearing the whole app and re-installing but am coming up short. Any advice?

Handy Integration Broken

Hi there! I'm not sure where the feature exactly broke as it was working just fine for a long while, but it's likely in the recent DeoVR changes.

Just firing up the website itself is fine, however as soon as you sign in to SLR to activate the Handy integration, the site drops ouf of DeoVR Compatibility. After quite a bit of troubleshooting, the only way to restore DeoVR functionality is to turn off the Docker image and change the port. You then fire it back up and you are back in to a functional website, but again, you are no longer logged into SLR for Handy functionality.

I reported this issue to DeoVR as well

Invalid login or password

So I just got my quest today, and tried setting up DeoVR and stash-vr-companion, but as soon as I enter IP address and port in DeoVR, it just instantly errors with "Invalid login or password" even tough I haven't even enterd one yet. Any idea why? Do I maybe need to login into DeoVR?

Tagging scenes as VR

Thanks again for this! I think I've mostly gotten things working, but I'm having trouble tagging VR scenes in Stash. Could I ask for some help?

From the README, every VR scene needs to have export_deovr applied, correct? Since I keep my VR files in their own folder, and I'm using Docker, I've managed this by adding it to my volume's path: /path/to/vr/files:/vr_files/export_deovr. Stash's autotagger picks up on export_deovr being in the path and adds the tag automatically. :)

For the other tags, I'm having some trouble figuring out how to apply them. It looks like I need one of these:

FLAT
DOME
SPHERE
FISHEYE
MKX200

And one of these:

SBS
TB

I can pretty easily figure out if a scene is SBS or TB (it's even easier that scenes default to SBS even without the tag), but the first list has me stumped. Is there a good way to tell the difference between them, just by watching the video? It'd be great if the README contained examples of each, or linked to an explanation somewhere else, but I totally understand if that's outside of the scope of this project. I haven't been able to find anything in my own searching.

Python app won't start - Blob storage issue?

Is it possible that the new blob storage may be a problem?
I get the following output from the console. Breaking due to image.py
Looks like the connection to Stash works (it receives the tags) but it is stopping beceause it cannot open an image

*** Starting uWSGI 2.0.20 (64bit) on [Sun Oct 22 17:37:06 2023] *** compiled with version: 8.3.0 on 05 June 2023 13:41:22 os: Linux-6.1.49-Unraid #1 SMP PREEMPT_DYNAMIC Wed Aug 30 09:42:35 PDT 2023 nodename: 5e352c498216 machine: x86_64 clock source: unix pcre jit disabled detected number of CPU cores: 8 current working directory: /app detected binary path: /usr/local/bin/uwsgi uWSGI running as root, you can use --uid/--gid/--chroot options *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** *** WARNING: you are running uWSGI without its master process manager *** your processes number limit is 127871 your memory page size is 4096 bytes detected max file descriptor number: 40960 lock engine: pthread robust mutexes thunder lock: disabled (you can enable it with --thunder-lock) uWSGI http bound on :5000 fd 4 spawned uWSGI http 1 (pid: 7) uwsgi socket 0 bound to TCP address 127.0.0.1:42823 (port auto-assigned) fd 3 uWSGI running as root, you can use --uid/--gid/--chroot options *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** Python version: 3.8.16 (default, May 23 2023, 14:31:02) [GCC 8.3.0] Python main interpreter initialized at 0x55558ae66ed0 uWSGI running as root, you can use --uid/--gid/--chroot options *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** python threads support enabled your server socket listen backlog is limited to 100 connections your mercy for graceful operations on workers is 60 seconds mapped 72920 bytes (71 KB) for 1 cores *** Operational MODE: single process *** Loading config from stash: {"config_studio": 190, "filters": [{"name": "Recent", "type": "BUILTIN", "filter_name": "default", "sort_name": "date", "enabled": false}, {"name": "VR", "type": "BUILTIN", "filter_name": "3d", "sort_name": "date", "enabled": true}, {"name": "2D", "type": "BUILTIN", "filter_name": "2d", "sort_name": "date", "enabled": true}, {"name": "5star", "type": "BUILTIN", "filter_name": "star", "sort_name": "date", "enabled": true}, {"name": "Random", "type": "BUILTIN", "filter_name": "random", "sort_name": "random", "enabled": false}, {"name": "Interactive", "type": "BUILTIN", "filter_name": "interactive", "sort_name": "date", "enabled": true}, {"name": "Markers", "type": "BUILTIN", "filter_name": "markers", "sort_name": "date", "enabled": false}]} final config:{'config_studio': 190, 'filters': [{'name': 'Recent', 'type': 'BUILTIN', 'filter_name': 'default', 'sort_name': 'date', 'enabled': False}, {'name': 'VR', 'type': 'BUILTIN', 'filter_name': '3d', 'sort_name': 'date', 'enabled': True}, {'name': '2D', 'type': 'BUILTIN', 'filter_name': '2d', 'sort_name': 'date', 'enabled': True}, {'name': '5star', 'type': 'BUILTIN', 'filter_name': 'star', 'sort_name': 'date', 'enabled': True}, {'name': 'Random', 'type': 'BUILTIN', 'filter_name': 'random', 'sort_name': 'random', 'enabled': False}, {'name': 'Interactive', 'type': 'BUILTIN', 'filter_name': 'interactive', 'sort_name': 'date', 'enabled': True}, {'name': 'Markers', 'type': 'BUILTIN', 'filter_name': 'markers', 'sort_name': 'date', 'enabled': False}]} Cache currently contains 0 refreshing cache Fetching 100 scenes Cache currently contains 28 scenes, checking image cache **Replacing image: http://192.168.1.16:9999/scene/16112/screenshot?t=1697205298 unknown image format fetching image: 20971 Traceback (most recent call last): File "app.py", line 2383, in <module> refreshCache() File "app.py", line 1824, in refreshCache with Image.open(BytesIO(r.content)) as im: File "/usr/local/lib/python3.8/site-packages/PIL/Image.py", line 3186, in open raise UnidentifiedImageError( PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x14ef6565a2c0>** unable to load app 0 (mountpoint='') (callable not found or import error) *** no app loaded. going in full dynamic mode *** uWSGI running as root, you can use --uid/--gid/--chroot options *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** *** uWSGI is running in multiple interpreter mode *** spawned uWSGI worker 1 (and the only) (pid: 1, cores: 1) --- no python application found, check your startup logs for errors --- [pid: 1|app: -1|req: -1/1] 192.168.1.34 () {36 vars in 590 bytes} [Sun Oct 22 17:37:56 2023] GET / => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0) --- no python application found, check your startup logs for errors --- [pid: 1|app: -1|req: -1/2] 192.168.1.34 () {36 vars in 558 bytes} [Sun Oct 22 17:37:56 2023] GET /favicon.ico => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)

Handy integration with Heresphere

Hey, is stash-vr-companion supposed to work with Heresphere and the Handy? I'm running into trouble with this.

I'm able to load the site in Heresphere, and can toggle the API to get the "VR" version of the website. Videos play well, and I think are tagged properly (I opened #4, but I think I mostly figured it out). When I play a video that's interactive, the video loads, Herespehere connects to the Handy, but the interface says something like "script not found." I can successfully play the same video/script with XBVR, so I don't think it's either of those.

I've scanned all of the same videos in Stash, made sure the funscripts show up in both Stash and stash-vr-companion, and even generated the heatmaps. Where's a good place to start troubleshooting this? I very much prefer the stash-vr-companion interface over XBVR, especially since there's a tab specific to "Interactive" videos in stash-vr-companion.

Also, I haven't been logging into SLR, as #2 mentioned. I don't have an account with SLR, but I'm assuming that's not necessary to use Heresphere with the Handy (since things work with XBVR).

Thanks!

Error on Synology

Hi there. First off, this is amazing. I've been hoping for something to bring stash over to the VR realm since I became aware of it. Thanks so much for your efforts.

I'm trying to stand this up on Synology and I'm getting an Internal Server error when I attempt to connect in. I did have to update several of the ports but I don't think that is the issue. Maybe python version?

The only change I made to the recommended creation script was to update the 5000 ext port to 10002 as Synology uses 5000 for host access and stash to port 10000 as I have XBVR on 9999.

docker run -d --name=stash-vr-companion --restart=unless-stopped -p 10002:5000 -e API_URL=http://192.168.1.199:10000/graphql ghcr.io/tweeticoats/stash-vr-companion:latest

Logging has it looping the below GET error (post boot logging - it's not cycling or anything).

  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: off
  • Running on all addresses.
    WARNING: This is a development server. Do not use it in a production deployment.
  • Running on http://172.17.0.8:5000/ (Press CTRL+C to quit)
    [2021-12-15 12:07:33,938] ERROR in app: Exception on /filter/Recent [GET]
    Traceback (most recent call last):
    File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2073, in wsgi_app
    response = self.full_dispatch_request()
    File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1518, in full_dispatch_request
    rv = self.handle_user_exception(e)
    File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1516, in full_dispatch_request
    rv = self.dispatch_request()
    File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1502, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
    File "/app/app.py", line 659, in show_category
    filters=filter()
    File "/app/app.py", line 616, in filter
    flat_filter['filter'] = {"tags": {"value": [tags_cache['export_deovr']['id'],tags_cache['FLAT']['id']], "depth": 0, "modifier": "INCLUDES_ALL"}}
    KeyError: 'FLAT'
    172.17.0.1 - - [15/Dec/2021 12:07:33] "GET /filter/Recent HTTP/1.1" 500 -
    [2021-12-15 12:07:37,974] ERROR in app: Exception on /filter/Recent [GET]
    Traceback (most recent call last):
    File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2073, in wsgi_app
    response = self.full_dispatch_request()
    File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1518, in full_dispatch_request
    rv = self.handle_user_exception(e)
    File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1516, in full_dispatch_request
    rv = self.dispatch_request()
    File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1502, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
    File "/app/app.py", line 659, in show_category
    filters=filter()
    File "/app/app.py", line 616, in filter
    flat_filter['filter'] = {"tags": {"value": [tags_cache['export_deovr']['id'],tags_cache['FLAT']['id']], "depth": 0, "modifier": "INCLUDES_ALL"}}
    KeyError: 'FLAT'
    172.17.0.1 - - [15/Dec/2021 12:07:37] "GET /filter/Recent HTTP/1.1" 500 -
    172.17.0.1 - - [15/Dec/2021 12:07:51] "GET / HTTP/1.1" 302 -
    [2021-12-15 12:07:51,226] ERROR in app: Exception on /filter/Recent [GET]

Auth Issue

Hi there!

I just tried to use the app and adjusted everything in my instance. While testing, I found a security issue:
Right now, heresphere only checks for the authorization on POST requests (see

if 'ApiKey' in headers and request.method == 'POST':
), which leads to all viewing processes not being protected at all. This may even be wished for by some, but is already a bit fishy, because even an unprotected read only access may not be desirable by default.

If you have questions or need help just ask, I am well acquainted with python.

Transcode Problem

I've had the below issue since I moved over from DeoVR to Heresphere. If I just go to stash directly in Heresphere, the file plays with no issues.

Using stash vr companion however, there is a significant delay in starting the video, it transcodes, and the progress bar for the video is full at a reported 00:00 of run time. The video will play and the count will increment but any action to toggle a backwards or forward time seek or clicking within the progress bar, will reset the video to start over. I should be on the latest branch for both apps; just not seeing what the blocker may be.

Max retries exceeded!

Hi,

after a while of runntime the following error occured:

raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.178.79', port=9999): Max retries exceeded with url: /graphql (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f75879e62f0>: Failed to establish a new connection: [Errno 111] Connection refused'))
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 1, cores: 1)
--- no python application found, check your startup logs for errors ---
[pid: 1|app: -1|req: -1/1] 172.17.0.1 () {38 vars in 1011 bytes} [Mon May 30 16:56:08 2022] GET / => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)
--- no python application found, check your startup logs for errors ---
[pid: 1|app: -1|req: -1/2] 172.17.0.1 () {38 vars in 962 bytes} [Mon May 30 16:56:08 2022] GET /favicon.ico => genera``

After restarting the docker container, it works a while, then the error occured again.

Any idea?

thx and regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.