tweaking docs

This commit is contained in:
evilchili 2022-12-31 12:42:31 -08:00
parent f055511fe6
commit 5985aef79d
6 changed files with 15 additions and 12 deletions

View File

@ -17,10 +17,10 @@ I have no idea if it will function on platforms besides Linux. Code was written
[ check the releases tab ]
```
pip3 install https://github.com/evilchili/grooveondemand/releases/download/beta/grooveondemand-0.9.tar.gz
pip3 install https://github.com/evilchili/grooveondemand/releases/download/beta/grooveondemand-0.10.tar.gz
```
### 2. Generate the default configuration
### 3. Generate the default configuration
```
mkdir ~/.groove
@ -29,7 +29,7 @@ mkdir ~/.groove
### 3. Set the Media Root
Edit `~/.groove` and define `MEDIA_ROOT` to point to the directory containing your local audio files. For example:
Edit `~/.groove/defaults` and define `MEDIA_ROOT` to point to the directory containing your local audio files. For example:
```
MEDIA_ROOT=/media/audio/lossless

View File

@ -34,8 +34,8 @@ MEDIA_GLOB=*.mp3,*.flac,*.m4a
# If defined, transcode media before streaming it, and cache it to disk. The
# strings INFILE and OUTFILE will be replaced with the media source file and
# the cached output location, respectively.
#
# the cached output location, respectively. The default below uses ffmpeg to
# transcode to webm with a reasonable trade-off between file size and quality.
TRANSCODER=/usr/bin/ffmpeg -i INFILE -c:v libvpx-vp9 -crf 30 -b:v 0 -b:a 256k -c:a libopus OUTFILE
# where to cache transcoded media files

View File

@ -18,8 +18,6 @@ from rich.progress import (
import groove.path
from groove.exceptions import ConfigurationError
@rich.repr.auto(angular=True)
class Transcoder:
@ -48,7 +46,8 @@ class Transcoder:
count = len(sources)
if not os.environ.get('TRANSCODER', None):
raise ConfigurationError("Cannot transcode tracks without a TRANSCODR defined in your environment.")
self.console.error("Cannot transcode tracks without a TRANSCODER defined in your environment.")
return
cache = groove.path.cache_root()
if not cache.exists():

View File

@ -97,7 +97,9 @@ class InteractiveShell(BasePrompt):
Groove on Demand will stream audio to web clients in the native format of your source media files, but for maximum
portability, performance, and interoperability with reverse proxies, it's a good idea to transcode to .webm first.
Use the [b]transcode[/b] command to cache transcoded copies of every track currently in a playlist that isn't
already in .webm format. Existing cache entries will be skipped. See also [b]cache[/b].
already in .webm format. Existing cache entries will be skipped.
The default Groove on Demand configuration uses ffmpeg; try [b]groove setup[/b] from the command-line.
[title]USAGE[/title]

View File

@ -78,8 +78,10 @@ def serve_track(request, track_id, db):
except (NoResultFound, MultipleResultsFound):
return HTTPResponse(status=404, body="Not found")
path = groove.path.media(track['relpath'])
logging.debug(f"Service track {path.name} from {path.parent}")
path = groove.path.transcoded_media(track['relpath'])
if not path.exists():
path = groove.path.media(track['relpath'])
logging.debug(f"Serving track {path.name}")
return static_file(path.name, root=path.parent)

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "grooveondemand"
version = "0.9"
version = "0.10"
description = "audio playlist server"
authors = ["evilchili <evilchili@gmail.com>"]
license = "MIT License"