Cotton code
195 lines · 4.0 KB · JSONRaw
{  "format_version": 1,  "id": "artist",  "name": "Artist",  "plural": "Artists",  "picture": null,  "builtin": false,  "visibility": "owner",  "engine": null,  "columns": [    {      "key": "name",      "name": "Name",      "type": "text",      "required": true,      "placeholder": "The artist's name"    },    {      "key": "sort_name",      "name": "Sorted as",      "type": "text"    },    {      "key": "photo",      "name": "Photo",      "type": "photo"    },    {      "key": "albums",      "name": "Albums",      "type": "number",      "units": {        "one": "album",        "other": "albums"      },      "computed": {        "rollup": {          "table": "music_album",          "link": "artist",          "op": "count"        }      }    },    {      "key": "songs",      "name": "Songs",      "type": "number",      "units": {        "one": "song",        "other": "songs"      },      "computed": {        "rollup": {          "table": "song",          "link": "artist",          "op": "count"        }      }    },    {      "key": "mb_artist",      "name": "MusicBrainz",      "type": "text",      "readonly": true    }  ],  "title": "name",  "date": null,  "project": null,  "order": null,  "slip": {    "title": "name",    "subtitle": [      "albums",      "songs"    ],    "trailing": null,    "photo": "photo",    "toggle": null  },  "tile": {    "face": "slip-list"  },  "page": [    {      "heading": null,      "columns": [        "photo",        "name",        "sort_name",        "albums",        "songs",        "mb_artist"      ]    }  ],  "sort": {    "column": "sort_name",    "descending": false  },  "create": {    "label": "Add music",    "doors": [      {        "id": "files",        "label": "Add files",        "object": "singles",        "files": {          "types": [            "public.audio",            "public.zip-archive"          ],          "many": true        }      },      {        "id": "folder",        "label": "Add a folder",        "object": "crate",        "files": {          "types": [            "public.folder"          ]        }      }    ]  },  "empty": {    "title": "No artists yet",    "message": "Artists gather from the songs that come in."  },  "instructions": "One row per artist, a person or a band, gathered from the songs and albums that come in: name as tagged, sort_name the name without a leading \"The\" (\"Beatles\" for \"The Beatles\"), so the list reads by it. \"Various Artists\" is one artist, the album artist of every compilation. photo is only ever the owner's own: there is no free source of artists' pictures, and none is looked up. albums and songs are counted from the albums it is the album artist of and the songs it is the artist of. mb_artist is the MusicBrainz artist id, from the tags or a lookup, filling only while empty. Opening an artist deals the albums by year.",  "commands": [    {      "id": "play",      "label": "Play",      "kind": "update",      "method": "shell.player",      "data": {        "table": "artist",        "op": "play"      },      "bindings": {        "id": "$id"      },      "receipt": "Playing {name}",      "object": "slip"    },    {      "id": "shuffle",      "label": "Play shuffled",      "kind": "update",      "method": "shell.player",      "data": {        "table": "artist",        "op": "shuffle"      },      "bindings": {        "id": "$id"      },      "receipt": "Shuffling {name}",      "object": "loop"    }  ],  "card": {    "face": "artist.divider",    "offers": [      "artist.divider"    ],    "fields": [      {        "slot": "photo",        "column": "photo"      },      {        "slot": "title",        "column": "name"      },      {        "slot": "count",        "column": "albums"      }    ],    "opens": {      "table": "music_album",      "by": "artist",      "order": [        "year"      ]    }  },  "groups": {    "stack": "covers"  }}