Updated readme.md (get it because thats always the first commit message)
i also made an api key mandatory to ping the last fm server at all, so it wont try with an empty key
This commit is contained in:
parent
2b293c76d1
commit
f567a3e093
2 changed files with 7 additions and 2 deletions
|
|
@ -53,7 +53,7 @@ for i in songFiles:
|
||||||
except:
|
except:
|
||||||
title = i
|
title = i
|
||||||
artist = None
|
artist = None
|
||||||
if args.art.lower() == "true":
|
if args.art.lower() == "true" and not(args.apikey == ""):
|
||||||
try:
|
try:
|
||||||
image = ast.literal_eval(requests.post(url="http://ws.audioscrobbler.com/2.0/?method=track.getInfo&api_key="+apikeylastfm+"&artist="+artist+"&track="+title+"&format=json").text)["track"]["album"]["image"][1]["#text"]
|
image = ast.literal_eval(requests.post(url="http://ws.audioscrobbler.com/2.0/?method=track.getInfo&api_key="+apikeylastfm+"&artist="+artist+"&track="+title+"&format=json").text)["track"]["album"]["image"][1]["#text"]
|
||||||
if image == "":
|
if image == "":
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
# Party Jukebox
|
# Party Jukebox
|
||||||
*This project requires VLC to play sound files*
|
*This project requires VLC to play sound files*
|
||||||
|
|
||||||
|
As always you can use `--help` on any of the python files to see all the properties that can be changed at runtime
|
||||||
## Purpose
|
## Purpose
|
||||||
The **Party Jukebox** is a program that allows many people to add music, skip songs, play, and pause from any web device to the same device and playlist. \
|
The **Party Jukebox** is a program that allows many people to add music, skip songs, play, and pause from any web device to the same device and playlist. \
|
||||||
This was created for a personal use case for parties, and is a simple, (mostly) functional solution to have a collective playlist for local mp3 files. \
|
This was created for a personal use case for parties, and is a simple, (mostly) functional solution to have a collective playlist for local mp3 files. \
|
||||||
|
|
@ -20,11 +22,12 @@ 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 (*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.json`*
|
||||||
* *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*
|
||||||
|
|
||||||
You can now connect with the client and use the app as normal. \
|
You can now connect with the client and use the app as normal. \
|
||||||
*Make sure you have turned down/off any other apps that might make noise or notification sounds* \
|
*Make sure you have turned down/off any other apps that might make noise or notification sounds* \
|
||||||
|
|
@ -41,6 +44,8 @@ These are specific details on each section of the app, and how to use them
|
||||||
- Running with `--mode (update/new)` either updates the current database and only adds new songs, or recreates the entire database (update is default)
|
- Running with `--mode (update/new)` either updates the current database and only adds new songs, or recreates the entire database (update is default)
|
||||||
- Running with `--art (True/False)` retrieves art from LastFM or doesn't (True is default)
|
- Running with `--art (True/False)` retrieves art from LastFM or doesn't (True is default)
|
||||||
- *Can only generate one song / 0.25 seconds, to avoid pinging the LastFM server too much*
|
- *Can only generate one song / 0.25 seconds, to avoid pinging the LastFM server too much*
|
||||||
|
- Running with `--apikey (KEYhere)` sets the LastFM key for that run
|
||||||
|
- If this is set to an empty string (Default) the app runs in non-art mode
|
||||||
- `songDatabase.json` stores all the information about each song in this format:
|
- `songDatabase.json` stores all the information about each song in this format:
|
||||||
```
|
```
|
||||||
[
|
[
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue