Helper to import listens of a music player app to ListenBrainz.
Written for Muzio Player, but can maybe be adapted for other players.
| #!/bin/bash | |
| # This script is a small helper script to modify Linux Mint's / Cinnamon's behavior on pressing Alt+F4. | |
| # The current behavior is to close the active window, but do nothing if no window is focused. | |
| # From MS Windows i was used to focusing the Desktop and clicking Alt+F4 to open the computer's shutdown dialog. | |
| # This script restores this functionality. | |
| # Usage: | |
| # - Register the script as a custom keyboard shortcut by opening the Settings applet --> Keyboard and activating the Keyboard shortcuts tab. | |
| # - From there, click "Create own keyboard shortcut", give the shortcut a name (e.g. custom window close), and select this script as the target. |
| --[[ | |
| Tries to extract artist and title from the filename. | |
| Expected file name format: <artist> - <title>.ext | |
| Usage: put this script inside <vlc-dir>/lua/meta/fetcher folder (create if not present). | |
| If a music file is opened without meta tags, the script analyzes the filename and, if the pattern applies, sets the extracted artist and title info as metadata. | |
| --]] | |
| function descriptor() | |
| return { scope="local" } |
| const fs = require('fs'); | |
| const { exit } = require('process'); | |
| const readline = require('readline'); | |
| const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); | |
| const prompt = query => new Promise(resolve => rl.question(query, resolve)); | |
| const {sep} = require('path') | |
| // TODO: The current color-coding does not work (first, it seems to be the same for every stage in woov; second, ical expects CSS3 named colors and not css hex string like woov provides) | |
| // TODO: The schema provides the possibility to set artist overrides per show. Have never seen one being set, though. Thus not yet implemented. |
Helper to import listens of a music player app to ListenBrainz.
Written for Muzio Player, but can maybe be adapted for other players.