REDIRECTS.md: add gallery/favourites folder URLs #41

closed darlopvil opened this on 2026-11-11 09:44 UTC

Discussion

darlopvil 2026-11-11 09:44 UTC

REDIRECTS.md maps /$USER_GROUP/gallery and /$USER_GROUP/favourites, but not DeviantArt's folder URLs, so a link like

https://www.deviantart.com/someuser/gallery/12345678/some-folder

falls through every rule built from that map and never reaches the instance.

SkunkyArt already supports folders: folderGrid (app/wrapper.go) links them as group_user?folder=<id>&q=<user>&type=g, and GroupUser reads folder for both galleries and favourites. Only the redirect map is missing them.

Suggested additions (the trailing slug is optional on DeviantArt and is ignored):

  • ($USER_GROUP.deviantart.com/gallery/$FOLDER_ID[/$SLUG]|deviantart.com/$USER_GROUP/gallery/$FOLDER_ID[/$SLUG]) => /group_user?type=gallery&q=$USER_GROUP&folder=$FOLDER_ID

Favourites folder

  • ($USER_GROUP.deviantart.com/favourites/$FOLDER_ID[/$SLUG]|deviantart.com/$USER_GROUP/favourites/$FOLDER_ID[/$SLUG]) => /group_user?type=favourites&q=$USER_GROUP&folder=$FOLDER_ID

Worth a note in the file: these must be matched before the plain gallery / favourites rules, since redirect extensions differ in how they order rules.

Tested against v1.5.7 with regex rules:

^https?://(?:www\.)?deviantart\.com/([^/]+)/gallery/(\d+)(?:/[^?#]*)?(?:[?#].*)?$
  -> /group_user?type=gallery&q=$1&folder=$2
^https?://(?:www\.)?deviantart\.com/([^/]+)/favourites/(\d+)(?:/[^?#]*)?(?:[?#].*)?$
  -> /group_user?type=favourites&q=$1&folder=$2

Related: #33 — that issue treats REDIRECTS.md as the complete mapping, so anything built from it (LibRedirect included) inherits this gap.

closed by cmc in commit b8b2cd9bc0: REDIRECTS.md: add gallery and favourites folder URLs (!41)

2026-11-11 22:59 UTC
cmc 2026-11-11 23:05 UTC

Thanks for the report and the tested regexes. They’re in as of b8b2cd9, via !41: REDIRECTS.md now maps gallery and favourites folder URLs (with or without the slug) to /group_user?type=…&q=…&folder=…. They’re listed before the plain gallery/favourites rules, with a note to match them first.

This is tagged as v1.5.8, and the image is published:

ghcr.io/krazywarez/skunky-art:1.5.8