mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Add: episode pubdate validation before saving
This commit is contained in:
		
							parent
							
								
									0eed38b771
								
							
						
					
					
						commit
						2ec84edb5e
					
				| @ -150,6 +150,12 @@ export default { | |||||||
|         this.$toast.info(this.$strings.ToastNoUpdatesNecessary) |         this.$toast.info(this.$strings.ToastNoUpdatesNecessary) | ||||||
|         return false |         return false | ||||||
|       } |       } | ||||||
|  | 
 | ||||||
|  |       // Check pubdate is valid if it is being updated. Cannot be set to null in the web client | ||||||
|  |       if (updatedDetails.pubDate === null) { | ||||||
|  |         this.$toast.error(this.$strings.ToastEpisodePubDateUpdateFailed) | ||||||
|  |         return null | ||||||
|  |       } | ||||||
|       return this.updateDetails(updatedDetails) |       return this.updateDetails(updatedDetails) | ||||||
|     }, |     }, | ||||||
|     async updateDetails(updatedDetails) { |     async updateDetails(updatedDetails) { | ||||||
|  | |||||||
| @ -1,9 +1,10 @@ | |||||||
| <template> | <template> | ||||||
|   <div class="w-full"> |   <div class="w-full"> | ||||||
|     <slot> |     <slot> | ||||||
|       <label :for="identifier" class="px-1 text-sm font-semibold" :class="{ 'text-gray-400': disabled }" |       <label :for="identifier" class="px-1 text-sm font-semibold" :class="{ 'text-gray-400': disabled }"> | ||||||
|         >{{ label }}<em v-if="note" class="font-normal text-xs pl-2">{{ note }}</em></label |         {{ label }} | ||||||
|       > |         <em v-if="note" class="font-normal text-xs pl-2">{{ note }}</em> | ||||||
|  |       </label> | ||||||
|     </slot> |     </slot> | ||||||
|     <ui-text-input :placeholder="placeholder || label" :inputId="identifier" ref="input" v-model="inputValue" :disabled="disabled" :readonly="readonly" :type="type" class="w-full" :class="inputClass" @blur="inputBlurred" /> |     <ui-text-input :placeholder="placeholder || label" :inputId="identifier" ref="input" v-model="inputValue" :disabled="disabled" :readonly="readonly" :type="type" class="w-full" :class="inputClass" @blur="inputBlurred" /> | ||||||
|   </div> |   </div> | ||||||
|  | |||||||
| @ -976,6 +976,7 @@ | |||||||
|   "ToastEpisodeDownloadQueueClearFailed": "Failed to clear queue", |   "ToastEpisodeDownloadQueueClearFailed": "Failed to clear queue", | ||||||
|   "ToastEpisodeDownloadQueueClearSuccess": "Episode download queue cleared", |   "ToastEpisodeDownloadQueueClearSuccess": "Episode download queue cleared", | ||||||
|   "ToastEpisodeUpdateSuccess": "{0} episodes updated", |   "ToastEpisodeUpdateSuccess": "{0} episodes updated", | ||||||
|  |   "ToastEpisodePubDateUpdateFailed": "Publish date is required", | ||||||
|   "ToastErrorCannotShare": "Cannot share natively on this device", |   "ToastErrorCannotShare": "Cannot share natively on this device", | ||||||
|   "ToastFailedToLoadData": "Failed to load data", |   "ToastFailedToLoadData": "Failed to load data", | ||||||
|   "ToastFailedToMatch": "Failed to match", |   "ToastFailedToMatch": "Failed to match", | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user