Skip to content
This repository was archived by the owner on Nov 22, 2021. It is now read-only.
This repository was archived by the owner on Nov 22, 2021. It is now read-only.

New Feature: Keyboard shortcut for 'like' toggle #200

@gamemasta0

Description

@gamemasta0

I'm trying to write a new keyboard shortcut into soundcleod and have got the functionality down - a keyboard shortcut now toggles 'like' of the current track - but I don't know how to get the track data to describe in a notification what track has been liked and if a like was added or removed by pressing the shortcut.

The only code I've had to write to make this happen so far with a generalized notification "Track Like Toggled" is the following in main.js:

 globalShortcut.register('Option+Shift+L', () => {
	soundcloud.likeUnlike()
 	let title = "Track Like Toggled"
 	mainWindow.webContents.send('notification', {title})
 })

I used similar notification code to the function soundcloud.on('play-new-track'), but I don't know how to implement a similar soundcloud.on('track-liked') and soundcloud.on('track-disliked'). Is this possible with the SoundCloud API included in soundcleod? Is there documentation on the API? I was unable to locate it myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions