GithubHelp home page GithubHelp logo

vlc-rpc / vlc-discord-rpc Goto Github PK

View Code? Open in Web Editor NEW
29.0 4.0 3.0 1.61 MB

Display what you're watching on VLC media player as your Discord status with this Node.js application.

License: MIT License

JavaScript 100.00%
discord discord-rich-presence discord-rpc vlc-media-player

vlc-discord-rpc's Introduction

VLC-RPC

An updated Discord rich presence for VLC media player.

This is a modified version of the Pigpog/vlc-discord-rpc project, which is no longer being actively maintained. We have updated and enhanced the project by adding new features, such as album and show covers.

image image

Our documentation has been moved!

vlc-discord-rpc's People

Contributors

actions-user avatar lauren1066 avatar spix18 avatar techselect 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

Watchers

 avatar  avatar  avatar  avatar

vlc-discord-rpc's Issues

[ENHANCEMENT] Better error handling for no queue with detached state

Currently, if you do not have anything queued and try to run the program while using the detached option, the user gets an ugly error message that does not tell them what the actual issue is. This should be fixed to let the user know to queue something first.

Mentioned in: #12

Moving this here for better tracking.

[BUG] Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'category') when trying to launch with "node ." Seems it can't connect to VLC despite having followed the steps.

So I'm trying to watch a video I got saved on my computer and it doesn't have any metadata as far as I know since this is the error that keeps coming up. (the one in the title, trying to read category when that field is empty probably or smth)

So I tried running the rich presence app without anything open in VLC and I still get this error.
I checked the vlcPath in the config file and it is the correct path to my custom VLC install folder but it doesn't seem to be able to communicate with it for some reason.
In the main interfaces on VLC, I have

  • Web

In Lua interpreter I have these settings (I double checked and I have the same password on both config and VLC)
in case I somehow messed up, I changed the password to a simple one like 123 in both places and still get the error even tho VLC is running and has a video playing. Oh and I set detached to true

Connecting to Discord...
Logged in as *************************
Failed to reach VLC. Is it open?
Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'category')
    at module.exports (h:\Discord\vlc-discord-rpc-main\Functions\rpc-format.js:23:35)
    at <anonymous> (h:\Discord\vlc-discord-rpc-main\Functions\client.js:28:41)
    at module.exports (h:\Discord\vlc-discord-rpc-main\Functions\status.js:85:7)
    at processTicksAndRejections (internal/process/task_queues:95:5)

I went to status.js in the Functions folder and it dies on line 21 where it tries to await VLCClient.getStatus();
first goes here when I step into
image
line 57
step into that then get here
image
line 57
pass the return new Promise
gets the address var, everything seems fine
runs _request on line 59 drop to line 97
starts doing that promise
passes data, basicAuth and we get to req
on req it does the http.get(address.toString()) thing but instead of .on('response' it jumps to .on('error', reject)
and then the usual output of Failed to reach VLC. blah blah comes up and exits.

Not sure what the issue is I followed all the steps one by one and precisely. The only thing I didn't fill out was the spotify information because I don't have an account and don't use it and don't really care about the cover pictures. Unless filling out the spotify information is an essential part to fill out in the config?

Can't seem to get the movie icons to work

I thought i'd try to get the movie icons to work, got my OMDb api key. The settings seem correct, but I think i just dont understand how to name the movies and where to put them. Can someone help?

VLC crash on Icecast Radio Selection

Steps to Reproduce

  1. Run VLC using node . in repo directory.
  2. Select Icecast Radio Directory
  3. Attempt to select a channel.
  4. VLC slowly loads, plays a second of audio, then crashes.

Log

PS C:\Users\Jet\Desktop\vlc-discord-rpc-main> node .
Connecting to Discord...
Logged in as jetpackjackson
VLC not playing; going to sleep. true
C:\Users\Jet\Desktop\vlc-discord-rpc-main\node_modules\discord-rpc\src\client.js:178
const e = new Error(message.data.message);
^

Error: child "activity" fails because [child "details" fails because ["details" is not allowed to be empty]]
at RPCClient.onRpcMessage (C:\Users\Jet\Desktop\vlc-discord-rpc-main\node_modules\discord-rpc\src\client.js:178:19)
at IPCTransport.emit (node:events:518:28)
at C:\Users\Jet\Desktop\vlc-discord-rpc-main\node_modules\discord-rpc\src\transports\ipc.js:138:18
at decode (C:\Users\Jet\Desktop\vlc-discord-rpc-main\node_modules\discord-rpc\src\transports\ipc.js:92:5)
at Socket. (C:\Users\Jet\Desktop\vlc-discord-rpc-main\node_modules\discord-rpc\src\transports\ipc.js:120:7)
at Socket.emit (node:events:518:28)
at emitReadable
(node:internal/streams/readable:832:12)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21) {
code: 4000,
data: {
code: 4000,
message: 'child "activity" fails because [child "details" fails because ["details" is not allowed to be empty]]'
}
}

Node.js v20.11.0

Environment

Windows 10 with PowerShell

[BUG] SyntaxError: Unexpected end of JSON input

Getting this as of the last day or two:

C:\Users\Spiff>cd "C:\Users\Spiff\Documents\Scripts\vlc-discord-rich-presence"

C:\Users\Spiff\Documents\Scripts\vlc-discord-rich-presence>npm i

up to date, audited 23 packages in 365ms

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities

C:\Users\Spiff\Documents\Scripts\vlc-discord-rich-presence>node .
Connecting to Discord...
(node:40796) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Logged in as Spiff
undefined:1


SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at new VLCStatus (C:\Users\Spiff\Documents\Scripts\vlc-discord-rich-presence\node_modules\vlc.js\lib\src\http\classes\VLCStatus.js:13:27)
    at C:\Users\Spiff\Documents\Scripts\vlc-discord-rich-presence\node_modules\vlc.js\lib\src\http\Requester.js:65:21
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v21.2.0

C:\Users\Spiff\Documents\Scripts\vlc-discord-rich-presence>

Installation not working? Also Discord invite seems to be expired?

Hi! Just came across this and wanted to give it a go, though I seem to be having issues. using command 'npm i' works just fine but running up 'node . ' gives me an error message, claims that 'storage/config.js' can't be found. I was curious on if this was a bug or not. I made sure to run everything up correctly and double checked my steps.

Screenshot_1

I wanted to add as well that the support discord invite link expired and doesn't seem to be working.

Existing files with quoted paths

When you use copy path, it will provide the file as a quote:
"C:\Users\User\Documents\..."

This seems to work fine in the metadata script, but does not check if the file already exists, due to the quotes.

[BUG] TypeError: Cannot read properties of undefined (reading 'show')

im getting this error with only this episode , other episodes are fine and even other movies, idk if its the episode itself but i thought i should report in case it is not.

ps: im gonna keep this episode in my pc in case you have an idea how to fix this so i can test it

Connecting to Discord...
Logged in as **************
VLC not playing; going to sleep. true
{
  _STATISTICS_WRITING_APP: "mkvmerge v82.0 ('I'm The President') 64-bit",
  showName: 'Shogun 2024',
  DURATION: '00:52:34.083000000',
  seasonNumber: '01',
  filename: 'Shogun.2024.S01E03.1080p.10bit.WEBRip.6CH.x265.HEVC-PSA.mkv',
  BPS: '41',
  title: 'PSArips.com | Shogun.2024.S01E03.1080p.10bit.WEBRip.6CH.x265.HEVC-PSA',
  _STATISTICS_TAGS: 'BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES',
  NUMBER_OF_FRAMES: '554',
  NUMBER_OF_BYTES: '16271',
  episodeNumber: '03',
  _STATISTICS_WRITING_DATE_UTC: '2024-03-05 06:51:36'
}
TypeError: Cannot read properties of undefined (reading 'show')
    at searchShow (C:\Users\Spix\Desktop\vlc-discord-rpc-main\Functions\Images\searchShow.js:8:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async module.exports (C:\Users\Spix\Desktop\vlc-discord-rpc-main\Functions\rpc-format.js:42:18)
    at async C:\Users\Spix\Desktop\vlc-discord-rpc-main\Functions\client.js:13:25
C:\Users\Spix\Desktop\vlc-discord-rpc-main\Functions\rpc-format.js:44
    if (show.image) {
             ^

TypeError: Cannot read properties of null (reading 'image')
    at module.exports (C:\Users\Spix\Desktop\vlc-discord-rpc-main\Functions\rpc-format.js:44:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async C:\Users\Spix\Desktop\vlc-discord-rpc-main\Functions\client.js:13:25

Node.js v20.11.1
PS C:\Users\Spix\Desktop\vlc-discord-rpc-main>

Run VLC as detached

In Pigpog's original repo, there was a way to set up VLC to run "detached" from vlc-discord-rpc:

Out of the box, starting vlc-discord-rpc will open VLC, and closing VLC will close vlc-discord-rpc. This is the "attached" mode, and it is the default because "it just works" in most cases.

Detached mode will not open VLC for you, and closing VLC won't close vlc-discord-rpc. It requires a bit of tweaking, but once it is configured, it allows you to open and close VLC as you normally would and still show a rich presence.

How can we achieve this same functionality using your fork of vlc-discord-rpc?

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.