Git Product home page Git Product logo

apple-music-discord-rpc's Introduction

apple-music-discord-rpc's People

Contributors

alexanderbira avatar nextfire avatar renovate[bot] avatar rxri avatar ryantanrk avatar shiibe avatar sorae42 avatar themoonthatrises avatar trsvsr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apple-music-discord-rpc's Issues

After git pull, it broke

I used agent mode, after doing pull
Discord wasn't showing apple music
So i did "./music-rpc.ts"
and terminal gave this

error: TS2420 [ERROR]: Class 'NamedPipe' incorrectly implements interface 'Conn'.
Type 'NamedPipe' is missing the following properties from type 'Conn': readable, writable
export class NamedPipe implements Deno.Conn {
~~~~~~~~~
at https://deno.land/x/[email protected]/src/client.ts:27:14

TS2739 [ERROR]: Type 'NamedPipe' is missing the following properties from type 'Conn': readable, writable
return await connect(path);
~~~~~~~~~~~~~~~~~~~~~~~~~~~
at https://raw.githubusercontent.com/harmonyland/discord_rpc/1d41f3c830a66d4f2699774bc3ec5b44cceb3a46/src/util.ts:33:7

Found 2 errors.

bc i was upgrading from the old npm method
so i did remove the whole folder and tried again, still output this
any ideas?

Launch Agents

as far as I'm aware (which is little), brew install doesn't actually automatically create the plist in launch agent anymore on the M1 Mac, I've tried reinstalling too but to no avail.

had to resort to adding the app to apple's startup app manually, any suggestion to do it more elegantly?

the error in question is
Error: Permission denied @ rb_sysopen - /Users/finn/Library/LaunchAgents/homebrew.mxcl.apple-music-discord-rpc.plist

but upon looking through the folder "LaunchAgents", the plist file doesn't even exist

Random album artwork on certain local tracks

Both tracks shown below are local tracks, one seems to somehow be linked to an Apple Music/iTunes track. Here is a direct link to the album artwork that is being shown.

Clicking Play on Apple Music does nothing, but it doesn't seem to work for Apple Music tracks either in my case.

CleanShot 2023-01-01 at 21 30 22@2x

CleanShot 2023-01-01 at 21 31 14@2x

macOS 12.4
Discord Stable

Crash playing some songs

Crashed while playing a song and got this error

Traceback (most recent call last):
File "music-rpc-full.py", line 59, in
end = time.time() + float(infos[4]) - float(infos[5]))
ValueError: could not convert string to float: 'Wiz Khalifa & Juicy J) - Single'

Homebrew service not starting

when I play any music on the Apple Music app on the MacBook it doesn't show up on discord I tried restarting the Mac but nothing helped

Displaying Incorrect Album Artwork

When playing music on a playlist, the album artwork is sometimes inaccurate, and the artwork of another song in the playlist is displayed.

If it helps, I'm running MacOS Monterey 12.2.1, deno version 1.19.3 with discord Stable 118821 (4751bf9).

Expected Result:
Screenshot 2022-03-16 at 1 48 25 PM

Actual Result:
Screenshot 2022-03-16 at 1 46 22 PM

Doesn't show album art on songs not officially on apple music

Hence the title, it doesn't show the album art of a custom downloaded song (just shows the apple music logo)
And when I play a custom song by a certain artist it sometimes shows the album art of a different song they made instead, even tho I'm playing a mashup I made (Martin Garrix & MOTi's Virus and DJ EB & HoodSaded's Emotions)
Screenshot 2022-02-19 at 16 55 52

Also how do I get the absolute cloned repo path or whatever to work (Keeps throwing "Error5 missing input/output")

CPU 100% Bug

I am writing this because I wanted to report a bug that the CPU Usage goes up to 100% as you can see here

image

Thats all about the information I have.
I hope you can resolve the bug, because with almost 100% CPU it's not really usable.

Load failed: 5: Input/output error

When installing via Script.

Running install.sh will give errors:
Load failed: 5: Input/output error
no such file or directory: ./scripts/uninstall.sh
scripts/moe.yuru.music-rpc.plist: No such file or directory

Timeout and erroring when system is under very high load (0%)

Hey everyone,

First of all wanted to say that this is a great system you have, its amazing and works almost flawlessly :)

Got the following error when computer was under very high load (i.e. 0.0% CPU free), I think its because he did not wait long enough as the system was busy and couldn't give him the resources he wanted.

here is the full error output:

Error: AppleEvent timed out.
    at handleError (https://raw.githubusercontent.com/NextFire/jxa/64b6de1748ea063c01271edbe9846e37a584e1ab/run/mod.ts:180:9)
    at runInOsascript (https://raw.githubusercontent.com/NextFire/jxa/64b6de1748ea063c01271edbe9846e37a584e1ab/run/mod.ts:152:21)
    at async setActivity (file:///opt/homebrew/bin/music-rpc.ts:164:16)
    at async file:///opt/homebrew/bin/music-rpc.ts:74:9
Error: AppleEvent timed out.
    at handleError (https://raw.githubusercontent.com/NextFire/jxa/64b6de1748ea063c01271edbe9846e37a584e1ab/run/mod.ts:180:9)
    at runInOsascript (https://raw.githubusercontent.com/NextFire/jxa/64b6de1748ea063c01271edbe9846e37a584e1ab/run/mod.ts:152:21)
    at async setActivity (file:///opt/homebrew/bin/music-rpc.ts:164:16)
    at async file:///opt/homebrew/bin/music-rpc.ts:74:9
error: Uncaught (in promise) BadResource: Bad resource ID
    this.#ipcHandle.close();
                    ^
    at opSync (deno:core/01_core.js:170:12)
    at Conn.close (deno:ext/net/01_net.js:136:12)
    at DiscordIPC.close (https://raw.githubusercontent.com/harmonyland/discord_rpc/ba127c20816af15e2c3cd2c17d81248b097e9bd2/src/conn.ts:143:21)
    at Client.close (https://raw.githubusercontent.com/harmonyland/discord_rpc/ba127c20816af15e2c3cd2c17d81248b097e9bd2/src/client.ts:317:15)
    at file:///opt/homebrew/bin/music-rpc.ts:78:13
Error: AppleEvent timed out.
    at handleError (https://raw.githubusercontent.com/NextFire/jxa/64b6de1748ea063c01271edbe9846e37a584e1ab/run/mod.ts:180:9)
    at runInOsascript (https://raw.githubusercontent.com/NextFire/jxa/64b6de1748ea063c01271edbe9846e37a584e1ab/run/mod.ts:152:21)
    at async setActivity (file:///opt/homebrew/bin/music-rpc.ts:164:16)
    at async file:///opt/homebrew/bin/music-rpc.ts:74:9
error: Uncaught (in promise) BadResource: Bad resource ID
    this.#ipcHandle.close();
                    ^
    at opSync (deno:core/01_core.js:170:12)
    at Conn.close (deno:ext/net/01_net.js:136:12)
    at DiscordIPC.close (https://raw.githubusercontent.com/harmonyland/discord_rpc/ba127c20816af15e2c3cd2c17d81248b097e9bd2/src/conn.ts:143:21)
    at Client.close (https://raw.githubusercontent.com/harmonyland/discord_rpc/ba127c20816af15e2c3cd2c17d81248b097e9bd2/src/client.ts:317:15)
    at file:///opt/homebrew/bin/music-rpc.ts:78:13

[1]-  Exit 1                  music-rpc.ts
[2]+  Exit 1                  music-rpc.ts

I had it running in background.
Specs:

Apple M1 Max on 14" MacBook Pro
64GB Mem
10 Cores CPU
32 Cores GPU
3 total displays
0% CPU free at time of crash

P.S. Just to be clear, the 0% CPU Free was not due to this, I was running 25 instances of Python :) so not the fault of this program.

Thanks everyone!

Delay

Is there any way you can fix delay?

Apple Podcasts Support

Hi there!

I was wondering how hard it would be to connect this to Apple Podcasts as well. Would this be possible and if so, how could I be of assistance?

T

In profile section it shows:
Playing A Game (it should be something like Listening to Apple Music)

Also in the status it shows Playing Apple Music more appropriate would be Listening to Apple Music

No Song Art on streamed music.

Screenshot 2023-04-03 at 19 38 02

you cool project I love it it used to work fine for me but recently my cover art is not there. I am streaming the music and its not local!

RangeError: IPC ID must be between 0-9

Running on macOS Monterey version 12.2, with deno version 1.19.2.
Discord version: Canary 117519 (c1e9073)

Running ./music-rpc.ts give me this error:

RangeError: IPC ID must be between 0-9
    at getIPCPath (https://raw.githubusercontent.com/harmonyland/discord_rpc/ba127c20816af15e2c3cd2c17d81248b097e9bd2/src/util.ts:14:31)
    at findIPC (https://raw.githubusercontent.com/harmonyland/discord_rpc/ba127c20816af15e2c3cd2c17d81248b097e9bd2/src/util.ts:30:16)
    at findIPC (https://raw.githubusercontent.com/harmonyland/discord_rpc/ba127c20816af15e2c3cd2c17d81248b097e9bd2/src/util.ts:41:12)
    at async Function.connect (https://raw.githubusercontent.com/harmonyland/discord_rpc/ba127c20816af15e2c3cd2c17d81248b097e9bd2/src/conn.ts:40:18)
    at async Client.connect (https://raw.githubusercontent.com/harmonyland/discord_rpc/ba127c20816af15e2c3cd2c17d81248b097e9bd2/src/client.ts:85:16)
    at async main (file:///Users/sourtaste000/Developer/apple-music-discord-rpc/music-rpc.ts:19:5)

Deno problem

I am Window 11 user and I follow the instruction to install deno to powershell and try to use git clone as what you said. However, there is nothing happened and showing the sentences - Expected ';', '}' or at 1:5. I cannot clone the git to my deno terminal. What can I do? thank you

Does this work on Windows aswell?

Hello, windows user here. I would like to know if this can run on windows, because after installing everything and following the guide it doesn't work, and if it's not possible to run this with windows yet-- would it be possible to make a windows version? thanks!

RP won't show for some albums

With the script on and HomeBrew updated to the newest version, sometimes, the script runs into issues when it just stops playing as soon as a certain album comes on. I can be listening to a track, and then it shifts onto the album Z by SZA and it just stops showing.

Homebrew

This is so good, that should be added to the Homebrew - making it 2 commands :)

deno errors

Hi, I just installed the script and am getting a bunch of deno errors I'm not sure how to address:

        "pointer", /* lpFileName */
        ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:8:9

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
        "pointer", /* lpSecurityAttributes */
        ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:11:9

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
        "pointer", /* hTemplateFile */
        ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:14:9

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
      result: "pointer",
      ~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:16:7

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
        "pointer", /* hNamedPipe */
        ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:22:9

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
        "pointer", /* lpBuffer */
        ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:23:9

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
        "pointer", /* lpBytesRead */
        ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:25:9

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
        "pointer", /* lpTotalBytesAvail */
        ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:26:9

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
        "pointer", /* lpBytesLeftThisMessage */
        ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:27:9

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
      parameters: ["pointer"],
                   ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:34:20

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
      parameters: ["pointer"],
                   ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:40:20

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
        "pointer", /* hFile */
        ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:48:9

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
        "pointer", /* lpBuffer */
        ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:49:9

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
        "pointer", /* lpNumberOfBytesWritten */
        ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:51:9

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
        "pointer", /* lpOverlapped */
        ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:52:9

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
      parameters: ["pointer", "pointer", "u32", "pointer", "pointer"],
                   ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:62:20

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
      parameters: ["pointer", "pointer", "u32", "pointer", "pointer"],
                              ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:62:31

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
      parameters: ["pointer", "pointer", "u32", "pointer", "pointer"],
                                                ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:62:49

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
      parameters: ["pointer", "pointer", "u32", "pointer", "pointer"],
                                                           ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:62:60

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
        "pointer", /* lpName */
        ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:70:9

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
        "pointer", /* lpSecurityAttributes */
        ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:77:9

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
      result: "pointer",
      ~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:79:7

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
      parameters: ["pointer", "pointer"],
                   ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:85:20

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
      parameters: ["pointer", "pointer"],
                              ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:85:31

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
      parameters: ["pointer", "pointer", "pointer", "u8"],
                   ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:92:20

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
      parameters: ["pointer", "pointer", "pointer", "u8"],
                              ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:92:31

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
      parameters: ["pointer", "pointer", "pointer", "u8"],
                                         ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:92:42

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
      parameters: ["pointer", "pointer"],
                   ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:97:20

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
      parameters: ["pointer", "pointer"],
                              ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:97:31

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
        "pointer",
        ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:109:9

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
        "pointer",
        ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:112:9

TS2322 [ERROR]: Type '"pointer"' is not assignable to type 'NativeType'.
        "pointer",
        ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:114:9

TS2694 [ERROR]: Namespace 'Deno' has no exported member 'UnsafePointer'.
export type HANDLE = Deno.UnsafePointer;
                          ~~~~~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:157:27

TS2339 [ERROR]: Property 'UnsafePointer' does not exist on type 'typeof Deno'.
    new Deno.UnsafePointer(0n),
             ~~~~~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:171:14

TS2339 [ERROR]: Property 'UnsafePointer' does not exist on type 'typeof Deno'.
    new Deno.UnsafePointer(0n),
             ~~~~~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:174:14

TS2339 [ERROR]: Property 'UnsafePointer' does not exist on type 'typeof Deno'.
      new Deno.UnsafePointer(0n),
               ~~~~~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:219:16

TS2339 [ERROR]: Property 'UnsafePointer' does not exist on type 'typeof Deno'.
      new Deno.UnsafePointer(0n),
               ~~~~~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:238:16

TS2339 [ERROR]: Property 'UnsafePointer' does not exist on type 'typeof Deno'.
    new Deno.UnsafePointer(0n),
             ~~~~~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:318:14

TS2339 [ERROR]: Property 'UnsafePointerView' does not exist on type 'typeof Deno'.
  const lpBufferView = new Deno.UnsafePointerView(
                                ~~~~~~~~~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:369:33

TS2339 [ERROR]: Property 'UnsafePointer' does not exist on type 'typeof Deno'.
    new Deno.UnsafePointer(lpBufferPtr[0]),
             ~~~~~~~~~~~~~
    at https://deno.land/x/[email protected]/src/winapi.ts:370:14

TS2339 [ERROR]: Property 'view' does not exist on type 'never'.
        const v = ctx.byobRequest!.view as Uint8Array;
                                   ~~~~
    at https://deno.land/x/[email protected]/src/client.ts:160:36

TS2339 [ERROR]: Property 'respond' does not exist on type 'never'.
            ctx.byobRequest!.respond(0);
                             ~~~~~~~
    at https://deno.land/x/[email protected]/src/client.ts:166:30

TS2339 [ERROR]: Property 'respond' does not exist on type 'never'.
            ctx.byobRequest!.respond(n);
                             ~~~~~~~
    at https://deno.land/x/[email protected]/src/client.ts:168:30```

Any idea if this is something I can fix? I just installed deno for the first time as well. Thanks!

Error when starting service.

Error is as such: ``'Error: Failure while executing; /bin/launchctl enable gui/501/homebrew.mxcl.apple-music-discord-rpc exited with 125.'
`
`Using this on non admin computer, and using SU to switch to an admin account, should I not use brew and manually install?

Shows me playing for 19k days lol

Screenshot_2022-02-20_125216
my friend showed me this. it only shows the insane amount of days when you check via the friends list
Screenshot 2022-02-20 at 13 54 48
this for example

when you actually check my status the amount of days isnt there

Can't get the app to work anymore

Sorry I am not a pro-user, just a newbie. The app wont work for me anymore even after updating with brew upgrade

This is what the terminal is printing:

Client {
  ipc: DiscordIPC {},
  user: undefined,
  config: undefined,
  token: undefined,
  tokenExpires: undefined,
  application: undefined,
  options: { id: "773825528921849856" }
}
isOpen: true
state: playing
Error: Can't get object.
    at handleError (https://raw.githubusercontent.com/NextFire/jxa/64b6de1748ea063c01271edbe9846e37a584e1ab/run/mod.ts:180:9)
    at runInOsascript (https://raw.githubusercontent.com/NextFire/jxa/64b6de1748ea063c01271edbe9846e37a584e1ab/run/mod.ts:152:21)
    at async setActivity (file:///opt/homebrew/bin/music-rpc.ts:189:21)
    at async file:///opt/homebrew/bin/music-rpc.ts:74:9

How can I mod it?

Hi!

I want to remove the time elapsed on the bottom, and make the artist name and track title on the same line (for example: Deafheaven - Dream House, or like, How To Disappear Completly - The Wretched).

Is it possible for me to do that? If so, how?
Thanks in advance!

child "activity" fails because [child "state" fails because ["state" is not allowed to be empty]]

The RPC doesn't show up and the music-rpc.ts shows an error:

Client {
  ipc: DiscordIPC {},
  user: {
    id: "302644264876113920",
    username: "Paradise",
    discriminator: "0484",
    avatar: "06013634c97eae892225231844536591",
    avatar_decoration: null,
    bot: false,
    flags: 304
  },
  config: {
    cdn_host: "cdn.discordapp.com",
    api_endpoint: "//discord.com/api",
    environment: "production"
  },
  token: undefined,
  tokenExpires: undefined,
  application: undefined,
  options: { id: "773825528921849856" }
}
isOpen: true
state: playing
props: {
  class: "fileTrack",
  id: 446,
  index: 26,
  name: "Untitled 12 - 24:06:22 08.41",
  persistentID: "702F8B8A94AC3281",
  databaseID: 263,
  dateAdded: "2022-06-24T01:41:46.000Z",
  time: "3:36",
  duration: 216.88299560546875,
  artist: "",
  albumArtist: "",
  composer: "",
  album: "",
  genre: "",
  bitRate: 256,
  sampleRate: 44100,
  trackCount: 0,
  trackNumber: 0,
  discCount: 0,
  discNumber: 0,
  size: 7115081,
  volumeAdjustment: 0,
  year: 2022,
  comment: "",
  eq: "",
  kind: "AAC audio file",
  mediaKind: "song",
  modificationDate: "2022-06-24T01:41:38.000Z",
  enabled: true,
  start: 0,
  finish: 216.88299560546875,
  playedCount: 0,
  skippedCount: 1,
  skippedDate: "2022-07-01T07:15:29.000Z",
  compilation: false,
  rating: 0,
  bpm: 0,
  grouping: "",
  bookmarkable: false,
  bookmark: 0,
  shufflable: true,
  lyrics: "",
  category: "",
  description: "",
  episodeNumber: 0,
  unplayed: false,
  sortName: "",
  sortAlbum: "",
  sortArtist: "",
  sortComposer: "",
  sortAlbumArtist: "",
  loved: false,
  disliked: false,
  albumLoved: false,
  albumDisliked: false,
  cloudStatus: "unknown",
  work: "",
  movement: "",
  movementNumber: 0,
  movementCount: 0,
  location: {},
  playerPosition: 100.56300354003906
}
infos: { artwork: "appicon", url: null }
Error: (4000) child "activity" fails because [child "state" fails because ["state" is not allowed to be empty]]
    at DiscordIPC.#read (https://raw.githubusercontent.com/harmonyland/discord_rpc/ba127c20816af15e2c3cd2c17d81248b097e9bd2/src/conn.ts:180:11)
    at async https://raw.githubusercontent.com/harmonyland/discord_rpc/ba127c20816af15e2c3cd2c17d81248b097e9bd2/src/conn.ts:49:11

Trouble with Music Details

Yo! I just got it up and running on my mac (i'm on M1), and it's showing me this:

Screen Shot 2021-05-02 at 8 59 46 PM

any idea how i could fix this?

RangeError: IPC ID must be between 0-9

The script can't seem to detect Discord. I'm on the latest version of the stable branch.

This is what I get when I manually run the script:

Client {
  ipc: DiscordIPC {},
  user: undefined,
  config: undefined,
  token: undefined,
  tokenExpires: undefined,
  application: undefined,
  options: { id: "..." } <-removed
}

Display current activity is enabled in Discord

macOS 13.1, Discord Stable 168826 (3146690)

Album Art Incorrect every time

Hi!

I was recently encountering a bug where the album art for every song would be incorrect (it would would be an album art from my library, but not one that is the correct one). It started occuring right around the time I updated to macOS 12.3, though I am unsure if that is a direct cause of this issue. Thank you for creating this and I hope you are able to fix this issue!

Screen Shot 2022-03-23 at 4 25 28 PM

Screen Shot 2022-03-23 at 4 25 45 PM

Says INSTALL SUCCESS but just doesnt work

Maybe this might help?

user@MacBook-Pro apple-music-discord-rpc % ls -la scripts/
total 24
drwxr-xr-x 5 prakriti staff 160 Apr 16 05:57 .
drwxr-xr-x 13 prakriti staff 416 Apr 16 06:00 ..
-rwxr-xr-x 1 prakriti staff 804 Apr 16 05:57 install.sh
-rw-r--r-- 1 prakriti staff 674 Apr 16 05:57 moe.yuru.music-rpc.plist
-rwxr-xr-x 1 prakriti staff 231 Apr 16 05:57 uninstall.sh

rich presence not being set in macOs 12.3

script seems to run just fine (including good outputs in console) but i can't get the rich presence to be set on discord after upgrading to monterey from big sur

let me know if i can help with any debug information!!!

log
Client {
  options: { id: "773825528921849856" },
  ipc: DiscordIPC {},
  user: {
    id: "385196786438111233",
    username: "merilynn",
    discriminator: "1234",
    avatar: "0dbce623a026a372c3647d0d4d8df485",
    bot: false,
    flags: 528,
    premium_type: 2
  },
  config: {
    cdn_host: "cdn.discordapp.com",
    api_endpoint: "//discord.com/api",
    environment: "production"
  },
  token: undefined,
  tokenExpires: undefined,
  application: undefined
}
isOpen: true
state: playing
props: {
  class: "fileTrack",
  id: 9459,
  index: 1378,
  name: "Black Cat",
  persistentID: "BA16756898C727D0",
  databaseID: 6380,
  dateAdded: "2022-04-02T21:38:21.000Z",
  time: "3:58",
  duration: 238.4969940185547,
  artist: "Broadcast",
  albumArtist: "Broadcast",
  composer: "",
  album: "Tender Buttons",
  genre: "Leftfield/Synth-pop/Experimental",
  bitRate: 320,
  sampleRate: 44100,
  trackCount: 14,
  trackNumber: 2,
  discCount: 1,
  discNumber: 1,
  size: 9615553,
  volumeAdjustment: 0,
  year: 2005,
  comment: "Tumen Collection",
  eq: "",
  kind: "MPEG audio file",
  mediaKind: "song",
  modificationDate: "2022-03-31T05:56:44.000Z",
  enabled: true,
  start: 0,
  finish: 238.4969940185547,
  playedCount: 0,
  skippedCount: 0,
  compilation: false,
  rating: 0,
  bpm: 0,
  grouping: "",
  bookmarkable: false,
  bookmark: 0,
  shufflable: true,
  lyrics: "",
  category: "",
  description: "",
  episodeNumber: 0,
  unplayed: false,
  sortName: "",
  sortAlbum: "",
  sortArtist: "Broadcast",
  sortComposer: "",
  sortAlbumArtist: "Broadcast",
  loved: false,
  disliked: false,
  albumLoved: false,
  albumDisliked: false,
  cloudStatus: "unknown",
  work: "",
  movement: "",
  movementNumber: 0,
  movementCount: 0,
  location: {},
  playerPosition: 41.65399932861328
}
infos: {
  artwork: "https://is2-ssl.mzstatic.com/image/thumb/Music/v4/9b/5d/13/9b5d1300-f307-b0ed-b616-20bd3af30d45/sour...",
  url: "https://music.apple.com/us/album/tender-buttons/291071689?uo=4"
}

Not working after latest discord update?

Hi after the last update I'm not sure what happened...

let me know if you need some logs to help debug!

Client {
ipc: DiscordIPC {},
user: undefined,
config: undefined,
token: undefined,
tokenExpires: undefined,
application: undefined,
options: { id: "xxxxxx" }
}
Error: An error occured
at handleError (https://raw.githubusercontent.com/NextFire/jxa/64b6de1748ea063c01271edbe9846e37a584e1ab/run/mod.ts:180:9)
at runInOsascript (https://raw.githubusercontent.com/NextFire/jxa/64b6de1748ea063c01271edbe9846e37a584e1ab/run/mod.ts:152:21)
at async setActivity (file:///opt/homebrew/bin/music-rpc.ts:176:16)
at async file:///opt/homebrew/bin/music-rpc.ts:74:9

Hey, could you add a tutorial?

So, uhh, I tried to install it but it didn't work and i have no idea how to run it, so a step tutorial would be amazing.

Some songs are not able to show their details(album photo)

First of all, the discord rich presence is great. Nearly all the music I listen can show their information, I love it very much. It just only has some bugs that I am currently facing, so I post it here to see is there any chance to fix it. There are some of them that they will just show the Apple Music icon (not the song itself album photo).
Here is the bug I am facing:

This is one of the problem I am facing. It cannot show the album photo
Problem 1

This is the different song but this is the song in the same album
Same Ablum but diff artist

This is the same problem as above , I just provide one more example here.
Problem 2

This is the different song but this is the song in the same album
Same Ablum 2but diff artist

deno Requests New Permissions Often

Most (though not every) time I open Apple Music after not opening it for a bit. This is probably every time deno updates? Is there a way to make it remember the permissions and/or make it not have a new section in System Settings/Privacy & Security/Accessibility?

Not sure if this is a bug with this or with deno, either (sorry)

Delay

There is a delay when i skip, pause, and play a song in the rpc.

Rich Presence Client does not work anymore

Starting next week, it will be two weeks since the Discord Rich Presence Client can no longer be used (as for my case).
I did a reinstall using Homebrew, which was unsuccessful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.