Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to access any content #17

Closed
xboxguru opened this issue Dec 30, 2023 · 7 comments
Closed

Unable to access any content #17

xboxguru opened this issue Dec 30, 2023 · 7 comments

Comments

@xboxguru
Copy link

After the latest db migration in stash, I receive an error every time I try to load into a filter, including the default. The plugin loads the filter list, but selecting any causes a crash. The basic error appears to be query failed regarding some naming conventions that may have changed. (i.e. rating, file Here's a brief paste:

Exception: GraphQL query failed:422 - b'{"errors":[{"message":"Cannot query field \\"rating\\" on type \\"Scene\\". Did you mean \\"rating100\\"?","locations":[{"line":9,"column":7}],"extensions":{"code":"GRAPHQL_VALIDATION_FAILED"}},{"message":"Cannot query field \\"file\\" on type \\"Scene\\". Did you mean \\"files\\" or \\"title\\"?","locations":[{"line":15,"column":7}],"extensions":{"code":"GRAPHQL_VALIDATION_FAILED"}}],"data":null}'. Query: query findScenes($scene_filter: SceneFilterType, $filter: FindFilterType!) { findScenes(scene_filter: $scene_filter, filter: $filter) { count scenes { id title details rating date created_at paths { screenshot } file { duration video_codec audio_codec width height } studio { name } performers { name } tags { name } scene_markers { id } } } } . Variables: {'filter': {'per_page': -1, 'sort': 'date', 'direction': 'DESC'}, 'scene_filter': {'created_at': {'modifier': 'GREATER_THAN', 'value': '2023-12-24'}}}

Full log attached where I try to load a bunch of filters, including the default ones.
You can load the tags, studios, and performers lists, but trying to open a studio, performer, or tag results in the same error.
kodi.log

@xboxguru
Copy link
Author

It appears that Stash updated to allow for multiple file support, so what used to be returned as 'file' is now returned as 'files' and is a list. This plugin will need to be updated to more elegantly handle multiple file returns.
A rather inelegant solution to get this working while we wait on an official fix is to edit:
stash_interface.py: replace 'rating' with 'rating100' in each of the query strings. (line 54, 104, 136, 286)
stash_interface.py: replace 'file' with 'files' in each of the query strings. (line 60, 111, 142, 292)
listing.py: replace every instance of scene['file'][ with scene['files'][0][ (lines 81, 95, 96, 97, 100)
Then content will load. In the event the query returns multiple files, it should load the info for the first returned file.

@xboxguru
Copy link
Author

@gitgiggety

@level451
Copy link

level451 commented Dec 31, 2023

Also in scene_marker_listing line 44
duration = marker['scene']['files'][0]['duration']
`It mostly works with the changes, but not everything works still.

@gitgiggety
Copy link
Owner

Thanks for the report and sorry for me not noticing.

I just created a pull request (#21) with some fixes which should make it work again. Could you please test it? You can download a test version here, then unpack the zip file, which contains another zip, and this zip resulting zip file can then be installed in Kodi (using "Install from ZIP" option).

@Ingenioes
Copy link

Basic browsing and viewing videos works fine for me, anything particular you want to be tested?

@level451
Copy link

Works just great for me now also. Thanks!

@gitgiggety
Copy link
Owner

Thanks for confirming the fix. This is now released as v0.0.10

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

No branches or pull requests

4 participants