source: trunk/StreamVision/tunes.py@ 663

Last change on this file since 663 was 649, checked in by Nicholas Riley, 12 years ago

tunes.py: Static terminology for iTunes to work around 'gdte' bug in
iTunes 10.6.3, from <https://github.com/abarnert/itunesterms>.

StreamVision.py: Use above static terminology.

More information at <http://www.leancrew.com/all-this/2012/06/the-first-nail-in-the-coffin-of-python-appscript/>.

File size: 6.8 KB
Line 
1version = 1.1
2path = '/Applications/iTunes.app'
3
4classes = \
5[('print_settings', 'pset'),
6 ('application', 'capp'),
7 ('artwork', 'cArt'),
8 ('audio_CD_playlist', 'cCDP'),
9 ('audio_CD_track', 'cCDT'),
10 ('browser_window', 'cBrW'),
11 ('device_playlist', 'cDvP'),
12 ('device_track', 'cDvT'),
13 ('encoder', 'cEnc'),
14 ('EQ_preset', 'cEQP'),
15 ('EQ_window', 'cEQW'),
16 ('file_track', 'cFlT'),
17 ('folder_playlist', 'cFoP'),
18 ('item', 'cobj'),
19 ('library_playlist', 'cLiP'),
20 ('playlist', 'cPly'),
21 ('playlist_window', 'cPlW'),
22 ('radio_tuner_playlist', 'cRTP'),
23 ('shared_track', 'cShT'),
24 ('source', 'cSrc'),
25 ('track', 'cTrk'),
26 ('URL_track', 'cURT'),
27 ('user_playlist', 'cUsP'),
28 ('visual', 'cVis'),
29 ('window', 'cwin')]
30
31enums = \
32[('track_listing', 'kTrk'),
33 ('album_listing', 'kAlb'),
34 ('cd_insert', 'kCDi'),
35 ('standard', 'lwst'),
36 ('detailed', 'lwdt'),
37 ('stopped', 'kPSS'),
38 ('playing', 'kPSP'),
39 ('paused', 'kPSp'),
40 ('fast_forwarding', 'kPSF'),
41 ('rewinding', 'kPSR'),
42 ('off', 'kRpO'),
43 ('one', 'kRp1'),
44 ('all', 'kAll'),
45 ('small', 'kVSS'),
46 ('medium', 'kVSM'),
47 ('large', 'kVSL'),
48 ('library', 'kLib'),
49 ('iPod', 'kPod'),
50 ('audio_CD', 'kACD'),
51 ('MP3_CD', 'kMCD'),
52 ('device', 'kDev'),
53 ('radio_tuner', 'kTun'),
54 ('shared_library', 'kShd'),
55 ('unknown', 'kUnk'),
56 ('albums', 'kSrL'),
57 ('artists', 'kSrR'),
58 ('composers', 'kSrC'),
59 ('displayed', 'kSrV'),
60 ('songs', 'kSrS'),
61 ('none', 'kNon'),
62 ('Books', 'kSpA'),
63 ('folder', 'kSpF'),
64 ('Genius', 'kSpG'),
65 ('iTunes_U', 'kSpU'),
66 ('Library', 'kSpL'),
67 ('Movies', 'kSpI'),
68 ('Music', 'kSpZ'),
69 ('Party_Shuffle', 'kSpS'),
70 ('Podcasts', 'kSpP'),
71 ('Purchased_Music', 'kSpM'),
72 ('TV_Shows', 'kSpT'),
73 ('movie', 'kVdM'),
74 ('music_video', 'kVdV'),
75 ('TV_show', 'kVdT'),
76 ('user', 'kRtU'),
77 ('computed', 'kRtC')]
78
79properties = \
80[('copies', 'lwcp'),
81 ('collating', 'lwcl'),
82 ('starting_page', 'lwfp'),
83 ('ending_page', 'lwlp'),
84 ('pages_across', 'lwla'),
85 ('pages_down', 'lwld'),
86 ('error_handling', 'lweh'),
87 ('requested_print_time', 'lwqt'),
88 ('printer_features', 'lwpf'),
89 ('fax_number', 'faxn'),
90 ('target_printer', 'trpr'),
91 ('current_encoder', 'pEnc'),
92 ('current_EQ_preset', 'pEQP'),
93 ('current_playlist', 'pPla'),
94 ('current_stream_title', 'pStT'),
95 ('current_stream_URL', 'pStU'),
96 ('current_track', 'pTrk'),
97 ('current_visual', 'pVis'),
98 ('EQ_enabled', 'pEQ '),
99 ('fixed_indexing', 'pFix'),
100 ('frontmost', 'pisf'),
101 ('full_screen', 'pFSc'),
102 ('name', 'pnam'),
103 ('mute', 'pMut'),
104 ('player_position', 'pPos'),
105 ('player_state', 'pPlS'),
106 ('selection', 'sele'),
107 ('sound_volume', 'pVol'),
108 ('version', 'vers'),
109 ('visuals_enabled', 'pVsE'),
110 ('visual_size', 'pVSz'),
111 ('data', 'pPCT'),
112 ('description', 'pDes'),
113 ('downloaded', 'pDlA'),
114 ('format', 'pFmt'),
115 ('kind', 'pKnd'),
116 ('raw_data', 'pRaw'),
117 ('artist', 'pArt'),
118 ('compilation', 'pAnt'),
119 ('composer', 'pCmp'),
120 ('disc_count', 'pDsC'),
121 ('disc_number', 'pDsN'),
122 ('genre', 'pGen'),
123 ('year', 'pYr '),
124 ('location', 'pLoc'),
125 ('minimized', 'pMin'),
126 ('view', 'pPly'),
127 ('band_1', 'pEQ1'),
128 ('band_2', 'pEQ2'),
129 ('band_3', 'pEQ3'),
130 ('band_4', 'pEQ4'),
131 ('band_5', 'pEQ5'),
132 ('band_6', 'pEQ6'),
133 ('band_7', 'pEQ7'),
134 ('band_8', 'pEQ8'),
135 ('band_9', 'pEQ9'),
136 ('band_10', 'pEQ0'),
137 ('modifiable', 'pMod'),
138 ('preamp', 'pEQA'),
139 ('update_tracks', 'pUTC'),
140 ('container', 'ctnr'),
141 ('id', 'ID '),
142 ('index', 'pidx'),
143 ('persistent_ID', 'pPIS'),
144 ('duration', 'pDur'),
145 ('parent', 'pPlP'),
146 ('shuffle', 'pShf'),
147 ('size', 'pSiz'),
148 ('song_repeat', 'pRpt'),
149 ('special_kind', 'pSpK'),
150 ('time', 'pTim'),
151 ('visible', 'pvis'),
152 ('capacity', 'capa'),
153 ('free_space', 'frsp'),
154 ('album', 'pAlb'),
155 ('album_artist', 'pAlA'),
156 ('album_rating', 'pAlR'),
157 ('album_rating_kind', 'pARk'),
158 ('bit_rate', 'pBRt'),
159 ('bookmark', 'pBkt'),
160 ('bookmarkable', 'pBkm'),
161 ('bpm', 'pBPM'),
162 ('category', 'pCat'),
163 ('comment', 'pCmt'),
164 ('database_ID', 'pDID'),
165 ('date_added', 'pAdd'),
166 ('enabled', 'enbl'),
167 ('episode_ID', 'pEpD'),
168 ('episode_number', 'pEpN'),
169 ('EQ', 'pEQp'),
170 ('finish', 'pStp'),
171 ('gapless', 'pGpl'),
172 ('grouping', 'pGrp'),
173 ('long_description', 'pLds'),
174 ('lyrics', 'pLyr'),
175 ('modification_date', 'asmo'),
176 ('played_count', 'pPlC'),
177 ('played_date', 'pPlD'),
178 ('podcast', 'pTPc'),
179 ('rating', 'pRte'),
180 ('rating_kind', 'pRtk'),
181 ('release_date', 'pRlD'),
182 ('sample_rate', 'pSRt'),
183 ('season_number', 'pSeN'),
184 ('shufflable', 'pSfa'),
185 ('skipped_count', 'pSkC'),
186 ('skipped_date', 'pSkD'),
187 ('show', 'pShw'),
188 ('sort_album', 'pSAl'),
189 ('sort_artist', 'pSAr'),
190 ('sort_album_artist', 'pSAA'),
191 ('sort_name', 'pSNm'),
192 ('sort_composer', 'pSCm'),
193 ('sort_show', 'pSSN'),
194 ('start', 'pStr'),
195 ('track_count', 'pTrC'),
196 ('track_number', 'pTrN'),
197 ('unplayed', 'pUnp'),
198 ('video_kind', 'pVdK'),
199 ('volume_adjustment', 'pAdj'),
200 ('address', 'pURL'),
201 ('shared', 'pShr'),
202 ('smart', 'pSmt'),
203 ('bounds', 'pbnd'),
204 ('closeable', 'hclb'),
205 ('collapseable', 'pWSh'),
206 ('collapsed', 'wshd'),
207 ('position', 'ppos'),
208 ('resizable', 'prsz'),
209 ('zoomable', 'iszm'),
210 ('zoomed', 'pzum')]
211
212elements = \
213[('artworks', 'cArt'),
214 ('audio_CD_playlists', 'cCDP'),
215 ('audio_CD_tracks', 'cCDT'),
216 ('browser_windows', 'cBrW'),
217 ('device_playlists', 'cDvP'),
218 ('device_tracks', 'cDvT'),
219 ('encoders', 'cEnc'),
220 ('EQ_presets', 'cEQP'),
221 ('EQ_windows', 'cEQW'),
222 ('file_tracks', 'cFlT'),
223 ('folder_playlists', 'cFoP'),
224 ('items', 'cobj'),
225 ('library_playlists', 'cLiP'),
226 ('playlists', 'cPly'),
227 ('playlist_windows', 'cPlW'),
228 ('radio_tuner_playlists', 'cRTP'),
229 ('shared_tracks', 'cShT'),
230 ('sources', 'cSrc'),
231 ('tracks', 'cTrk'),
232 ('URL_tracks', 'cURT'),
233 ('user_playlists', 'cUsP'),
234 ('visuals', 'cVis'),
235 ('windows', 'cwin'),
236 ('application', 'capp'),
237 ('print_settings', 'pset')]
238
239commands = \
240[('set', 'coresetd', [('to', 'data')]),
241 ('exists', 'coredoex', []),
242 ('move', 'coremove', [('to', 'insh')]),
243 ('subscribe', 'hookpSub', []),
244 ('playpause', 'hookPlPs', []),
245 ('download', 'hookDwnl', []),
246 ('close', 'coreclos', []),
247 ('open', 'aevtodoc', []),
248 ('open_location', 'GURLGURL', []),
249 ('quit', 'aevtquit', []),
250 ('pause', 'hookPaus', []),
251 ('make',
252 'corecrel',
253 [('new', 'kocl'), ('at', 'insh'), ('with_properties', 'prdt')]),
254 ('duplicate', 'coreclon', [('to', 'insh')]),
255 ('print_',
256 'aevtpdoc',
257 [('print_dialog', 'pdlg'),
258 ('with_properties', 'prdt'),
259 ('kind', 'pKnd'),
260 ('theme', 'pThm')]),
261 ('add', 'hookAdd ', [('to', 'insh')]),
262 ('rewind', 'hookRwnd', []),
263 ('play', 'hookPlay', [('once', 'POne')]),
264 ('run', 'aevtoapp', []),
265 ('resume', 'hookResu', []),
266 ('updatePodcast', 'hookUpd1', []),
267 ('next_track', 'hookNext', []),
268 ('stop', 'hookStop', []),
269 ('search', 'hookSrch', [('for_', 'pTrm'), ('only', 'pAre')]),
270 ('updateAllPodcasts', 'hookUpdp', []),
271 ('update', 'hookUpdt', []),
272 ('previous_track', 'hookPrev', []),
273 ('fast_forward', 'hookFast', []),
274 ('count', 'corecnte', [('each', 'kocl')]),
275 ('reveal', 'hookRevl', []),
276 ('convert', 'hookConv', []),
277 ('eject', 'hookEjct', []),
278 ('back_track', 'hookBack', []),
279 ('refresh', 'hookRfrs', []),
280 ('delete', 'coredelo', [])]
Note: See TracBrowser for help on using the repository browser.