Complete backend redesign to using SQLite #4

Merged
kristy-fournier merged 6 commits from sqlite into main 2025-07-06 14:00:53 -04:00
Showing only changes of commit 2d26d0d63a - Show all commits

View file

@ -24,7 +24,7 @@ webbyBits.py
1. Place mp3 files in the `sound/` folder 1. Place mp3 files in the `sound/` folder
2. Open `databaseGenerator.py` and put your LastFM API key in at the top or at runtime using `-k APIKey` (*optional*) 2. Open `databaseGenerator.py` and put your LastFM API key in at the top or at runtime using `-k APIKey` (*optional*)
3. Run `databaseGenerator.py` 3. Run `databaseGenerator.py`
* *The `databaseGenerator.py` will index all mp3 files, and save the information to `songDatabase.json`* * *The `databaseGenerator.py` will index all mp3 files, and save the information to `songDatabase.db`*
* *If getting images, this process may take a long time with a large amount of mp3 files* * *If getting images, this process may take a long time with a large amount of mp3 files*
4. Run `webbyBits.py` 4. Run `webbyBits.py`
* *The port can be customized at runtime using* `-p portNumber` *as an atribute* * *The port can be customized at runtime using* `-p portNumber` *as an atribute*
@ -50,19 +50,7 @@ These are specific details on each section of the app, and how to use them
- Default `"./sound/"` - Default `"./sound/"`
- _This setting might be kinda iffy on Linux. You're on Linux just go and edit it if you have issues_ - _This setting might be kinda iffy on Linux. You're on Linux just go and edit it if you have issues_
- ~~__Make certain you only use forward slashes in your directory, even on Windows__~~ I think this should be fine now i'll check later - ~~__Make certain you only use forward slashes in your directory, even on Windows__~~ I think this should be fine now i'll check later
- `songDatabase.json` stores all the information about each song in this format: - `songDatabase.db` stores all the information about each song in a SQLite database with tables `songs` and `meta`
```
{
"songDirectory": "./sound/",
"songData": {
"Circus_Fox Szn.mp3":
{"title": "Circus",
"artist": "Fox Szn",
"art": null,
"length": 141}
}
}
```
- `webbyBits.py` imports the database, runs all music playing, and accepts all commands from clients - `webbyBits.py` imports the database, runs all music playing, and accepts all commands from clients
- Searches return matching songs - Searches return matching songs
- Accepts Play-Pause and Skip commands - Accepts Play-Pause and Skip commands