User:Ncarthy: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
No edit summary
m (syntaxhighlighter fix after upgrade)
 
(8 intermediate revisions by one other user not shown)
Line 1: Line 1:
Executes the given addon with the given parameters (if possible)<br />
Retrieve all songs from specified album, artist or genre<br />
'''Permissions:'''
'''Permissions:'''
* ExecuteAddon
* 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">
[
# [ ''[[#Audio.Fields.Song|Audio.Fields.Song]]'' properties ]
  {
# [ ''[[#List.Limits|List.Limits]]'' limits ]
    "name": "addonid",
# [ ''[[#List.Sort|List.Sort]]'' sort ]
    "required": true,
# [ ''mixed'' filter ]
    "type": "string"
# [ ''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>
    "default": "",
'''Returns:'''
    "name": "params",
<div style="margin-left: 20px; width: 60%; padding: 0px 5px 0px 5px; border-width: 1px; border-style: solid; border-color: #AAAAAA">
    "type": [
'''Type:''' ''object''<br />
      {
'''Properties:'''
        "additionalProperties": {
* ''[[#List.LimitsReturned|List.LimitsReturned]]'' limits
          "default": "",
* [ ''[[#Audio.Details.Song|Audio.Details.Song]]''[] songs ]
          "type": "string"
        },
        "type": "object"
      },
      {
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      {
        "description": "URL path (must start with / or ?",
        "type": "string"
      }
    ]
  },
  {
    "default": false,
    "name": "wait",
    "type": "boolean"
  }
]
</div>
</div>
'''Returns:''' ''{
{{hidden|style = width: 60%;|headerstyle = background: #cccccc;|contentstyle = text-align: left; border: 0px solid #AAAAAA;|JSON Schema Description|<syntaxhighlight lang=json enclose="div">{
  "type": "string"
  "description": "Retrieve all songs from specified album, artist or genre",
}
  "permission": "ReadData",
''
  "type": "method",
{{hidden|style = width: 60%;|headerstyle = background: #cccccc;|contentstyle = text-align: left; border: 0px solid #AAAAAA;|JSON Schema Description|<syntaxhighlight lang="javascript" enclose="div">{{
   "params": [
   "params": [
     {
     {
       "name": "addonid",
      "$ref": "Audio.Fields.Song",
       "required": true,
      "name": "properties"
       "type": "string"
    },
    {
      "$ref": "List.Limits",
       "name": "limits"
    },
    {
       "$ref": "List.Sort",
       "name": "sort"
     },
     },
     {
     {
      "default": "",
      "name": "params",
       "type": [
       "type": [
         {
         {
           "additionalProperties": {
           "additionalProperties": false,
             "default": "",
          "properties": {
             "type": "string"
             "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"
           "type": "object"
         },
         },
         {
         {
           "items": {
           "additionalProperties": false,
             "type": "string"
          "properties": {
             "albumid": {
              "$ref": "Library.Id",
              "required": true
            }
           },
           },
           "type": "array"
           "type": "object"
         },
         },
         {
         {
           "description": "URL path (must start with / or ?",
           "additionalProperties": false,
           "type": "string"
          "properties": {
            "album": {
              "minLength": 1,
              "required": true,
              "type": "string"
            }
          },
           "type": "object"
        },
        {
          "$ref": "List.Filter.Songs"
         }
         }
       ]
       ],
      "name": "filter"
    },
    {
      "default": "true",
      "type": "boolean",
      "name": "includesingles"
     },
     },
     {
     {
       "default": false,
       "default": "false",
       "name": "wait",
       "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"
       "type": "boolean",
      "name": "allroles"
     }
     }
   ]
   ],
}}</syntaxhighlight>}}
  "returns": {
    "type": "object",
    "properties": {
      "limits": {
        "$ref": "List.LimitsReturned",
        "required": true
      },
      "songs": {
        "items": {
          "$ref": "Audio.Details.Song"
        },
        "type": "array"
      }
    }
  }
}</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: