"""
iTunes / Music appscript terminology from osascript
"""

version = 1.1
path = '/Applications/iTunes.app'

classes = [
    ('print_settings', b'pset'),
    ('AirPlay_device', b'cAPD'),
    ('application', b'capp'),
    ('double_integer', b'comp'),
    ('picture', b'PICT'),
    ('artwork', b'cArt'),
    ('audio_CD_playlist', b'cCDP'),
    ('audio_CD_track', b'cCDT'),
    ('browser_window', b'cBrW'),
    ('encoder', b'cEnc'),
    ('EQ_preset', b'cEQP'),
    ('EQ_window', b'cEQW'),
    ('file_track', b'cFlT'),
    ('folder_playlist', b'cFoP'),
    ('item', b'cobj'),
    ('library_playlist', b'cLiP'),
    ('miniplayer_window', b'cMPW'),
    ('playlist', b'cPly'),
    ('playlist_window', b'cPlW'),
    ('radio_tuner_playlist', b'cRTP'),
    ('shared_track', b'cShT'),
    ('source', b'cSrc'),
    ('subscription_playlist', b'cSuP'),
    ('track', b'cTrk'),
    ('URL_track', b'cURT'),
    ('user_playlist', b'cUsP'),
    ('video_window', b'cNPW'),
    ('visual', b'cVis'),
    ('window', b'cwin')
]

enums = [
    ('track_listing', b'kTrk'),
    ('album_listing', b'kAlb'),
    ('cd_insert', b'kCDi'),
    ('standard', b'lwst'),
    ('detailed', b'lwdt'),
    ('stopped', b'kPSS'),
    ('playing', b'kPSP'),
    ('paused', b'kPSp'),
    ('fast_forwarding', b'kPSF'),
    ('rewinding', b'kPSR'),
    ('off', b'kRpO'),
    ('one', b'kRp1'),
    ('all', b'kAll'),
    ('songs', b'kShS'),
    ('albums', b'kShA'),
    ('groupings', b'kShG'),
    ('small', b'kVSS'),
    ('medium', b'kVSM'),
    ('large', b'kVSL'),
    ('library', b'kLib'),
    ('iPod', b'kPod'),
    ('audio_CD', b'kACD'),
    ('MP3_CD', b'kMCD'),
    ('radio_tuner', b'kTun'),
    ('shared_library', b'kShd'),
    ('iTunes_Store', b'kITS'),
    ('unknown', b'kUnk'),
    ('albums', b'kSrL'), ('artists', b'kSrR'),
    ('composers', b'kSrC'),
    ('displayed', b'kSrV'),
    ('songs', b'kSrS'),
    ('none', b'kNon'),
    ('Books', b'kSpA'),
    ('folder', b'kSpF'),
    ('Genius', b'kSpG'),
    ('iTunes_U', b'kSpU'),
    ('Library', b'kSpL'),
    ('Movies', b'kSpI'),
    ('Music', b'kSpZ'),
    ('Podcasts', b'kSpP'),
    ('Purchased_Music', b'kSpM'),
    ('TV_Shows', b'kSpT'),
    ('alert_tone', b'kMdL'),
    ('audiobook', b'kMdA'),
    ('book', b'kMdB'),
    ('home_video', b'kVdH'),
    ('iTunesU', b'kMdI'),
    ('movie', b'kVdM'),
    ('song', b'kMdS'),
    ('music_video', b'kVdV'),
    ('podcast', b'kMdP'),
    ('ringtone', b'kMdR'),
    ('TV_show', b'kVdT'),
    ('voice_memo', b'kMdO'),
    ('user', b'kRtU'),
    ('computed', b'kRtC'),
    ('computer', b'kAPC'),
    ('AirPort_Express', b'kAPX'),
    ('Apple_TV', b'kAPT'),
    ('AirPlay_device', b'kAPO'),
    ('unknown', b'kAPU'),
    ('purchased', b'kPur'),
    ('matched', b'kMat'),
    ('uploaded', b'kUpl'),
    ('ineligible', b'kRej'),
    ('removed', b'kRem'),
    ('error', b'kErr'),
    ('duplicate', b'kDup'),
    ('subscription', b'kSub'),
    ('no_longer_available', b'kRev'),
    ('not_uploaded', b'kUpP')
]

properties = [
    ('active', b'pAct'),
    ('address', b'pURL'),
    ('AirPlay_enabled', b'pAPE'),
    ('album', b'pAlb'),
    ('album_artist', b'pAlA'),
    ('album_disliked', b'pAHt'),
    ('album_loved', b'pALv'),
    ('album_rating', b'pAlR'),
    ('album_rating_kind', b'pARk'),
    ('artist', b'pArt'),
    ('available', b'pAva'),
    ('band_1', b'pEQ1'),
    ('band_10', b'pEQ0'),
    ('band_2', b'pEQ2'),
    ('band_3', b'pEQ3'),
    ('band_4', b'pEQ4'),
    ('band_5', b'pEQ5'),
    ('band_6', b'pEQ6'),
    ('band_7', b'pEQ7'),
    ('band_8', b'pEQ8'),
    ('band_9', b'pEQ9'),
    ('bit_rate', b'pBRt'),
    ('bookmark', b'pBkt'),
    ('bookmarkable', b'pBkm'),
    ('bounds', b'pbnd'),
    ('bpm', b'pBPM'),
    ('capacity', b'capa'),
    ('category', b'pCat'),
    ('class_', b'pcls'),
    ('closeable', b'hclb'),
    ('cloud_status', b'pClS'),
    ('collapseable', b'pWSh'),
    ('collapsed', b'wshd'),
    ('collating', b'lwcl'),
    ('comment', b'pCmt'),
    ('compilation', b'pAnt'),
    ('composer', b'pCmp'),
    ('container', b'ctnr'),
    ('converting', b'pCnv'),
    ('copies', b'lwcp'),
    ('current_AirPlay_devices', b'pAPD'),
    ('current_encoder', b'pEnc'),
    ('current_EQ_preset', b'pEQP'),
    ('current_playlist', b'pPla'),
    ('current_stream_title', b'pStT'),
    ('current_stream_URL', b'pStU'),
    ('current_track', b'pTrk'),
    ('current_visual', b'pVis'),
    ('data', b'pPCT'),
    ('database_ID', b'pDID'),
    ('date_added', b'pAdd'),
    ('description', b'pDes'),
    ('disc_count', b'pDsC'),
    ('disc_number', b'pDsN'),
    ('disliked', b'pHat'),
    ('downloaded', b'pDlA'),
    ('downloader_Apple_ID', b'pDAI'),
    ('downloader_name', b'pDNm'),
    ('duration', b'pDur'),
    ('enabled', b'enbl'),
    ('ending_page', b'lwlp'),
    ('episode_ID', b'pEpD'),
    ('episode_number', b'pEpN'),
    ('EQ', b'pEQp'),
    ('EQ_enabled', b'bpEQ'),
    ('error_handling', b'lweh'),
    ('fax_number', b'faxn'),
    ('finish', b'pStp'),
    ('fixed_indexing', b'pFix'),
    ('format', b'pFmt'),
    ('free_space', b'frsp'),
    ('frontmost', b'pisf'),
    ('full_screen', b'pFSc'),
    ('gapless', b'pGpl'),
    ('genius', b'pGns'),
    ('genre', b'pGen'),
    ('grouping', b'pGrp'),
    ('id', b'bID '),
    ('index', b'pidx'),
    ('kind', b'pKnd'),
    ('location', b'pLoc'),
    ('long_description', b'pLds'),
    ('loved', b'pLov'),
    ('lyrics', b'pLyr'),
    ('media_kind', b'pMdK'),
    ('modifiable', b'pMod'),
    ('modification_date', b'asmo'),
    ('movement', b'pMNm'),
    ('movement_count', b'pMvC'),
    ('movement_number', b'pMvN'),
    ('mute', b'pMut'),
    ('name', b'pnam'),
    ('network_address', b'pMAC'),
    ('pages_across', b'lwla'),
    ('pages_down', b'lwld'),
    ('parent', b'pPlP'),
    ('persistent_ID', b'pPIS'),
    ('played_count', b'pPlC'),
    ('played_date', b'pPlD'),
    ('player_position', b'pPos'),
    ('player_state', b'pPlS'),
    ('position', b'ppos'),
    ('preamp', b'pEQA'),
    ('printer_features', b'lwpf'),
    ('properties', b'pALL'),
    ('protected', b'pPro'),
    ('purchaser_Apple_ID', b'pPAI'),
    ('purchaser_name', b'pPNm'),
    ('rating', b'pRte'),
    ('rating_kind', b'pRtk'),
    ('raw_data', b'pRaw'),
    ('release_date', b'pRlD'),
    ('requested_print_time', b'lwqt'),
    ('resizable', b'prsz'),
    ('sample_rate', b'pSRt'),
    ('season_number', b'pSeN'),
    ('selected', b'selc'),
    ('selection', b'sele'),
    ('shared', b'pShr'),
    ('show', b'pShw'),
    ('shufflable', b'pSfa'),
    ('shuffle', b'pShf'),
    ('shuffle_enabled', b'pShE'),
    ('shuffle_mode', b'pShM'),
    ('size', b'pSiz'),
    ('skipped_count', b'pSkC'),
    ('skipped_date', b'pSkD'),
    ('smart', b'pSmt'),
    ('song_repeat', b'pRpt'),
    ('sort_album', b'pSAl'),
    ('sort_album_artist', b'pSAA'),
    ('sort_artist', b'pSAr'),
    ('sort_composer', b'pSCm'),
    ('sort_name', b'pSNm'),
    ('sort_show', b'pSSN'),
    ('sound_volume', b'pVol'),
    ('special_kind', b'pSpK'),
    ('start', b'pStr'),
    ('starting_page', b'lwfp'),
    ('supports_audio', b'pAud'),
    ('supports_video', b'pVid'),
    ('target_printer', b'trpr'),
    ('time', b'pTim'),
    ('track_count', b'pTrC'),
    ('track_number', b'pTrN'),
    ('unplayed', b'pUnp'),
    ('update_tracks', b'pUTC'),
    ('version', b'vers'),
    ('video_kind', b'pVdK'),
    ('view', b'pPly'),
    ('visible', b'pvis'),
    ('visual_size', b'pVSz'),
    ('visuals_enabled', b'pVsE'),
    ('volume_adjustment', b'pAdj'),
    ('work', b'pWrk'),
    ('year', b'pYr '),
    ('zoomable', b'iszm'),
    ('zoomed', b'pzum'),
]

elements = [
    ('AirPlay_devices', b'cAPD'),
    ('applications', b'capp'),
    ('artworks', b'cArt'),
    ('audio_CD_playlists', b'cCDP'),
    ('audio_CD_tracks', b'cCDT'),
    ('browser_windows', b'cBrW'),
    ('encoders', b'cEnc'),
    ('EQ_presets', b'cEQP'),
    ('EQ_windows', b'cEQW'),
    ('file_tracks', b'cFlT'),
    ('folder_playlists', b'cFoP'),
    ('items', b'cobj'),
    ('library_playlists', b'cLiP'),
    ('miniplayer_windows', b'cMPW'),
    ('playlists', b'cPly'),
    ('playlist_windows', b'cPlW'),
    ('radio_tuner_playlists', b'cRTP'),
    ('shared_tracks', b'cShT'),
    ('sources', b'cSrc'),
    ('subscription_playlists', b'cSuP'),
    ('tracks', b'cTrk'),
    ('URL_tracks', b'cURT'),
    ('user_playlists', b'cUsP'),
    ('video_windows', b'cNPW'),
    ('visuals', b'cVis'),
    ('windows', b'cwin')
]

commands = [
    ('exists', b'coredoex', []),
    ('move', b'coremove', [('to', b'insh')]),
    ('subscribe', b'hookpSub', []),
    ('playpause', b'hookPlPs', []),
    ('download', b'hookDwnl', []),
    ('close', b'coreclos', []),
    ('open', b'aevtodoc', []),
    ('select', b'miscslct', []),
    ('open_location', b'GURLGURL', []),
    ('quit', b'aevtquit', []),
    ('pause', b'hookPaus', []),
    ('make', b'corecrel', [
        ('new', b'kocl'),
        ('at', b'insh'),
        ('with_properties', b'prdt')
    ]),
    ('duplicate', b'coreclon', [('to', b'insh')]),
    ('print_', b'aevtpdoc', [
        ('print_dialog', b'pdlg'),
        ('with_properties', b'prdt'),
        ('kind', b'pKnd'),
        ('theme', b'pThm')
    ]),
    ('add', b'hookAdd', [('to', b'insh')]),
    ('rewind', b'hookRwnd', []),
    ('save', b'coresave', []),
    ('play', b'hookPlay', [('once', b'POne')]),
    ('run', b'aevtoapp', []),
    ('resume', b'hookResu', []),
    ('updatePodcast', b'hookUpd1', []),
    ('next_track', b'hookNext', []),
    ('stop', b'hookStop', []),
    ('search', b'hookSrch', [
        ('for_', b'pTrm'),
        ('only', b'pAre')
    ]),
    ('updateAllPodcasts', b'hookUpdp', []),
    ('update', b'hookUpdt', []),
    ('previous_track', b'hookPrev', []),
    ('fast_forward', b'hookFast', []),
    ('count', b'corecnte', [('each', b'kocl')]),
    ('reveal', b'hookRevl', []),
    ('convert', b'hookConv', []),
    ('eject', b'hookEjct', []),
    ('back_track', b'hookBack', []),
    ('refresh', b'hookRfrs', []),
    ('delete', b'coredelo', [])
]
