Last active
December 3, 2019 15:11
-
-
Save ci7lus/db7983f00f1314b0d4c4961203cd49aa to your computer and use it in GitHub Desktop.
https://is.gd/0tbKEf (scrapbox.io/ci7lus)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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