BeautifulDiscord
BeautifulDiscord copied to clipboard
Added Discord Dynamic Paths detection, Flatpak and NixOS
Some people have been having trouble finding discord and being given; " Could not find Discord executable" this is mainly due to the change in discord name in different installation. As such it is related to;
fixes #62 fixes #25
and supersedes; Pull Request #63
Dynamically fetch config directory path as such fixes issues from snap and flatpak users as well as addressing issues such as #66.
Also fixes #53
After 5be055c4f510636b09f61a5b3d48850f50006142 this PR no longer fixes #63
@tadeokondrak should be fixed now. Let me know if theres anything else.
Config path autofinding still not in the main branch. The injection patch changed to use .cache
I've attempted to use this branch on NixOS version 20.03 and while it succeeded to find discord, it hangs before reporting the following:
Traceback (most recent call last):
File "/home/suskeyhose/tmp/.venv/bin/beautifuldiscord", line 11, in <module>
load_entry_point('BeautifulDiscord==0.1.1', 'console_scripts', 'beautifuldiscord')()
File "/home/suskeyhose/tmp/.venv/lib/python3.7/site-packages/beautifuldiscord/app.py", line 280, in main
os.chdir(discord.script_path)
File "/home/suskeyhose/tmp/.venv/lib/python3.7/site-packages/beautifuldiscord/app.py", line 128, in script_path
config
RuntimeError: Could not find discord application version under "/home/suskeyhose/.config/discord/0.0.10/modules/discord_desktop_core".
Notable is that there are files under that directory which appear to be acting as normal (although the package.json does list the "version" property as "0.0.0", however changing this to "0.0.10" fixes nothing)
Hey @IGJoshua can you post a ls -la
of /home/suskeyhose/.config/discord/0.0.10/modules/discord_desktop_core
I cant seem to reproduce this error
ls -la
total 7424
drwxr-xr-x 2 suskeyhose 985 4096 May 12 12:33 ./
drwxr-xr-x 10 suskeyhose 985 4096 Feb 27 07:29 ../
-rw-r--r-- 1 suskeyhose 985 7583089 Feb 27 07:28 core.asar
-rw-r--r-- 1 suskeyhose 985 40 Feb 27 07:28 index.js
-rw-r--r-- 1 suskeyhose 985 85 May 12 12:31 package.json
package.json
{"name":"discord_desktop_core","version":"0.0.0","private":"true","main":"index.js"}
@IGJoshua Hey, mind trying it now ?. It should be fixed
@SparrowOchon Awesome, it works! Thanks!
Trying to use this with a flatpak installation, and it never writes core.asar. Just moves the old one to original_core.asar and causes Discord to fail to start.
Truth be told, I don't use Discord, and seeing as this most likely won't ever be merged I won't bother putting time into keeping this up to date. Feel free to make modifications or fork my fork.
@unresolvedsymbol This is most likely related to the directory not being found thus, with the discord update. Make sure the in the app.py
file the directory is being properly found. Since the Flatpak most likely moved files around.
@GunnerBasil There should be nothing stopping this from working on Arch already. Auto path detection is distro independent.