Find Music / FindMusic (internally is.workflow.actions.filter.music)

This action is not yet complete. Some arguments may be missing.

This action requires that Shortcuts has permission to use WFAppleMusicAccessResource.

usage

FindMusic filter=:filter{...} sortby=("Last Played Date" | "File Extension" | "Release Date" | "Genre" | "Media Kind" | "Name" | "Artist" | "Creation Date" | "Composer" | "Duration" | "Disc #" | "Last Modified Date" | "Date Added" | "Play Count" | "Album Artwork" | "Album Track #" | "Has Album Artwork" | "Rating" | "Is Explicit" | "Comments" | "Skip Count" | "File Size" | "Lyrics" | "Is Cloud Item" | "Album Artist" | "Album" | "Random") order=("Oldest First" | "Newest First" | "Latest First" | "Smallest First" | "Biggest First" | "Ascending" | "Descending" | "Shortest First" | "Longest First" | "A to Z" | "Z to A") limit=(true | false | variable) getItems=number

arguments


filter: Filter (Docs)

Accepts a :filter{} of filters. This filter supports:

  • lastplayeddate (Not yet supported. Submit an Issue)
  • fileextension (Not yet supported. Submit an Issue)
  • releasedate (Not yet supported. Submit an Issue)
  • genre (Supported for is, isnot, contains, doesnotcontain, beginswith, endswith)
  • mediakind (Supported for is, isnot) (Must be one of: Movie, TV Show, Music, Podcast, Music Video, iTunes U, Audiobook)
  • name (Supported for is, isnot, contains, doesnotcontain, beginswith, endswith)
  • artist (Supported for is, isnot, contains, doesnotcontain, beginswith, endswith)
  • creationdate (Not yet supported. Submit an Issue)
  • composer (Not yet supported. Submit an Issue)
  • duration (Not yet supported. Submit an Issue)
  • disc (Not yet supported. Submit an Issue)
  • lastmodifieddate (Not yet supported. Submit an Issue)
  • dateadded (Not yet supported. Submit an Issue)
  • playcount (Not yet supported. Submit an Issue)
  • albumartwork (Not yet supported. Submit an Issue)
  • albumtrack (Not yet supported. Submit an Issue)
  • hasalbumartwork (Supported for is)
  • rating (Not yet supported. Submit an Issue)
  • isexplicit (Supported for is)
  • comments (Supported for is, isnot, contains, doesnotcontain, beginswith, endswith)
  • skipcount (Not yet supported. Submit an Issue)
  • filesize (Not yet supported. Submit an Issue)
  • lyrics (Supported for is, isnot, contains, doesnotcontain, beginswith, endswith)
  • isclouditem (Supported for is)
  • albumartist (Supported for is, isnot, contains, doesnotcontain, beginswith, endswith)
  • album (Supported for is, isnot, contains, doesnotcontain, beginswith, endswith).

Example: :filter{name is testname}


sortby: Enumeration (Docs)

Allows Variables: true

Accepts a string or variable containing one of the options:

  • Last Played Date
  • File Extension
  • Release Date
  • Genre
  • Media Kind
  • Name
  • Artist
  • Creation Date
  • Composer
  • Duration
  • Disc #
  • Last Modified Date
  • Date Added
  • Play Count
  • Album Artwork
  • Album Track #
  • Has Album Artwork
  • Rating
  • Is Explicit
  • Comments
  • Skip Count
  • File Size
  • Lyrics
  • Is Cloud Item
  • Album Artist
  • Album
  • Random

order: Enumeration (Docs)

Allows Variables: true

Only enabled if: argument WFContentItemSortProperty != Random

Accepts a string or variable containing one of the options:

  • Oldest First
  • Newest First
  • Latest First
  • Smallest First
  • Biggest First
  • Ascending
  • Descending
  • Shortest First
  • Longest First
  • A to Z
  • Z to A

limit: Switch (Docs)

Allows Variables: true

Accepts a boolean or a variable.


getItems: Stepper Number (Docs)

Allows Variables: true

Only enabled if: argument WFSwitchParameter == true

	Accepts a number 
	or variable
	with a number.

source json (for developers)

{
	"ActionClass": "WFContentItemFilterAction",
	"AppIdentifier": "com.apple.Music",
	"Category": "Music",
	"CreationDate": "2015-01-22T08:00:00.000Z",
	"Input": {
		"Types": [
			"WFMPMediaContentItem",
			"WFAVAssetContentItem",
			"WFGenericFileContentItem"
		]
	},
	"Name": "Find Music",
	"RequiredResources": [
		"WFAppleMusicAccessResource"
	],
	"Subcategory": "Music",
	"WFContentItemClass": "WFMPMediaContentItem",
	"WFContentItemDefaultProperty": "Artist",
	"Parameters": [
		{
			"Class": "WFFilterParameter",
			"Key": "WFContentItemFilter",
			"Label": "Filter",
			"ContentItemClass": "WFMPMediaContentItem"
		},
		{
			"Class": "WFEnumerationParameter",
			"Key": "WFContentItemSortProperty",
			"Label": "Sort by",
			"Items": [
				"Last Played Date",
				"File Extension",
				"Release Date",
				"Genre",
				"Media Kind",
				"Name",
				"Artist",
				"Creation Date",
				"Composer",
				"Duration",
				"Disc #",
				"Last Modified Date",
				"Date Added",
				"Play Count",
				"Album Artwork",
				"Album Track #",
				"Has Album Artwork",
				"Rating",
				"Is Explicit",
				"Comments",
				"Skip Count",
				"File Size",
				"Lyrics",
				"Is Cloud Item",
				"Album Artist",
				"Album",
				"Random"
			]
		},
		{
			"Class": "WFEnumerationParameter",
			"Key": "WFContentItemSortOrder",
			"Label": "Order",
			"Items": [
				"Oldest First",
				"Newest First",
				"Latest First",
				"Smallest First",
				"Biggest First",
				"Ascending",
				"Descending",
				"Shortest First",
				"Longest First",
				"A to Z",
				"Z to A"
			],
			"RequiredResources": [
				{
					"WFParameterKey": "WFContentItemSortProperty",
					"WFParameterValues": [
						"Random"
					],
					"WFResourceClass": "WFParameterRelationResource",
					"WFParameterRelation": "!="
				}
			]
		},
		{
			"Class": "WFSwitchParameter",
			"Key": "WFContentItemLimitEnabled",
			"Label": "Limit"
		},
		{
			"Class": "WFStepperParameter",
			"Key": "WFContentItemLimitNumber",
			"Label": "Get Items",
			"RequiredResources": [
				{
					"WFParameterKey": "WFSwitchParameter",
					"WFParameterValues": [
						true
					],
					"WFResourceClass": "WFParameterRelationResource"
				}
			]
		}
	]
}