Provider: SMB/CIFS network share #15

Open
opened 2026-03-27 21:57:08 +00:00 by antialias · 0 comments
Owner

SMB/CIFS photo source provider for pulling photos from Windows file shares, NAS devices (Synology, QNAP), or macOS shared folders.

Config Schema

{
  "server": { "type": "string", "required": true, "description": "Hostname or IP" },
  "share": { "type": "string", "required": true, "description": "Share name (e.g. 'Photos')" },
  "path": { "type": "string", "default": "/", "description": "Directory within the share" },
  "username": { "type": "string" },
  "password": { "type": "string", "secret": true },
  "domain": { "type": "string", "default": "", "description": "Windows domain (optional)" },
  "recursive": { "type": "boolean", "default": true }
}

Implementation Notes

  • Use smbprotocol (pure Python SMB2/3 client) or pysmb
  • list_photos() enumerates the share directory, filters by extension
  • get_photo() reads the file over SMB, loads into PIL
  • Support both authenticated and guest access
  • PhotoRef.id = relative path within the share
  • PhotoRef.date = file write time from SMB attributes

Docker Considerations

The photo server runs in Docker on the NAS. To access SMB shares:

  • Same NAS: Mount the share as a Docker volume instead of using SMB protocol (simpler, faster). This is essentially the local directory provider with a bind mount.
  • Remote NAS/PC: Use the SMB protocol via smbprotocol. No mount needed.

The config UI should offer guidance: "For shares on this NAS, consider using a Local Directory provider with a Docker volume mount instead."

Dependencies

  • smbprotocol added to requirements.txt

Depends on #9 (core architecture).

SMB/CIFS photo source provider for pulling photos from Windows file shares, NAS devices (Synology, QNAP), or macOS shared folders. ## Config Schema ```json { "server": { "type": "string", "required": true, "description": "Hostname or IP" }, "share": { "type": "string", "required": true, "description": "Share name (e.g. 'Photos')" }, "path": { "type": "string", "default": "/", "description": "Directory within the share" }, "username": { "type": "string" }, "password": { "type": "string", "secret": true }, "domain": { "type": "string", "default": "", "description": "Windows domain (optional)" }, "recursive": { "type": "boolean", "default": true } } ``` ## Implementation Notes - Use `smbprotocol` (pure Python SMB2/3 client) or `pysmb` - `list_photos()` enumerates the share directory, filters by extension - `get_photo()` reads the file over SMB, loads into PIL - Support both authenticated and guest access - `PhotoRef.id` = relative path within the share - `PhotoRef.date` = file write time from SMB attributes ## Docker Considerations The photo server runs in Docker on the NAS. To access SMB shares: - **Same NAS**: Mount the share as a Docker volume instead of using SMB protocol (simpler, faster). This is essentially the local directory provider with a bind mount. - **Remote NAS/PC**: Use the SMB protocol via `smbprotocol`. No mount needed. The config UI should offer guidance: "For shares on this NAS, consider using a Local Directory provider with a Docker volume mount instead." ## Dependencies - `smbprotocol` added to `requirements.txt` Depends on #9 (core architecture).
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: antialias/eink-photo-frame#15