Giter Club home page Giter Club logo

music-discord-rich-presence-library's Introduction

Hi, I'm jojo2357 and I code open source for fun and make some cool things. Check out the pins below!

Favorite Languages:
jojo2357's most used langs


jojo2357's GitHub Stats

My sponsors:

5 largest sponsors:

5 most recent sponsors:

A big thank you to all my sponsors!

To sponsor me, go to my sponsor page. Any amount means a lot to me, so thanks.

music-discord-rich-presence-library's People

Contributors

bearts avatar github-actions[bot] avatar jojo2357 avatar roguedbear avatar smaltin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

music-discord-rich-presence-library's Issues

Suggestions with github actions bot

I had these ideas come up as "ShowerThoughts":

3 things 3 bots can do:

  1. Generate a markdown file containing the names of albums (sorted alphabetically) added in the Discord application by going through all the dat files in User_Generated_Files/
  2. Another bot to add newly added dat files in User_Generated_Files into the clientdata/ folder in Music-Discord-Rich-Presence, so people can have up-to-date album keys
  3. This bot could detect duplicate albums that already exist in the main library in new pull requests

Suggestion: choice whether to overwrite the already generated files or append to the generated files

Problem:

When you generate album arts + dat file for a directory, new folders are generated in the repo root [groove0, musicbee0, ...].
But if these folders are already present then those files and the dat file are deleted and overwritten.

If a user is generating album arts and config files for music spread across their computer, it may be cumbersome for them to copy the existing ones somewhere and then generate files again for another folder

Suggestion:

If an existing config folder is detected ask the choice whether to overwrite them or to append the new album art + config file to that folder continuing the numbering from the previously generated files

Java Script runs out of Memory

Hi, I wanted to get the album covers of my 244 albums and everytime I want to do it I get the error "Java Script runs out of memory" . I have 16gb of ram. Could you please help me?

Java Script Heap Out of memory

Hi, I´ve already explained my problem, that when I want to load my covers the program says Java Script out of memory. Sadly I closed the old thread so I decided to create this one (sorry but sometimes my fingers are faster than my eyes). Here is the full error log:

<--- Last few GCS --->
[14796:00000292D0842890] [14796:00000292D0042890]
142561 ms: Mark-sweep 2048.5 (2054.1) -> 2048.5 (2054.1) MB, 58.5 / 0.0 ms 142620 ms: Mark-sweep 2048.5 (2054.1) -> 2048.5 (2054.1) MB, 58.8 / 0.0 ms
(average mu = 0.093, current mu = 0.000) last resort GC in old space requested (average mu = 0.049, current mu = 0.000) last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace ==========================
@: ExitFrame [pc: 00007FF7F230234D]
1: ConstructFrame (pc: 00007FF7F228298A] Security context: @xo2adbbc8e8d1
2: slice [ee0002ADBBC8E641](this=0x0008035bef51 ,0,89735) 3: storeBuffer(aka storeBuffer) [0000036BB49DD4B9] [C:\snapshot\itunes-artwork-finder\node_modules\jsmediatags\build2\NodeFileReader.js:125] [bytecode=0000027FC40F8769 offset=34](this=0x03cb452884b1 ,0...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

actions bot needs to be updated to properly mention album name with multiple contributing artists under their respective headings

Since multiple artists are now officially added in the Library folder, I've noticed that when multiple artist names are present in the song's metadata and extracted they're separated by forward slash. This is also visible in some parts of the file Albums_in_MDRP such as:

⁕ K-391/Alan Walker/Tungevaag/Mangoo

And since the forward slash appears to be the delimiter for multiple artists in a mp3 tag, so what i'm suggesting is that I take this album name and mention it under all the artists' heading in this file whose names are joined together with a forward slash.
Example referring this line, I'd put Play under their (Alan Walker, K-391, Tungevaag, Mangoo) headings

But there also also exceptions in this 'forward-slash-delimiter' rule where artists who have a forward slash in their name as on this line with the band AC/DC could be separated into AC & DC which I'm sure no one would like 😄

So, I would either have to add and maintain a whitelist or use an API to check whether "the artist with forward slashes in the name" exists or not (for this I would have to search for an API, or find a way to get that information)

If this plan is approved, I will work on this when I get time during the weekends.
If you have some suggestions to deal with this issue, then do let me know and I would be happy to consider them.

musicdl.exe crashes if node_modules folder is not present

Double clicking the exe would open-close the command line window and running through command line gives the below mentioned error. So I tried running the script by node, which ended up in me installing jsmediatags (as usual), and sharp module.

When the module folder node_modules/ is present the exe runs fine

error log running the exe through command line:

PS D:\Portable Program Files\Music-Discord-Rich-Presence-Library - Copy> ./musicdl.exe
Require stack:
- C:\snapshot\itunes-artwork-finder\node_modules\sharp\lib\constructor.js
- C:\snapshot\itunes-artwork-finder\node_modules\sharp\lib\index.js
- C:\snapshot\itunes-artwork-finder\musicdl.js
1) If you want to compile the package/file into executable, please pay attention to compilation warnings and specify a literal in 'require' call. 2) If you don't want to compile the package/file into executable and want to 'require' it from filesystem (likely plugin), specify an absolute path in 'require' call using process.cwd() or process.execPath.

- Run "npm rebuild --verbose sharp" and look for errors
- Consult the installation documentation at https://sharp.pixelplumbing.com/install
- Search for this error at https://github.com/lovell/sharp/issues

    at Object.<anonymous> (C:\snapshot\itunes-artwork-finder\node_modules\sharp\lib\constructor.js:34:9)
    at Module._compile (pkg/prelude/bootstrap.js:1320:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1156:10)
    at Module.load (internal/modules/cjs/loader.js:984:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Module.require (internal/modules/cjs/loader.js:1024:19)
    at Module.require (pkg/prelude/bootstrap.js:1225:31)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (C:\snapshot\itunes-artwork-finder\node_modules\sharp\lib\index.js:3:15)
    at Module._compile (pkg/prelude/bootstrap.js:1320:22)

music.dl when node_modules/ is present:

PS D:\Portable Program Files\Music-Discord-Rich-Presence-Library> ./musicdl.exe
Who is this (github username is good, just for naming your files for the library)

Album arts + dat files are generated even when there's an entry for them in the archive folder

I had a new song to my collection, and wanted to see how the numbering will work when a dat file of existing music already exists in archive/ folder.

Spoiler: new album arts + dat files containing the old existing ones were generated.

This bug must've crept in some releases prior because i tested this situation a few days back, the archive/ folder was being accounted for. New files were not generated if there was a dat file containing those entries in the archive/ folder

Images seem to only generate for 1st subdirectory

Case 1:

My Music Folder Directory Tree strucuture + visual look:

D:.
├───Alan Walker
├───Imagine Dragons
├───Kygo
├───Lauv
│   ├───Lauv - I met you when I was 18. (the playlist) - 2018
│   └───Lauv - ~how i'm feeling~ - 2020
├───Maroon 5
├───Monstercat
│   └───Throttle
└───OneRepublic

image

Input For musicdl.exe:

image

Generated Album Art + dat file:

image

Dat File: [line marked with <--------- is the one with sub-directory's album art]

music.ui=groove
id=
Faded==0  <---------
Shadows==1

Case 2: Trying another subdirectory

Tree structure + visual look:

D:.
└───Throttle

image

Input For musicdl.exe:

image

Generated Album Art + dat file:

image

Dat file: [line marked with <--------- is the one with sub-directory's album art]

music.ui=groove
id=
Chasing Clouds==0
Destroy Me==1
Silhouette (Feed Me Remix)==2
Level Days==3
Talk!==4
Worst Part of Heaven==5
Color==6
Reset==7
Gold / YES==8
Upgrade==9
Someone Else==10
Where U Are==11 <---------
Good 4 Me / Union==12


It appears that images are generated only for the 1st subdirectory.

Note: All my mp3s have an album art in them

dependency issues when running the js file and the exe file

Error log when running the exe:

PS D:\Portable Program Files\Music-Discord-Rich-Presence-Library> ./musicdl.exe
pkg/prelude/bootstrap.js:1244
      throw error;
      ^

Error: Cannot find module '../build/Release/canvas.node'
Require stack:
- C:\snapshot\itunes-artwork-finder\node_modules\resemblejs\node_modules\canvas\lib\bindings.js
- C:\snapshot\itunes-artwork-finder\node_modules\resemblejs\node_modules\canvas\lib\canvas.js
- C:\snapshot\itunes-artwork-finder\node_modules\resemblejs\node_modules\canvas\index.js
- C:\snapshot\itunes-artwork-finder\node_modules\resemblejs\resemble.js
- C:\snapshot\itunes-artwork-finder\node_modules\resemblejs\compareImages.js
- C:\snapshot\itunes-artwork-finder\musicdl.js
1) If you want to compile the package/file into executable, please pay attention to compilation warnings and specify a literal in 'require' call. 2) If you don't want to compile the package/file into executable and want to 'require' it from filesystem (likely plugin), specify an absolute path in 'require' call using process.cwd() or process.execPath.
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:964:15)
    at Function.Module._resolveFilename (pkg/prelude/bootstrap.js:1346:46)
    at Function.Module._load (internal/modules/cjs/loader.js:840:27)
    at Module.require (internal/modules/cjs/loader.js:1024:19)
    at Module.require (pkg/prelude/bootstrap.js:1225:31)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (C:\snapshot\itunes-artwork-finder\node_modules\resemblejs\node_modules\canvas\lib\bindings.js:3:18)
    at Module._compile (pkg/prelude/bootstrap.js:1320:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1156:10)
    at Module.load (internal/modules/cjs/loader.js:984:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\snapshot\\itunes-artwork-finder\\node_modules\\resemblejs\\node_modules\\canvas\\lib\\bindings.js',
    'C:\\snapshot\\itunes-artwork-finder\\node_modules\\resemblejs\\node_modules\\canvas\\lib\\canvas.js',
    'C:\\snapshot\\itunes-artwork-finder\\node_modules\\resemblejs\\node_modules\\canvas\\index.js',
    'C:\\snapshot\\itunes-artwork-finder\\node_modules\\resemblejs\\resemble.js',
    'C:\\snapshot\\itunes-artwork-finder\\node_modules\\resemblejs\\compareImages.js',
    'C:\\snapshot\\itunes-artwork-finder\\musicdl.js'
  ],
  pkg: true
}

Error log when running from node:

PS D:\Portable Program Files\Music-Discord-Rich-Presence-Library> node musicdl.js
internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module 'resemblejs/compareImages'
Require stack:
- D:\Portable Program Files\Music-Discord-Rich-Presence-Library\musicdl.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (D:\Portable Program Files\Music-Discord-Rich-Presence-Library\musicdl.js:10:18)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'D:\\Portable Program Files\\Music-Discord-Rich-Presence-Library\\musicdl.js'
  ]
}

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.