Custom scripting using Local-exported JSON and CSV files

As I mentioned in the main thread, I’m working on a script to manually bulk-upload the most recent queue of tracks from the JSON or CSV file provided by Listening Post.

  • I’m assuming the “id” field is an internal number for Listening Post, correct?

  • Would it be possible for LP to put quotation marks around instances of “true” or “false” in the JSON file? This will make it easier when parsing the text. The specific fields are explicitContent and isLiked.

  • I see fields for releaseYear, mbid, lastfmURL and listenbrainzURL, but in my tests so far, these are not being populated. Are those just placeholders for now?

Disregard the third question — already found my answer. :wink: “Each source is only queried when its corresponding channel is enabled and configured.” The secret was to enable each channel but disable “Automatically scrobble new tracks.”

I’m assuming the “id” field is an internal number for Listening Post, correct?

Yes.

Would it be possible for LP to put quotation marks around instances of “true” or “false” in the JSON file? This will make it easier when parsing the text. The specific fields are explicitContent and isLiked.

No, because these are meant to be booleans, not strings. Sorry.

This ended up not being the issue I expected it to be — I was thinking I was going to be parsing the JSON file using regular expression searches, but then realized I could import each line of the JSON one at a time into a dictionary. Much less work! :blush: