jcorporation / myMPD

myMPD is a standalone and mobile friendly web mpd client with a tiny footprint and advanced features.
https://jcorporation.github.io/myMPD/
GNU General Public License v3.0
418 stars 65 forks source link

Add option to initialze settings #185

Closed parkmino closed 4 years ago

parkmino commented 4 years ago

It would be good to have the option to initialize /var/lib/mympd directory. I run it manually once in a while.

jcorporation commented 4 years ago

Since myMPD 5.6.0 there are some commandline options. I think you want mympd reset_state.

# mympd help
INFO     Starting myMPD 5.7.0
INFO     Libmpdclient 2.17.0
INFO     Mongoose 6.16
INFO     Parsing config file: /etc/mympd.conf
INFO     Setting loglevel to INFO
INFO     Localstate dir: "/var/lib/mympd"
myMPD 5.7.0
Copyright (C) 2018-2019 Juergen Mang <mail@jcgames.de>
https://github.com/jcorporation/myMPD

Usage: mympd [/etc/mympd.conf] <command>
Commands (you should stop mympd before):
  certs_create:     create ssl certificates
  cert_remove:      remove server certificates
  ca_remove:        remove ca certificates
  reset_state:      delete all myMPD settings
  reset_smartpls:   create default smart playlists
  reset_lastplayed: truncates last played list
  clear_covercache: empties the covercache directory

I created a wiki page for reference: https://github.com/jcorporation/myMPD/wiki/Commandline-Options

parkmino commented 4 years ago

OK, then I will use this option. I tried 'mympd --help' and it did not show any thing without 'sudo'. I think that help message should show all options without 'sudo'. Help option itself is not listed in 'mympd help'.

jcorporation commented 4 years ago

5.7.0 shows the help and lists the help option itself.