Helper to import listens of a music player app to ListenBrainz.
Written for Muzio Player, but can maybe be adapted for other players.
--[[ | |
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 query = ` | |
query ($eid: ID!, $after: String) { | |
event(eventId: $eid) { | |
shows(first: 100, after: $after) { |
Helper to import listens of a music player app to ListenBrainz.
Written for Muzio Player, but can maybe be adapted for other players.