def factory_reset(): config = { "version": "1.0", "download_interval": "12", "use_custom_user": "******", "naming_format": { "separator": " - ", "artist_before_title": "true" } } with open('./src/configuration.json', 'w') as outfile: json.dump(config, outfile) Database.create() Database.add_factory_entries() return "Configuration and Database restored"
def factory_reset(): config = { "version": "2.3", "youtube_dl_path": "./src/youtube_dl/youtube-dl", "download_path": "/mnt/seagate6t/n_u/Music", "download_interval": "1", "mopidy_local_path": "/mnt/seagate6t/n_u/Music", "mopidy_playlists_path": "/home/pi/.local/share/mopidy/m3u", "use_custom_user": "******", "naming_format": { "separator": " - ", "artist_before_title": "true" } } with open('./src/configuration.json', 'w') as outfile: json.dump(config, outfile) Database.create() Database.add_factory_entries() return "Configuration and Database restored"