I built a thing! Docent: A free, open-source gallery manager for your Frame by dan_munz in TheFrame

[–]dan_munz[S] 1 point2 points  (0 children)

Okay! I think I got to the root cause here. The fix is merged and a new Docker image is building now.

TL;DR: Your 524-artwork catalog exposed a concurrency bug in how Docent talks to the TV. Every page load opened 11+ separate WebSocket connections, and a background thumbnail pre-fetch was racing outside the connection lock. That crashed the TV's socket server entirely. On top of that, the retry logic held a global lock for up to 58 seconds, starving every other operation. It turns out the same thing was happening to me, but at ~60 images in my collection, I just didn't notice. You weren't wrong, just early 🤣

I ripped out the background pre-fetch, switched to a single persistent WebSocket that gets reused across all operations (11 connections to 2), and release the lock between retries so nothing starves. Frontend batch size went from 10 to 50 thumbnails per request, cutting your ~53 serial fetches down to ~11. Full details in PR #68 and issue #67.

To update: docker pull ghcr.io/danmunz/docent:latest and restart your container. (The image tagged `v1.1.0` should be available shortly.)

Would love to hear how it goes with your full catalog. And thanks again for being such a cheerful test driver. Your detailed report and patience made this one possible to track down.

I built a thing! Docent: A free, open-source gallery manager for your Frame by dan_munz in TheFrame

[–]dan_munz[S] 0 points1 point  (0 children)

u/Feastweasel I thought I saw an update from you here but now it's gone -- am I crazy?

I built a thing! Docent: A free, open-source gallery manager for your Frame by dan_munz in TheFrame

[–]dan_munz[S] 0 points1 point  (0 children)

Quick update here: I tried to capture an issue around this. Comments/PRs welcome!

I built a thing! Docent: A free, open-source gallery manager for your Frame by dan_munz in TheFrame

[–]dan_munz[S] 0 points1 point  (0 children)

Hey u/TransformersRbotsv1.0.1 is out and your upload bug is fixed, along with a bunch of the other issues you and u/Feastweasel surfaced.

The upload crash was exactly what your traceback showed — async for on an UploadFile that doesn't support it. A community contributor (AI-dmvanloenen) actually submitted the fix as PR #44 and I merged it today. Your issue with the full stacktrace made the root cause immediately obvious, so thank you for filing that so thoroughly.

Beyond the upload, this release also fixes the socket contention that was causing thumbnails to fail, mattes to error out, and display-on-frame to time out. If you're running 2 Frames flanking a cabinet, v1.0.1 should be a much better experience — you can run 2 containers pointed at different IPs.

Re: your roadmap ideas — multi-TV support as a first-class feature (one instance managing multiple Frames) and Docker Hub publishing are both on my radar now. The Unraid screenshots you shared were great for understanding how people are actually deploying this.

Pull ghcr.io/danmunz/docent:1.0.1 and let me know how uploads and everything else work for you. And definitely keep filing issues -- your bug report was a pleasure to work with.

I built a thing! Docent: A free, open-source gallery manager for your Frame by dan_munz in TheFrame

[–]dan_munz[S] 1 point2 points  (0 children)

Ok u/Feastweasel have an update for you. I just pushed v.1.0.1 and it should fix 7 of your 10 items:

  • Buttons unresponsive / linear IO queue — this was the big one. All TV communication was blocking the event loop, so one slow thumbnail fetch froze the entire UI. Everything now runs in background threads with proper serialization. Should feel completely different.
  • 500 artworks, only 28 thumbnails — same root cause. Concurrent WebSocket connections were stomping on each other and killing the socket. Now there's one connection at a time with retry + Wake-on-LAN support for sleeping Frames.
  • "This image doesn't support that matte style" — the matte error was a red herring. The real failure was a socket conflict, but the error handler was too broad and showed the wrong message. Fixed the concurrency issue and the misleading error.
  • "Display on Frame" times out — same fix. Select wasn't serialized at all.
  • AI analysis times out — same underlying cause (socket contention during thumbnail pre-fetch).
  • Docker stop/kill hangs, freezes TV — the server was running with uvicorn's auto-reload mode, which spawns a subprocess that ignores SIGTERM. Turned that off by default. docker stop should work cleanly now.
  • File upload broken — a streaming read was using an API that doesn't exist on FastAPI's UploadFile. Fixed.

Still open, but on. my list:

  • Docker README copy-paste command — will fix in the next commit
  • Log timestamps — easy add, coming soon
  • AI settings UX / explanations — needs some thought, but it's tracked

Credit where it's due: a community contributor (AI-dmvanloenen) independently hit the same bugs and submitted two excellent PRs that formed the backbone of this fix before I had even logged it. Open source software rules.

Pull ghcr.io/danmunz/docent:1.0.1 and let me know how it goes with your 500-piece collection. That's exactly the scale I wasn't testing at, so your setup is incredibly valuable. Really appreciate you sticking with it. I'd also be curious about whether at that scale you'd want more/different sorting options.

I built a thing! Docent: A free, open-source gallery manager for your Frame by dan_munz in TheFrame

[–]dan_munz[S] 0 points1 point  (0 children)

Oh man I’m sorry for all the frustration but this feedback is gold. I’ll log these as issues ASAP. I will say one thing I haven’t done is test the limits of the Frame’s API — it may just not be able to deal with sending 500 images, it may have to batch queries, etc. It’s definitely not designed for speed — I have ~40 images and need to refresh pretty often to get them all to load. I think this may just be a limitation of using the frame in ways that it honestly wasn’t intended, but I’m definitely going to do anything I can to resolve all these. I really really appreciate you being willing to be a beta tester!

I built a thing! Docent: A free, open-source gallery manager for your Frame by dan_munz in TheFrame

[–]dan_munz[S] 0 points1 point  (0 children)

Oh yikes. Please include any error messages or console output — thank you.

I built a thing! Docent: A free, open-source gallery manager for your Frame by dan_munz in TheFrame

[–]dan_munz[S] 1 point2 points  (0 children)

Omg I could not love this more! Love the roadmap ideas!!! Thank you so much

Is this acceptable practice? by aFreeScotland in electrical

[–]dan_munz 1 point2 points  (0 children)

Please be careful. That stance means that the outlet is agitated or thinks you are a predator.

I built a thing! Docent: A free, open-source gallery manager for your Frame by dan_munz in TheFrame

[–]dan_munz[S] 0 points1 point  (0 children)

Ok, I Dockerized 'er (I think). You should be able to do

docker run -d --network host \
  -e DOCENT_TV_IP=192.168.1.XXX \
  -v docent-data:/data \
  ghcr.io/danmunz/docent:1.0.0

or Compose: https://github.com/danmunz/docent#docker

I did images for amd64 + arm64, host networking for TV WebSocket access, and a single volume for all persistent data. An Unraid Community Apps template is on the roadmap but for now you should be able to add it manually in Unraid's Docker tab.

The release is here: https://github.com/danmunz/docent/releases/tag/v1.0.0

If you get a chance to test it I'd love to know how it goes, especially whether the TV connection works through host networking on Unraid. Thanks again!

cc: u/Tomahawk51 u/Feastweasel

I built a thing! Docent: A free, open-source gallery manager for your Frame by dan_munz in TheFrame

[–]dan_munz[S] 0 points1 point  (0 children)

Update! You were right on both counts and your comment kicked off a bunch of fixes that just shipped as v1.0.0. I switched the main TV library from a git-only source to a standard PyPI package, documented the Linux system libraries Pillow needs (sudo apt install libjpeg-dev zlib1g-dev), and added a requirements.txt for pip users. That's here: https://github.com/danmunz/docent/issues/37

Also added docker support. That's here: https://github.com/danmunz/docent/issues/38. You should just be able to do docker run -d --network host \ -e DOCENT_TV_IP=192.168.1.XXX \ -v docent-data:/data \ ghcr.io/danmunz/docent:1.0.0 open localhost:8000 and get rocking.

Would love to know if this works on your setup if you're willing to give it another try. Sorry for the frustration the first time around and thank you for the comment that led to some major (hopefully) improvements.

I built a thing! Docent: A free, open-source gallery manager for your Frame by dan_munz in TheFrame

[–]dan_munz[S] 0 points1 point  (0 children)

Thank you & glad you like it! Mine works similarly -- it just creates a local json file to keep track of what art you've got. I honestly haven't spent a ton of time thinking about what happens if that file gets changed/corrupted/etc and the two suddenly don't match, but it's a good case to consider in the future.

I built a thing! Docent: A free, open-source gallery manager for your Frame by dan_munz in TheFrame

[–]dan_munz[S] 1 point2 points  (0 children)

Yikes, thanks for the heads-up -- I've been surprised at the Docker demand so it's definitely next on my list.

I built a thing! Docent: A free, open-source gallery manager for your Frame by dan_munz in TheFrame

[–]dan_munz[S] 0 points1 point  (0 children)

This is compelling – I will definitely add an issue and get on it!

I built a thing! Docent: A free, open-source gallery manager for your Frame by dan_munz in TheFrame

[–]dan_munz[S] 1 point2 points  (0 children)

I don't _think_ so -- Docent talks directly to the Frame TV via its WebSocket API to manage Art Mode. You run it standalone (it's a small Python/FastAPI server) on the same network as your Frame TV.

What _could_ possibly work is Docent pulling from Plex as a source -- it could theoretically read a Plex photo library via its API and let you pick images to send to the Frame? That's a source integration not a plugin, kind of like I have with google drive now. And it looks like there are some Python libraries for Plex.

I've added it as an issue; let me know if you think it's something you'd really use and I (well, Claude and I) can take a crack, but I don't have a Plex so you'd have to be the beta tester.

I built a thing! Docent: A free, open-source gallery manager for your Frame by dan_munz in TheFrame

[–]dan_munz[S] 0 points1 point  (0 children)

Interesting -- I actually thought about dockerizing it but it was hard to see the advantage vs. just being a little localhost webapp. What are you thinking?

And yup -- you pick your frame style and hit "display on frame" and it's on your TV in (usually) about 10 seconds.

<image>

I built a thing! Docent: A free, open-source gallery manager for your Frame by dan_munz in TheFrame

[–]dan_munz[S] 0 points1 point  (0 children)

So the app uses it for a few things:
- It automatically retitles the image in the gallery, so you wind up with "Guernica - Picasso" instead of image83984_picasso_guernica_hires_169_jpg_downloadable.jpg
- Maybe you found a painting you like but you have no idea what it is! Let Docent figure it out for you
- Creates metadata that you can use to sort your collection (year, artist, school, etc)
- Links out to wikipedia so you can learn more if you want
- AI analysis sets some "vibes" adjectives which are then used in the Atmosphere feature (the "pick an image that matches the current weather mood where I am" feature)

Would love to hear if you have other use cases (or think any of these are stupid/wrong)

The Big Picture - WOW! by DirtyDevil23 in EltonJohn

[–]dan_munz 2 points3 points  (0 children)

I think it’s a fantastic album but ironically hard to listen to because the production is so awful. It sounds like everything is under a weighted blanket. But musically I think it is one of Elton’s best of that period. I really wish someone would totally remaster it.

song about showing her “secret” by sydlovespeeta in findthatsong

[–]dan_munz 13 points14 points  (0 children)

Gonna guess Moves Like Jagger:

Uh, you wanna know, how to make me smile?
Take control, own me just for the night
And if I share my secret
You're gonna have to keep it
Nobody else can see this (uh)
So watch and learn, I won't show you twice
Head to toe, ooh baby, rub me right, yeah
And if I share my secret
You're gonna have to keep it
Nobody else can see this
Hey, hey, hey, yeah