Skip to content

Instantly share code, notes, and snippets.

@ci7lus
Last active December 3, 2019 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ci7lus/db7983f00f1314b0d4c4961203cd49aa to your computer and use it in GitHub Desktop.
Save ci7lus/db7983f00f1314b0d4c4961203cd49aa to your computer and use it in GitHub Desktop.
https://is.gd/0tbKEf (scrapbox.io/ci7lus)
// MIT License - Copyright (c) 2019 ci7lus
import "@jxa/global-type"
import { run } from "@jxa/run"
const main = async () => {
const result: any[] = await run(() => {
const app = Application("Music")
const lib = app.sources.byId(63) // 決め打ちです、環境によって違うカモ!
const libPlaylist = lib.libraryPlaylists()[0] // libraryPlaylists はオブジェクトが1つしか入ってない Array
return libPlaylist.fileTracks().map((track: any) => {
return track.properties() // 全部 track.name() とかやってると更に遅かった気がする
})
})
console.log(result[0]) // 色違いボルケニオンゲット!
}
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment