Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SJBpost() Command/Event Names in Google Play Music
"addAlbumMenus",
"addFreeSongs",
"addPlaylistMenus",
"addSongListToCache",
"addSongsToPlaylist",
"addSongToList",
"addSongToList",
"addToAnimation",
"albumDeleted",
"albumDeleted",
"albumResults",
"albumSelected",
"allSongsChanged",
"allSongsChanged",
"allSongsChanged",
"allSongsChanged",
"allSongsReady",
"allSongsReady",
"allSongsUpdated",
"allSongsUpdated",
"allSongsUpdated",
"artistResults",
"artistSelected",
"artistSelected",
"artistSelected",
"browseAlbums",
"browseAlbums",
"browseArtists",
"browseArtists",
"browseBubbles",
"browseGenres",
"browseGenres",
"changeListOrder",
"changeListOrder",
"changeSongListId",
"changeSongListId",
"clearContinuation",
"clearStatus",
"copyAllCuratedDataAndHide",
"copyCuratedData",
"createMagicPlaylist",
"createPlaylist",
"createPlaylist",
"deleteAllLists",
"deleteAllLists",
"deleteList",
"deletePlaylist",
"deletePlaylist",
"deleteSongRows",
"deleteSongs",
"deleteSongs",
"delSongInPlaylist",
"delSongInPlaylist",
"delSongInPlaylist",
"delSongInPlaylist",
"downloadSongs",
"dragEnd",
"dragStart",
"editAlbumArt",
"editAlbumMetadata",
"editPlaylistName",
"editSongMetadata",
"executeQuery",
"executeQuery",
"executeQuery",
"hideBrandPromo",
"hideCuratedData",
"hidePurchasedPromo",
"hideUploadPromo",
"historyItem",
"imgOnError",
"installManager",
"invalidateNewAndRecent",
"invalidatePlaylistQueue",
"listSize",
"loadSharedWithMe",
"modifySongs",
"modifySongs",
"modifySongs",
"modifySongs",
"modifySongs",
"modifySongs",
"modifySongs",
"modifySongsComplete",
"modifyVolume",
"newAndRecentUpdated",
"nextSong",
"nowPlayingMenu",
"nukeLocker",
"onBodyLoaded",
"onBodyLoaded",
"onBodyLoaded",
"onBodyLoaded",
"onBodyLoaded",
"onBodyLoaded",
"onBodyLoaded",
"openMoreTopLinks",
"pageLoaded",
"pageLoaded",
"pageLoaded",
"pageLoaded",
"pauseSong",
"playHistoryItem",
"playlistCreated",
"playlistCreated",
"playlistCreated",
"playlistCreated",
"playlistSelected",
"playlistSelected",
"playlistSelected",
"playlistSelected",
"playPause",
"playPause",
"playPause",
"playPlaylist",
"playSelected",
"playSelected",
"playSong",
"playSong",
"playSong",
"playSong",
"playSongList",
"preloadSong",
"prevSong",
"processRemoteCommand",
"ratingUpdated",
"ratingUpdated",
"ratingUpdated",
"rebuildMenus",
"recommendationsready",
"refreshCurrentView",
"removeMenus",
"replaceBreadcrumb",
"reportFeedback",
"requestPreload",
"saveLabs",
"savePromoPacksSelection",
"saveSettings",
"seekPlayer",
"selectYoutubeVideo",
"setAlbumPageTitle",
"setAlbumPageTitle",
"setCurrentlyPlaying",
"settingsDeauthorize",
"settingsDeleteLibrary",
"settingsRefreshLibrary",
"setupPanelDragDrop",
"setupPanelDragDrop",
"sharePreview",
"shareYoutubeVideo",
"showAdvertiseBanner",
"showAdvertiseBanner",
"showEmptyLibrary",
"showFreeSongs",
"showLabs",
"showMusicManager",
"showNowPlaying",
"showPanel",
"showPanel",
"showPanel",
"showSettings",
"showSharedWithMe",
"showSongMenu",
"showVolume",
"shuffleAll",
"skipUrlClicked",
"songCountUpdate",
"songCountUpdate",
"songDeleted",
"songDeleted",
"songDeleted",
"songDeleted",
"songDeleted",
"songDeleted",
"songDeleted",
"songList",
"songList",
"songList",
"songList",
"songList",
"songList",
"songListSort",
"songListUpdated",
"songPaused",
"songPaused",
"songPaused",
"songPaused",
"songSelected",
"songSelected",
"songStartedPlaying",
"songStartedPlaying",
"songStartedPlaying",
"songStoppedPlaying",
"songUnPaused",
"songUnPaused",
"songUnPaused",
"songUnPaused",
"songUnPaused",
"songUploaded",
"sortCachedSongList",
"soundIoError",
"soundLoadComplete",
"soundPlayComplete",
"stopPlay",
"stopPlay",
"stopPlay",
"stopPlay",
"tagSelected",
"tagSelected",
"tagSelected",
"thumbsDownPlayer",
"thumbsUpPlayer",
"toggleRepeat",
"toggleRepeat",
"toggleShuffle",
"toggleShuffle",
"toggleShuffle",
"unknownNavToken",
"unknownNavToken",
"unknownNavToken",
"unknownNavToken",
"unknownNavToken",
"unknownNavToken",
"updatePlaylist",
"updatePlaylist",
"updatePlaylist",
"updatePlaylist",
"updatePlaylistsView",
"updatePlaylistsView",
"updateRating",
"updateSongDom",
"updateUploadStatus",
"useSuggestResult",
"youTubeResults"
@mrcasals

This comment has been minimized.

Copy link

commented Nov 13, 2013

"nextSong" and "prevSong" don't seem to work anymore. Any idea?

@hhoang

This comment has been minimized.

Copy link

commented Nov 14, 2013

I ran into the same problem, looks like google changed the prev and next commands. Breaks the alfred workflows available out there.

I was able to change the applescript to simulate click events instead and that seems to work.
I changed the hotkey arguments to 1, 2 & 3. Where 1 refers to previous. 2 refers to playPause, and 3 is next song.

Hopefully this helps?

    tell t to execute javascript "(document.getElementsByClassName('flat-button')[" & action & "]).click();"
@jeff-mccarthy

This comment has been minimized.

Copy link

commented Nov 20, 2013

tell t to execute javascript "(document.getElementsByClassName('flat-button')[" & action & "]).click();"

This fixed it, thank you! This should be easier to update, too.

@bebraw

This comment has been minimized.

Copy link

commented Nov 22, 2013

Thanks a lot! This definitely helped.

I linked to this gist at Charles Wilkinson's post about the topic. If someone wants to learn how to set up Automator scripts to control the player, that post will show you how.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.