-
Notifications
You must be signed in to change notification settings - Fork 3
/
Spotify.sdef
126 lines (126 loc) · 6.17 KB
/
Spotify.sdef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
<dictionary title="Dictionary">
<suite name="Spotify Suite" code="spfy" description="Spotify specific classes.">
<enumeration name="ePlS" code="ePlS">
<enumerator name="stopped" code="kPSS">
<cocoa integer-value="0"/>
</enumerator>
<enumerator name="playing" code="kPSP">
<cocoa integer-value="1"/>
</enumerator>
<enumerator name="paused" code="kPSp">
<cocoa integer-value="2"/>
</enumerator>
</enumeration>
<value-type name="image data" code="spIm" description="Image data in TIFF format.">
<cocoa class="NSImage"/>
</value-type>
<class name="application" code="capp" description="The Spotify application.">
<cocoa class="SPApplication"/>
<property name="current track" code="pTrk" description="The current playing track." type="track" access="r">
<cocoa key="currentTrack"/>
</property>
<property name="sound volume" code="pVol" description="The sound output volume (0 = minimum, 100 = maximum)" type="integer">
<cocoa key="soundVolume"/>
</property>
<property name="player state" code="pPlS" description="Is Spotify stopped, paused, or playing?" type="ePlS" access="r">
<cocoa key="playerState"/>
</property>
<property name="player position" code="pPos" description="The player’s position within the currently playing track in seconds." type="real">
<cocoa key="playbackPosition"/>
</property>
<property name="repeating enabled" code="pReE" description="Is repeating enabled in the current playback context?" type="boolean" access="r">
<cocoa key="repeatEnabled"/>
</property>
<property name="repeating" code="pRep" description="Is repeating on or off?" type="boolean">
<cocoa key="repeat"/>
</property>
<property name="shuffling enabled" code="pReE" description="Is shuffling enabled in the current playback context?" type="boolean" access="r">
<cocoa key="shuffleEnabled"/>
</property>
<property name="shuffling" code="pShu" description="Is shuffling on or off?" type="boolean">
<cocoa key="shuffle"/>
</property>
</class>
<class name="track" code="spTr" description="A Spotify track." plural="tracks">
<cocoa class="SPAppleScriptTrack"/>
<property name="artist" code="pArt" description="The artist of the track." type="text" access="r">
<cocoa key="artist"/>
</property>
<property name="album" code="pAlb" description="The album of the track." type="text" access="r">
<cocoa key="album"/>
</property>
<property name="disc number" code="pDsN" description="The disc number of the track." type="integer" access="r">
<cocoa key="discNumber"/>
</property>
<property name="duration" code="pDur" description="The length of the track in seconds." type="integer" access="r">
<cocoa key="duration"/>
</property>
<property name="played count" code="pPlC" description="The number of times this track has been played." type="integer" access="r">
<cocoa key="playCount"/>
</property>
<property name="track number" code="pTrN" description="The index of the track in its album." type="integer" access="r">
<cocoa key="trackNumber"/>
</property>
<property name="starred" code="spSt" description="Is the track starred?" type="boolean" access="r">
<cocoa key="starred"/>
</property>
<property name="popularity" code="spPo" description="How popular is this track? 0-100" type="integer" access="r">
<cocoa key="popularity"/>
</property>
<property name="id" code="ID " description="The ID of the item." type="text" access="r">
<cocoa key="applescriptID"/>
</property>
<property name="name" code="pnam" description="The name of the track." type="text" access="r">
<cocoa key="title"/>
</property>
<property name="artwork" code="tAwk" description="The track's album cover." type="image data" access="r">
<cocoa key="cover"/>
</property>
<property name="album artist" code="pAlA" description="That album artist of the track." type="text" access="r">
<cocoa key="albumArtist"/>
</property>
<property name="spotify url" code="spur" description="The URL of the track." type="text">
<cocoa key="spotifyURL"/>
</property>
</class>
<command name="next track" code="spfyNext" description="Skip to the next track.">
<cocoa class="SPNextTrackScriptCommand"/>
</command>
<command name="previous track" code="spfyPrev" description="Skip to the previous track.">
<cocoa class="SPPreviousTrackScriptCommand"/>
</command>
<command name="playpause" code="spfyPlPs" description="Toggle play/pause.">
<cocoa class="SPPlayPauseScriptCommand"/>
</command>
<command name="pause" code="spfyPaus" description="Pause playback.">
<cocoa class="SPPauseScriptCommand"/>
</command>
<command name="play" code="spfyPlay" description="Resume playback.">
<cocoa class="SPPlayScriptCommand"/>
</command>
<command name="play track" code="spfyPCtx" description="Start playback of a track in the given context.">
<cocoa class="SPPlayTrackScriptCommand"/>
<direct-parameter type="text" description="the URI of the track to play"/>
<parameter type="text" name="in context" code="cotx" optional="yes" description="the URI of the context to play in">
<cocoa key="context"/>
</parameter>
</command>
</suite>
<!-- <xi:include href="file:///System/Library/ScriptingDefinitions/CocoaStandard.sdef" xpointer="xpointer(/dictionary/suite)"/> -->
<suite name="Standard Suite" code="????" description="Common classes and commands for most applications.">
<cocoa name="NSCoreSuite"/>
<class name="application" code="capp" description="The application's top level scripting object.">
<cocoa class="NSApplication"/>
<property name="name" code="pnam" description="The name of the application." type="text" access="r"/>
<property name="frontmost" code="pisf" description="Is this the frontmost (active) application?" type="boolean" access="r">
<cocoa key="isActive"/>
</property>
<property name="version" code="vers" description="The version of the application." type="text" access="r"/>
<responds-to command="quit">
<cocoa method="handleQuitScriptCommand:"/>
</responds-to>
</class>
</suite>
</dictionary>