Skip to content

Commit

Permalink
bugfix - now updates the UI when using the next / prev button in Stash
Browse files Browse the repository at this point in the history
  • Loading branch information
S3L3CT3DLoves committed Jan 19, 2025
1 parent c3e44a7 commit 502ef94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion plugins/QuickRating/quickRating.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class QuickRating{
this.ratingDisplayElement = null
this.rating = 0
this.sceneId = window.location.pathname.split('/')[2]
this.getRatingFromAPI()
}

updateDisplay(){
Expand Down Expand Up @@ -113,8 +112,12 @@ async function quickRating(page){
quickRatingConfig = await getConfig()
}

console.log("Run quickRating")
if (scenePagePattern.test(page)){
console.log("Quickrating enabled")
let quickRatingPlugin = new QuickRating()
await quickRatingPlugin.getRatingFromAPI()

csLib.waitForElement(".scene-toolbar-group", () => {
quickRatingPlugin.updateDisplay()
})
Expand Down
2 changes: 1 addition & 1 deletion plugins/QuickRating/quickRating.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: QuickRating
description: More rating UI options (only enable one)
url: https://github.com/stashapp/CommunityScripts
version: 0.2.1
version: 0.2.2
# requires: CommunityScriptsUILibrary

ui:
Expand Down

0 comments on commit 502ef94

Please sign in to comment.