ts-gphoto2-driver icon indicating copy to clipboard operation
ts-gphoto2-driver copied to clipboard

[Feat] Camera Storage info

Open Romakita opened this issue 5 years ago • 4 comments

As a developer I want a method to get all storage info available on a Camera.

Example GPPhoto2

gphoto2 --storage-info
[Storage 0]
label=NIKON D70
basedir=/store_00010001
access=2 Read-only with delete
type=4 Removable RAM
fstype=4 Camera layout (DCIM)
totalcapacity=7822432 KB
free=7452704 KB
freeimages=697

StorageInfo interface

{
  "label": "NIKON D70",
  "basedir": "/store_00010001",
  "access": "2 Read-only with delete",
  "type": "4 Removable RAM",
  "fstype": "4 Camera layout (DCIM)",
  "totalcapacity": "7822432 KB",
  "free": "7452704 KB",
   "freeimages": 697
}

Acceptance criteria

  • Add method Camera.storageInfo(): StorageInfo[]
  • Return an array of StorageInfo

Romakita avatar Aug 19 '18 10:08 Romakita

Related #1

Romakita avatar Aug 19 '18 10:08 Romakita

@nic2012 here the feature. Can you check, if the description is right ?

Romakita avatar Aug 19 '18 10:08 Romakita

I think so, thats fine. Well in my earlier apps I grep the stdout from gphoto2-cli, transformed it by jq to get finally

  "storage-info": [
    {
      "label": "NIKON D70",
      "basedir": "/store_00010001",
      "access": "Read-only with delete",
      "type": "Removable RAM",
      "fstype": "Camera layout (DCIM)",
      "totalcapacity": "7822432",
      "free": "7516544",
      "freeimages": "703"
    }
  ],

There is an annoying mixture between type number and description in some fields e.g. "4 Removable RAM", but we developer can suppress it later when we fetch data.

Nic2012 avatar Aug 19 '18 11:08 Nic2012

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 20 '21 23:04 stale[bot]