| 87 | } |
| 88 | |
| 89 | async fromSettings() { |
| 90 | const settings = await loadSettings(); |
| 91 | |
| 92 | this.DownloadMedia.checked = settings["download_media"]; |
| 93 | this.ExtraFields.checked = settings["extra_fields"]; |
| 94 | this.LevelTags.checked = settings["level_tags"]; |
| 95 | this.AnkiPrompt.checked = settings["anki_import_prompt"]; |
| 96 | |
| 97 | this.LearningProgress.checked = settings["learning_progress"]; |
| 98 | this.AlternativeAnswers.checked = settings["alternative_answers"]; |
| 99 | this.LearnableMeta.checked = settings["learnable_meta"]; |
| 100 | this.LearnableIds.checked = settings["learnable_ids"]; |
| 101 | this.SkipMedia.checked = settings["skip_media_download"]; |
| 102 | this.CourseMeta.checked = settings["course_metadata"]; |
| 103 | |
| 104 | this.Video.checked = (settings["videofiles_limit"] > 0); |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | function extractNumericValue(string, key) { |