1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Readme and minor fixes

This commit is contained in:
krateng 2022-04-05 05:48:23 +02:00
parent 0ae9091889
commit 8ff7acfc38
3 changed files with 9 additions and 7 deletions

View File

@ -22,7 +22,7 @@ You can check [my own Maloja page](https://maloja.krateng.ch) to see what it loo
* [Requirements](#requirements)
* [PyPI](#pypi)
* [From Source](#from-source)
* [Docker](#docker)
* [Docker / Podman](#docker-podman)
* [Extras](#extras)
* [How to use](#how-to-use)
* [Basic control](#basic-control)
@ -84,9 +84,9 @@ Then install all the requirements and build the package, e.g.:
pip install .
```
### Docker
### Docker / Podman
Pull the [latest image](https://hub.docker.com/r/krateng/maloja) or check out the repository and use the included Dockerfile.
Pull the [latest image](https://hub.docker.com/r/krateng/maloja) or check out the repository and use the included Containerfile.
Of note are these settings which should be passed as environmental variables to the container:
@ -94,7 +94,7 @@ Of note are these settings which should be passed as environmental variables to
* Mount a [volume](https://docs.docker.com/engine/reference/builder/#volume) to the specified directory to access these files outside the container (and to make them persistent)
* `MALOJA_FORCE_PASSWORD` -- Set an admin password for maloja
You must publish a port on your host machine to bind to the container's web port (default 42010). The Docker version uses IPv4 per default.
You must publish a port on your host machine to bind to the container's web port (default 42010). The container uses IPv4 per default.
An example of a minimum run configuration to access maloja via `localhost:42010`:
@ -141,6 +141,7 @@ If you would like to import your previous scrobbles, use the command `maloja imp
* a Last.fm export generated by [benfoxall's website](https://benjaminbenben.com/lastfm-to-csv/) ([GitHub page](https://github.com/benfoxall/lastfm-to-csv))
* an official [Spotify data export file](https://www.spotify.com/us/account/privacy/)
* the export of another Maloja instance
To backup your data, run `maloja backup`, optional with `--include_images`.

View File

@ -48,7 +48,8 @@ DB['trackartists'] = sql.Table(
'trackartists', meta,
sql.Column('id',sql.Integer,primary_key=True),
sql.Column('artist_id',sql.Integer,sql.ForeignKey('artists.id')),
sql.Column('track_id',sql.Integer,sql.ForeignKey('tracks.id'))
sql.Column('track_id',sql.Integer,sql.ForeignKey('tracks.id')),
sql.UniqueConstraint('artist_id', 'track_id')
)
DB['associated_artists'] = sql.Table(

View File

@ -14,7 +14,7 @@ outputs = {
"UNCERTAIN_IMPORT": lambda msg: print(col['orange'](msg)),
#"CONFIDENT_SKIP": lambda msg: print(col['ffcba4'](msg)),
"CONFIDENT_SKIP": lambda msg: None,
"UNCERTAIN_SKIP": lambda msg: print(col['orange'](msg)),
"UNCERTAIN_SKIP": lambda msg: print(col['indianred'](msg)),
"FAIL": lambda msg: print(col['red'](msg)),
}
@ -102,7 +102,7 @@ def import_scrobbles(inputf):
msg = f"Skipped {result['CONFIDENT_SKIP'] + result['UNCERTAIN_SKIP']} scrobbles"
if result['UNCERTAIN_SKIP'] > 0:
warningmsg = col['orange'](f"{result['UNCERTAIN_SKIP']} Warning{'s' if result['UNCERTAIN_SKIP'] != 1 else ''}!")
warningmsg = col['indianred'](f"{result['UNCERTAIN_SKIP']} Warning{'s' if result['UNCERTAIN_SKIP'] != 1 else ''}!")
msg += f" ({warningmsg})"
print(msg)