Update:Remove auto download checkbox from edit podcast details tab, move max episodes to keep input to the schedule tab

This commit is contained in:
advplyr 2022-08-20 14:21:58 -05:00
parent 46668854ad
commit 0f01f21a0a
4 changed files with 67 additions and 48 deletions

View file

@ -39,22 +39,6 @@
</div>
</div>
</div>
<div class="flex items-center px-1 pt-6">
<div class="w-1/2 px-1 py-5">
<ui-checkbox v-model="autoDownloadEpisodes" label="Auto Download New Episodes" checkbox-bg="primary" border-color="gray-600" label-class="pl-2 text-base font-semibold" />
</div>
<div v-if="autoDownloadEpisodes" class="w-1/2 px-1">
<ui-text-input-with-label ref="maxEpisodesToKeep" v-model="maxEpisodesToKeep" type="number" class="max-w-48">
<ui-tooltip direction="bottom" text="Value of 0 sets no max limit. After a new episode is auto-downloaded this will delete the oldest episode if you have more than X episodes.">
<p class="text-sm">
Max episodes to keep
<span class="material-icons icon-text text-sm">info_outlined</span>
</p>
</ui-tooltip>
</ui-text-input-with-label>
</div>
</div>
</form>
</div>
</template>
@ -83,8 +67,6 @@ export default {
explicit: false,
language: null
},
autoDownloadEpisodes: false,
maxEpisodesToKeep: 0,
newTags: []
}
},
@ -209,13 +191,6 @@ export default {
updatePayload.tags = [...this.newTags]
}
if (this.media.autoDownloadEpisodes !== this.autoDownloadEpisodes) {
updatePayload.autoDownloadEpisodes = !!this.autoDownloadEpisodes
}
if (this.autoDownloadEpisodes && !isNaN(this.maxEpisodesToKeep) && Number(this.maxEpisodesToKeep) != this.media.maxEpisodesToKeep) {
updatePayload.maxEpisodesToKeep = Number(this.maxEpisodesToKeep)
}
return {
updatePayload,
hasChanges: !!Object.keys(updatePayload).length
@ -235,8 +210,6 @@ export default {
this.details.language = this.mediaMetadata.language || ''
this.details.explicit = !!this.mediaMetadata.explicit
this.autoDownloadEpisodes = !!this.media.autoDownloadEpisodes
this.maxEpisodesToKeep = this.media.maxEpisodesToKeep || 0
this.newTags = [...(this.media.tags || [])]
},
submitForm() {