[mythtv] Web-app setup is complete

Peter Bennett pb.mythtv at gmail.com
Fri May 12 15:27:25 UTC 2023


I have committed all changes to support web-app setup.

The backend can start without a database, so that the database can be 
set up using the web app.

If any of these conditions exist at backend startup, the backend will 
start in a web-server only mode:

- The config directory (normally .mythtv) does not exist.
- Time zone tables are not installed.
- The database cannot be connected after 10 attempts.
- Host address backend setup is not done.

There is a restart button at the top of the web pages for them to 
restart once the setup is done.

This changes a few things about mythbackend startup. In the cases 
mentioned above, the backend would previously do one of two things:

- Output a message in the log and shut down.
- Prompt the user to enter database credentials through the terminal.

Now it will still output a message, but then instead of prompting the 
user or shutting down, it will start up in web-server only mode.

This still needs testing. Some thing I could not test, where I do not 
have the required hardware or live in the appropriate country.

Translation is done via the ngx-translate package. The default language 
in en_US. For testing I loaded one string, the title "MythTV Setup" in 
the Dutch language (Nederlands). I do not know how to organize the 
translations. The strings are in json files, one per language.

Please test this and let me know of any problems, questions or suggestions.

To run it use http://backend:6744 and click the cogwheel icon.

I plan to continue with the web app, replacing the home page with 
something sensible and creating pages that do what mythweb does today.

Peter



More information about the mythtv-dev mailing list