User:Ncarthy: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
No edit summary
m (syntaxhighlighter fix after upgrade)
 
(7 intermediate revisions by one other user not shown)
Line 1: Line 1:
Retrieve recently added songs<br />
Retrieve all songs from specified album, artist or genre<br />
'''Permissions:'''
'''Permissions:'''
* ReadData
* ReadData
'''Parameters:'''  
'''Parameters:'''  
<div style="margin-left: 20px; width: 60%; padding: 0px 5px 0px 5px; border-width: 1px; border-style: solid; border-color: #AAAAAA">
<div style="margin-left: 20px; width: 60%; padding: 0px 5px 0px 5px; border-width: 1px; border-style: solid; border-color: #AAAAAA">
# [ ''[[#List.Amount|List.Amount]]'' albumlimit = -1 ]
# [ ''[[#Audio.Fields.Song|Audio.Fields.Song]]'' properties ]
# [ ''[[#Audio.Fields.Song|Audio.Fields.Song]]'' properties ]
# [ ''[[#List.Limits|List.Limits]]'' limits ]
# [ ''[[#List.Limits|List.Limits]]'' limits ]
# [ ''[[#List.Sort|List.Sort]]'' sort ]
# [ ''[[#List.Sort|List.Sort]]'' sort ]
# [ ''mixed'' filter ]
# [ ''boolean'' includesingles = true ]
# [ ''boolean'' allroles = false ] ''Whether or not to include all roles when filtering by artist, rather than default of excluding other contributors. When true it overrides any role filter value.''
</div>
</div>
'''Returns:'''  
'''Returns:'''  
<div style="margin-left: 20px; width: 60%; padding: 0px 5px 0px 5px; border-width: 1px; border-style: solid; border-color: #AAAAAA">
<div style="margin-left: 20px; width: 60%; padding: 0px 5px 0px 5px; border-width: 1px; border-style: solid; border-color: #AAAAAA">
{
'''Type:''' ''object''<br />
  "properties": {
'''Properties:'''
    "limits": {
* ''[[#List.LimitsReturned|List.LimitsReturned]]'' limits
      "$ref": "List.LimitsReturned",
* [ ''[[#Audio.Details.Song|Audio.Details.Song]]''[] songs ]
      "required": true
    },
    "songs": {
      "items": {
        "$ref": "Audio.Details.Song"
      },
      "type": "array"
    }
  },
  "type": "object"
}
</div>
</div>
{{hidden|style = width: 60%;|headerstyle = background: #cccccc;|contentstyle = text-align: left; border: 0px solid #AAAAAA;|JSON Schema Description|<syntaxhighlight lang="javascript" enclose="div">{
{{hidden|style = width: 60%;|headerstyle = background: #cccccc;|contentstyle = text-align: left; border: 0px solid #AAAAAA;|JSON Schema Description|<syntaxhighlight lang=json enclose="div">{
   "description": "Retrieve recently added songs",
   "description": "Retrieve all songs from specified album, artist or genre",
   "permission": "ReadData",
   "permission": "ReadData",
   "type": "method",
   "type": "method",
   "params": [
   "params": [
     {
     {
       "default": "-1",
       "$ref": "Audio.Fields.Song",
       "name": "albumlimit",
       "name": "properties"
      "required": false,
      "$ref": "List.Amount"
     },
     },
     {
     {
       "name": "properties",
       "$ref": "List.Limits",
       "required": false,
       "name": "limits"
      "$ref": "Audio.Fields.Song"
     },
     },
     {
     {
       "name": "limits",
       "$ref": "List.Sort",
       "required": false,
       "name": "sort"
      "$ref": "List.Limits"
     },
     },
     {
     {
       "name": "sort",
       "type": [
      "required": false,
        {
      "$ref": "List.Sort"
          "additionalProperties": false,
          "properties": {
            "genreid": {
              "$ref": "Library.Id",
              "description": "Song genre. Filter for existance of songs with this genre",
              "required": true
            }
          },
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "genre": {
              "description": "Song genre. Filter for existance of songs with this genre",
              "minLength": 1,
              "required": true,
              "type": "string"
            }
          },
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "artistid": {
              "$ref": "Library.Id",
              "required": true
            }
          },
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "artistid": {
              "$ref": "Library.Id",
              "required": true
            },
            "roleid": {
              "$ref": "Library.Id",
              "required": true
            }
          },
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "artistid": {
              "$ref": "Library.Id",
              "required": true
            },
            "role": {
              "minLength": 1,
              "required": true,
              "type": "string"
            }
          },
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "artist": {
              "minLength": 1,
              "required": true,
              "type": "string"
            }
          },
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "artist": {
              "minLength": 1,
              "required": true,
              "type": "string"
            },
            "roleid": {
              "$ref": "Library.Id",
              "required": true
            }
          },
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "artist": {
              "minLength": 1,
              "required": true,
              "type": "string"
            },
            "role": {
              "minLength": 1,
              "required": true,
              "type": "string"
            }
          },
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "albumid": {
              "$ref": "Library.Id",
              "required": true
            }
          },
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "album": {
              "minLength": 1,
              "required": true,
              "type": "string"
            }
          },
          "type": "object"
        },
        {
          "$ref": "List.Filter.Songs"
        }
      ],
      "name": "filter"
    },
    {
      "default": "true",
      "type": "boolean",
      "name": "includesingles"
    },
    {
      "default": "false",
      "description": "Whether or not to include all roles when filtering by artist, rather than default of excluding other contributors. When true it overrides any role filter value.",
      "type": "boolean",
      "name": "allroles"
     }
     }
   ],
   ],
   "returns": {
   "returns": {
    "type": "object",
     "properties": {
     "properties": {
       "limits": {
       "limits": {
Line 66: Line 193:
         "type": "array"
         "type": "array"
       }
       }
     },
     }
    "type": "object"
   }
   }
}</syntaxhighlight>}}
}</syntaxhighlight>}}

Latest revision as of 12:17, 10 July 2018

Retrieve all songs from specified album, artist or genre
Permissions:

  • ReadData

Parameters:

  1. [ Audio.Fields.Song properties ]
  2. [ List.Limits limits ]
  3. [ List.Sort sort ]
  4. [ mixed filter ]
  5. [ boolean includesingles = true ]
  6. [ boolean allroles = false ] Whether or not to include all roles when filtering by artist, rather than default of excluding other contributors. When true it overrides any role filter value.

Returns:

Type: object
Properties: