avanc / photOS

Operating System for digital photo frames
Other
91 stars 14 forks source link

Run from attached USB stick #28

Open kmuehlbauer opened 3 years ago

kmuehlbauer commented 3 years ago

If a USB stick is attached, the stick is autodetected and added as /dev/sda1 (second stick would be /dev/sdb1 and so forth, at least in my case). Additionally this gets mounted to /data/media/sda1.

If we add a test here: https://github.com/avanc/photOS/blob/42a8e113ebeb66d684205ade77e3d71de001f7a6/package/photoframe/photoframe.sh#L5 which checks for existence of /dev/sda1 we can declare FOLDER_IMAGES=/data/media/sda1. Otherwise we keep it pointing to the local directory. If we also keep rsync pointing to the local directory, the images would be played from the usb stick after reboot, without tampering with the webDAV sync.

I think there is a smarter solution to automate this, but just in case someone needs a hack.

kmuehlbauer commented 3 years ago

@avanc Nice work, BTW :+1:

avanc commented 3 years ago

How about this proposal: Sync files from usb to another internal folder (e.g. images_usbstick) and have a configuration in the webui to select, whether images from webdav (i.e. images_local) or images_usbstick shall be shown. So the USB-Stick does not need to be connected all the time. In addition, this can than be easily extended to select other sync sources in future (https://github.com/avanc/photOS/issues/25, https://github.com/avanc/photOS/issues/12).

Would this fit your needs?

kmuehlbauer commented 3 years ago

Yes, thanks, that should work. I would still be able to add the hack ;-).

From your experience, what's the probability of SD Card failures due to frequent writing of hundreds of images? I was wondering if the user should be able to specify the local data folder to be on some large usb storage instead of the SD Card.

avanc commented 3 years ago

My photoframe is running since December 24th last year without any issues. But there are just 10 new images per week on average...