Giter Site home page Giter Site logo

toniebox-audio-match's Introduction

tonie-audio-match

Your 1-click audio book upload to your creative tonies.

The Story

It's bedtime for one of your kids, they are tired (just like you), their patience is down to a minimum. And now they want to hear their beloved audio book. Which of course is not on one of their creative tonies anymore. Darn.

So... you are going to pick up your laptop, open the tonies website, log in... all the way down to uploading your child's desired audio book the proper tonie. That's cumbersome.

How about a simple UI which shows all your audio books where one click suffices to upload an audio book to a tonie? Congratulations, search no more, you are right here, I got your back! :)

Example

So yet another UI to access from your laptop? Not at all! Put it onto a RaspberryPi and voilà -- accessible from your mobile whenever you need it! 🙂

Configuration & Start

Place an .env file in this project's root to configure your service (like credentials for tonies.de). Please see .env.sample for a sample configuration.

Once configured, start the whole application with docker-compose up and, after some initial processing of your media library, access your album covers locally at http://localhost.

toniebox-audio-match's People

Contributors

croesnick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

toniebox-audio-match's Issues

Scheduled content randomizer

Hi,

It would be great to implement a rotation system.

eg:

  • Select schedule (every monday, 2am. Probably cron-able)
  • Select Range of Audio books (only episodes 1-10 of series X)
  • Select creative tonie

That way, you could create a creative tonie that has "new" episodes of a series (like Biene Maja, Benjamin Bluemchen etc) every week.

docker-compose improvement hints

I understand that this:

    environment:
      - VUE_APP_BACKEND_SCHEME=${TONIE_AUDIO_MATCH_BACKEND_SCHEME}
      - VUE_APP_BACKEND_HOST=${TONIE_AUDIO_MATCH_BACKEND_HOST}
      - VUE_APP_BACKEND_PORT=${TONIE_AUDIO_MATCH_BACKEND_PORT}

makes developing this app easier, but it would be nice if only the WebGUI port was exposed to the host. Communication between frontend <-> backend in the docker network would be sufficient and would make the deployment more portable (and less env vars off course ;))

Media library refresh

Implement a mechanism to refresh the media library. Currently, refreshing the lib requires a restart of the server.

cannot import name 'soft_unicode' from 'markupsafe'

I get the following error when running docker compose up. Using raspbian

toniebox-audio-match-backend-1 | Successfully built tinytag MarkupSafe
toniebox-audio-match-backend-1 | Installing collected packages: Werkzeug, urllib3, tinytag, Six, MarkupSafe, itsdangerous, idna, click, chardet, certifi, requests, Jinja2, Flask, Flask-Cors
toniebox-audio-match-backend-1 | Successfully installed Flask-1.1.4 Flask-Cors-3.0.10 Jinja2-2.11.3 MarkupSafe-2.1.1 Six-1.16.0 Werkzeug-1.0.1 certifi-2022.6.15 chardet-4.0.0 click-7.1.2 idna-2.10 itsdangerous-1.1.0 requests-2.25.1 tinytag-1.5.0 urllib3-1.26.9
toniebox-audio-match-backend-1 | WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
toniebox-audio-match-backend-1 | WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.
toniebox-audio-match-backend-1 | You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
toniebox-audio-match-backend-1 | Traceback (most recent call last):
toniebox-audio-match-backend-1 | File "app.py", line 7, in
toniebox-audio-match-backend-1 | from flask import Flask, jsonify, request
toniebox-audio-match-backend-1 | File "/usr/local/lib/python3.8/site-packages/flask/init.py", line 14, in
toniebox-audio-match-backend-1 | from jinja2 import escape
toniebox-audio-match-backend-1 | File "/usr/local/lib/python3.8/site-packages/jinja2/init.py", line 12, in
toniebox-audio-match-backend-1 | from .environment import Environment
toniebox-audio-match-backend-1 | File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 25, in
toniebox-audio-match-backend-1 | from .defaults import BLOCK_END_STRING
toniebox-audio-match-backend-1 | File "/usr/local/lib/python3.8/site-packages/jinja2/defaults.py", line 3, in
toniebox-audio-match-backend-1 | from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
toniebox-audio-match-backend-1 | File "/usr/local/lib/python3.8/site-packages/jinja2/filters.py", line 13, in
toniebox-audio-match-backend-1 | from markupsafe import soft_unicode
toniebox-audio-match-backend-1 | ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/usr/local/lib/python3.8/site-packages/markupsafe/init.py)
toniebox-audio-match-backend-1 exited with code 1

Backend exited with code 1

I get the following error. .env file is set up. Using Debian.

backend_1   | Traceback (most recent call last):
backend_1   |   File "app.py", line 29, in <module>
backend_1   |     tonie_cloud_api = TonieCloud(os.environ.get("TONIE_AUDIO_MATCH_USER"), os.environ.get("TONIE_AUDIO_MATCH_PASS"))
backend_1   |   File "/backend/toniecloud/client.py", line 30, in __init__
backend_1   |     self.session.acquire_token(username, password)
backend_1   |   File "/backend/toniecloud/session.py", line 15, in acquire_token
backend_1   |     self.token = self._acquire_token(username, password)
backend_1   |   File "/backend/toniecloud/session.py", line 20, in _acquire_token
backend_1   |     return req.json()["jwt"]
backend_1   | KeyError: 'jwt'
toniebox-audio-match_backend_1 exited with code 1

Support SSO

Toniecloud enabled (and requires) SSO since September 1st. Well... this is something to be supported by toniebox-audio-match as well.

Relevant URLs:

curl 'https://login.tonies.com/auth/realms/tonies/protocol/openid-connect/auth?client_id=meine-tonies&redirect_uri=<someuri>&state=<somestate>&response_mode=fragment&response_type=code&scope=openid&nonce=<somenonce>&kc_locale=de' 
  --compressed

Mobile first: Update usage

A few improvements required are

  • make the backend url configurable and pass its value to the frontend container
  • change the frontend title (and favicon)
  • explain in the docs the hosting on a raspi
  • change the sample image in the Readme to a screenshot from mobile

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.