Repository navigation
shorcut to like and dislike #4723
Replies: 1 comment
|
The current Shortcuts plugin cannot assign Like or Dislike from its settings: its configurable actions are only Previous, Play/Pause, and Next. The underlying Like and Dislike controls already exist, so you can add the two keybinds without adding a new player IPC command. I checked the current source files with this script: python3 - <<'PY'
from pathlib import Path
import re
index=Path('.tmp/galaxy-pear-index.ts').read_text()
main=Path('.tmp/galaxy-pear-main.ts').read_text()
controls=Path('.tmp/galaxy-pear-song-controls.ts').read_text()
block=index.split('export type ShortcutMappingType = {',1)[1].split('};',1)[0]
print('Configurable shortcut actions:', ', '.join(re.findall(r'^\s*(\w+): string;',block,re.M)))
print('Like and dislike controls exist:', all(re.search(r'^\s*'+a+r': \(\) =>',controls,re.M) for a in ('like','dislike')))
print('Registrar looks up songControls[action]:', 'songControls[action]' in main)
PY
Configurable shortcut actions: previous, playPause, next
Like and dislike controls exist: True
Registrar looks up songControls[action]: TrueTo implement it, add |
Uh oh!
There was an error while loading. Please reload this page.
i saw that the featured was asked earlier so i want to add it to my program, how do i do?
All reactions