-
-
Notifications
You must be signed in to change notification settings - Fork 801
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
Default view / saved filters for gallery view #2404
Comments
IMO, this default view is also needed for page Models >Scenes |
I agree, would love to have the option to change default views per menu item! |
It would be great to set default global filters for Scenes, Galleries, Images and Movies tabs for all performers. |
For now I have been using this custom js to sort the gallery page. you can also change the view type by editing this => function getLocalStorage(key) {
return localStorage.getItem(key)
}
function setLocalStorage(key, value) {
localStorage.setItem(key, value)
}
function customSortGalleryPage() {
const sortgalleryLocalStorageKey = "customjs:sortgallery:lastpath"
stash.addEventListener("stash:page", (e) => {
if (!stash.matchUrl(window.location.href, /galleries\/\d+/)) {
setLocalStorage(sortgalleryLocalStorageKey, e.detail?.event)
}
})
stash.addEventListeners(["stash:page:gallery:images", "stash:page:gallery:add"], (e) => {
if (e.detail?.event !== (getLocalStorage(sortgalleryLocalStorageKey) ?? "")) {
setLocalStorage(sortgalleryLocalStorageKey, e.detail?.event)
setTimeout(() => {
window.location.search = "?sortby=rating&sortdir=desc"
}, 100)
}
})
}
;(async () => {
while (!window.stash) {
await new Promise((resolve) => setTimeout(resolve, 100))
}
customSortGalleryPage()
})() |
thanks for your solution - I borrowed it and it works very well |
In gallery view, I am unable to set a default view. Saved filters don't work, since the gallery-dependance is always included as a filter.
Expected behavior
I am able to use filters and "Set as default" just like when viewing scenes. This would probably mean handling gallery view without applying the filter "Galleries include".
Thanks for your efforts, I really enjoy stash
Sorry if this is a duplicate. I know, this problem exists for a while now..
The text was updated successfully, but these errors were encountered: