-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature: Add Studio and Performer buttons #5
Comments
Completely redesigned the userscript. I'm going to put this in the backlog for sure. I like this idea for those that dont use the Import List for StashDB favorites. |
Working this in branch |
When I initially used it I was going to put a place holder before it calls the api, so that it would say loading like on the buttons. It was a rush job to give you a good head start on displaying this information. The code looks good. |
Being monitored or unmonitored must be predicated by the studio or performer existing in the users Whisparr instance otherwise when querying Whisparr, WhisparrService.handleStudioLookup wouldn't return anything. I haven't found a way to add a studio into Whisparr via the API, maybe I totally missed it but I don't think it's there. |
Added it as a pull request Whisparr/Whisparr#288 |
Pull request Whisparr/Whisparr#274 will allow a studio or performers information to be returned by a stashID
You could do something to toggle on monitoring, or perform a search. Example of showing if a performer is monitored
function handlePerformerLookup(button, performerID, isHeader) {
if (performerID) {
const fullApiUrl =
${config.apiUrl}performer?stashId=${encodeURIComponent(performerID)}
;fetch(fullApiUrl, { method: 'GET', headers: createHeaders() })
.then(response => response.json())
.then(data => {
if (data?.length > 0) {
if (data[0].monitored) {
button.innerHTML = '';
button.style.color = '#ffffffcc';
button.style.backgroundColor = '#4CAF50';;
} else {
button.innerHTML = '';
button.style.backgroundColor = '#e385ed';
button.style.color = '#ffffffcc';
}
The text was updated successfully, but these errors were encountered: