Skip to content

Commit

Permalink
Require bun install
Browse files Browse the repository at this point in the history
  • Loading branch information
RuiNtD committed Oct 20, 2024
1 parent 86cc48d commit 9b83211
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@ Supports [Last.fm] and [ListenBrainz]

## Requirements

- [Git](https://git-scm.com/)
- [Bun](https://bun.sh)

## Setup

```sh
git clone https://github.com/RuiNtD/lastfm-rp
bun install
```

## Configuration

Before running Scrobble RP, please copy `config.example.yml` to `config.yml`
Expand All @@ -16,11 +24,12 @@ and edit it to your liking. `username` is required.
The "Disable when another app's Rich Presence is detected" feature uses [Lanyard].
If you would like to use this feature, you will need to join the [Lanyard Discord].

Run `manager` if you want Scrobble RP to run at startup
Use `manager` if you want Scrobble RP to run at startup

## Usage

Run `start` to start Scrobble Rich Presence.
`manager` includes an option to update the script.

## Special Thanks!

Expand Down
15 changes: 10 additions & 5 deletions src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,20 @@ while (true) {
try {
console.log(chalk.gray("Updating..."));
await $`git pull`;
if (await fs.exists("node_modules")) {
console.log(chalk.gray("Installing dependencies..."));
await $`bun install`;
}

console.log(chalk.gray("Installing dependencies..."));
await $`bun install`;

if (await run.isEnabled()) {
console.log(chalk.gray("Restarting process..."));
await run.start();
}
console.log(chalk.bold.green("Updated!"), "Manager will now close");

console.log(
chalk.bold.green("Updated!"),
"Make sure Bun is up to date.",
);
console.log("Manager will now close");
await pause();
process.exit();
} catch (e) {
Expand Down
1 change: 1 addition & 0 deletions start.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@echo off
title Scrobble Rich Presence
bun start
pause

0 comments on commit 9b83211

Please sign in to comment.