It’s finally happening, a new update to the photoframe.
This has been long coming and while it may not seem to contain many visible changes, it has been a major refactoring on the code side.
When I first wrote photoframe, it was done very fast to make sure it would be ready for when my daughter was born. It was a marathon but the end result was a decent google photos based frame with little to no need of maintenance.
As time passed though, it became obvious that I wasn’t the only one wanting this, and the project started growing. Features were added and new capabilities were included.
Right before I had to pack up my home office due to remodel, some very nice people had added caching, simple url content provider and USB memory support and I had rewritten the entire handling of getting photos to a more modular approach since picasa was being deprecated (meaning there was a need for a new source).
Today’s version contains the following changes:
- USB memory supports unicode
- USB memory should handle devices with multiple partitions better
- Better handling of reboot (detects when frame is online again)
- EXIF auto rotation using jpegtran for fast transformation
- Overscan/Underscan support
- Option to explain the image resizing (it was clearly not clear … ahem)
- Link to this blog (so you can find out what’s going on)
- Control of caching, allowing it to be turned off
- Control of how network loss is handled
- Better handling of network loss (shouldn’t get stuck so often, if at all)
- Sped up USB detection (less subprocess calls, using sysfs instead)
- Disabled PicasaWeb, it can no longer be added
On the less visible side, we have:
- Webserver is now a class
- Each REST endpoint is served by a class (less clutter)
- Caching is more consistent and providers can hint if they would like caching
- Cache system is no longer static, it’s an object like everything else
- Option to start SSH (REST API only for now)
- Option to enable/disable debug mode (REST API only for now)
- pyflakes used to remove useless imports and other issues
- travis-ci is setup to run pyflakes on pull requests
- All paths are now handled by a separate class to avoid dependency on settings everywhere
- Return data from web requests and service providers are now objects with defined behaviors
- All HTTP GET requests are able to retry (up to 5 times), making them more robust
--emulate
is now more capable and allows development on Ubuntu--countdown
allows overriding the 10, 9, … countdown, typically used with the previous option. No way to control from web interface yet. Let me know if we need it.
All of these changes are to allow me to continue expanding the capabilities and features of photoframe.
So what’s in store for the next major update?
Well, I’m currently looking at how I handle power save, it was pretty hardcoded to certain behaviors before. I’d like it to be more of a voting system with pluggable classes to support all kinds of cool ways of deciding when to save power. And yes, this means supporting motion sensors (a request from the past).
Also want to have the USB service tie the instance to a specific USB device. This is all possible today, but without the next feature, it will be annoying to use.
Next feature? Yes, a longstanding item on my own wishlist. Service providers should be allowed to provide an options page with simple changable items, allowing for individual cache control, pairing of USB devices, username/password for Simple URL, etc.
Obviously this one will take some time, but be patient, it’s coming.
If something broke with this update, please let me know by filing an issue on github.