Skip to content

Conversation

@86482t
Copy link
Contributor

@86482t 86482t commented Dec 31, 2025

Following #1896, with this change it is now possible to get through the api what the user has selected, either in the media viewer or in a page. While I was at it, I added more useful info that was readily available to the response.

Finally closes #1583

@hydrusnetwork
Copy link
Owner

Thank you for this work. I like the idea and this looks good! I will merge now and I'll tinker with it a bit for v655. We've been pushing on multiple media viewer support recently, so I'll see if I can return a list and have 'canvas_keys' or something to identify them. I'll bet we'll eventually want to extend this with some sort of 'tell (canvas x) to (move forward)' kind of commands.

@hydrusnetwork hydrusnetwork merged commit eaed707 into hydrusnetwork:develop Jan 10, 2026
@hydrusnetwork
Copy link
Owner

Ok just as a heads up, if you use this call already, I changed it to get_media_viewers and it returns a list of dicts like this:

{
  "canvas_type" : (some number, means like 'browser' vs 'duplicate filter' etc..),
  "canvas_key" : (bunch of hex that uniquely identifies the canvas,
  "current_media" : (either null or the same results from `file_metadata` call)
}

If we end up going this way, we could tack on stuff like 'position' and 'size' too for the actual window geometry.

I'll write out some help docs for it for 655 and figure out a unit test and all that. Thanks again!

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

Successfully merging this pull request may close these issues.

2 participants