diff --git a/client/components/cards/LazyBookCard.vue b/client/components/cards/LazyBookCard.vue index fce597ca..435d211f 100644 --- a/client/components/cards/LazyBookCard.vue +++ b/client/components/cards/LazyBookCard.vue @@ -740,7 +740,7 @@ export default { episodeId: this.recentEpisode.id, title: this.recentEpisode.title, subtitle: this.mediaMetadata.title, - caption: this.recentEpisode.publishedAt ? `Published ${this.$formatDate(this.recentEpisode.publishedAt, 'MMM do, yyyy')}` : 'Unknown publish date', + caption: this.recentEpisode.publishedAt ? `Published ${this.$formatDate(this.recentEpisode.publishedAt, this.dateFormat)}` : 'Unknown publish date', duration: this.recentEpisode.audioFile.duration || null, coverPath: this.media.coverPath || null } @@ -864,7 +864,7 @@ export default { episodeId: episode.id, title: episode.title, subtitle: this.mediaMetadata.title, - caption: episode.publishedAt ? `Published ${this.$formatDate(episode.publishedAt, 'MMM do, yyyy')}` : 'Unknown publish date', + caption: episode.publishedAt ? `Published ${this.$formatDate(episode.publishedAt, this.dateFormat)}` : 'Unknown publish date', duration: episode.audioFile.duration || null, coverPath: this.media.coverPath || null }) diff --git a/client/components/modals/BookmarksModal.vue b/client/components/modals/BookmarksModal.vue index de76c4c1..1bf3748d 100644 --- a/client/components/modals/BookmarksModal.vue +++ b/client/components/modals/BookmarksModal.vue @@ -73,6 +73,12 @@ export default { }, canCreateBookmark() { return !this.bookmarks.find((bm) => bm.time === this.currentTime) + }, + dateFormat() { + return this.$store.state.serverSettings.dateFormat + }, + timeFormat() { + return this.$store.state.serverSettings.timeFormat } }, methods: { @@ -111,7 +117,7 @@ export default { }, submitCreateBookmark() { if (!this.newBookmarkTitle) { - this.newBookmarkTitle = this.$formatDate(Date.now(), 'MMM dd, yyyy HH:mm') + this.newBookmarkTitle = this.$formatDatetime(Date.now(), this.dateFormat, this.timeFormat) } var bookmark = { title: this.newBookmarkTitle, @@ -134,4 +140,4 @@ export default { } } } - \ No newline at end of file + diff --git a/client/components/modals/ListeningSessionModal.vue b/client/components/modals/ListeningSessionModal.vue index fb435107..79e66cc7 100644 --- a/client/components/modals/ListeningSessionModal.vue +++ b/client/components/modals/ListeningSessionModal.vue @@ -19,13 +19,13 @@
/{{ backup.path.replace(/\\/g, '/') }}
{{ $strings.MessageImportantNotice }}
-{{ $strings.MessageRestoreBackupConfirm }} {{ selectedBackup.datePretty }}?
+{{ $strings.MessageRestoreBackupConfirm }} {{ $formatDatetime(selectedBackup.createdAt, dateFormat, timeFormat) }}?
Season #{{ episode.season }}
Episode #{{ episode.episode }}
-Published {{ $formatDate(publishedAt, 'MMM do, yyyy') }}
+Published {{ $formatDate(publishedAt, dateFormat) }}
{{ $strings.MessageValidCronExpression }}
{{ $strings.LabelNextScheduledRun }}: {{ nextRun }}
+{{ scheduleDescription }}
- +{{ $strings.LabelExample }}: {{ dateExample }}
+{{ $strings.LabelExample }}: {{ timeExample }}
{{ $secondsToTimestamp(session.currentTime) }}
{{ Math.floor(item.progress * 100) }}%
@@ -149,6 +149,12 @@ export default { latestSession() { if (!this.listeningSessions.sessions || !this.listeningSessions.sessions.length) return null return this.listeningSessions.sessions[0] + }, + dateFormat() { + return this.$store.state.serverSettings.dateFormat + }, + timeFormat() { + return this.$store.state.serverSettings.timeFormat } }, methods: { diff --git a/client/pages/config/users/_id/sessions.vue b/client/pages/config/users/_id/sessions.vue index 7377a91d..4dd4e643 100644 --- a/client/pages/config/users/_id/sessions.vue +++ b/client/pages/config/users/_id/sessions.vue @@ -46,7 +46,7 @@{{ $secondsToTimestamp(session.currentTime) }}
@@ -96,6 +96,12 @@ export default { }, userOnline() { return this.$store.getters['users/getIsUserOnline'](this.user.id) + }, + dateFormat() { + return this.$store.state.serverSettings.dateFormat + }, + timeFormat() { + return this.$store.state.serverSettings.timeFormat } }, methods: { @@ -140,7 +146,7 @@ export default { episodeId: episode.id, title: episode.title, subtitle: libraryItem.media.metadata.title, - caption: episode.publishedAt ? `Published ${this.$formatDate(episode.publishedAt, 'MMM do, yyyy')}` : 'Unknown publish date', + caption: episode.publishedAt ? `Published ${this.$formatDate(episode.publishedAt, this.dateFormat)}` : 'Unknown publish date', duration: episode.audioFile.duration || null, coverPath: libraryItem.media.coverPath || null } @@ -252,4 +258,4 @@ export default { padding: 4px 8px; font-size: 0.75rem; } - \ No newline at end of file + diff --git a/client/pages/item/_id/index.vue b/client/pages/item/_id/index.vue index d613d54e..86c1ea0e 100644 --- a/client/pages/item/_id/index.vue +++ b/client/pages/item/_id/index.vue @@ -638,7 +638,7 @@ export default { episodeId: episode.id, title: episode.title, subtitle: this.title, - caption: episode.publishedAt ? `Published ${this.$formatDate(episode.publishedAt, 'MMM do, yyyy')}` : 'Unknown publish date', + caption: episode.publishedAt ? `Published ${this.$formatDate(episode.publishedAt, this.dateFormat)}` : 'Unknown publish date', duration: episode.audioFile.duration || null, coverPath: this.libraryItem.media.coverPath || null }) diff --git a/client/pages/library/_library/podcast/latest.vue b/client/pages/library/_library/podcast/latest.vue index 58f5f360..96c8ebf6 100644 --- a/client/pages/library/_library/podcast/latest.vue +++ b/client/pages/library/_library/podcast/latest.vue @@ -130,6 +130,9 @@ export default { if (i.episodeId) episodeIds[i.episodeId] = true }) return episodeIds + }, + dateFormat() { + return this.$store.state.serverSettings.dateFormat } }, methods: { @@ -173,7 +176,7 @@ export default { episodeId: episode.id, title: episode.title, subtitle: episode.podcast.metadata.title, - caption: episode.publishedAt ? `Published ${this.$formatDate(episode.publishedAt, 'MMM do, yyyy')}` : 'Unknown publish date', + caption: episode.publishedAt ? `Published ${this.$formatDate(episode.publishedAt, this.dateFormat)}` : 'Unknown publish date', duration: episode.duration || null, coverPath: episode.podcast.coverPath || null }) @@ -211,7 +214,7 @@ export default { episodeId: episode.id, title: episode.title, subtitle: episode.podcast.metadata.title, - caption: episode.publishedAt ? `Published ${this.$formatDate(episode.publishedAt, 'MMM do, yyyy')}` : 'Unknown publish date', + caption: episode.publishedAt ? `Published ${this.$formatDate(episode.publishedAt, this.dateFormat)}` : 'Unknown publish date', duration: episode.duration || null, coverPath: episode.podcast.coverPath || null } diff --git a/client/plugins/init.client.js b/client/plugins/init.client.js index 553d9b2e..ea6db96a 100644 --- a/client/plugins/init.client.js +++ b/client/plugins/init.client.js @@ -23,6 +23,22 @@ Vue.prototype.$formatJsDate = (jsdate, fnsFormat = 'MM/dd/yyyy HH:mm') => { if (!jsdate || !isDate(jsdate)) return '' return format(jsdate, fnsFormat) } +Vue.prototype.$formatTime = (unixms, fnsFormat = 'HH:mm') => { + if (!unixms) return '' + return format(unixms, fnsFormat) +} +Vue.prototype.$formatJsTime = (jsdate, fnsFormat = 'HH:mm') => { + if (!jsdate || !isDate(jsdate)) return '' + return format(jsdate, fnsFormat) +} +Vue.prototype.$formatDatetime = (unixms, fnsDateFormart = 'MM/dd/yyyy', fnsTimeFormat = 'HH:mm') => { + if (!unixms) return '' + return format(unixms, `${fnsDateFormart} ${fnsTimeFormat}`) +} +Vue.prototype.$formatJsDatetime = (jsdate, fnsDateFormart = 'MM/dd/yyyy', fnsTimeFormat = 'HH:mm') => { + if (!jsdate || !isDate(jsdate)) return '' + return format(jsdate, `${fnsDateFormart} ${fnsTimeFormat}`) +} Vue.prototype.$addDaysToToday = (daysToAdd) => { var date = addDays(new Date(), daysToAdd) if (!date || !isDate(date)) return null @@ -167,4 +183,4 @@ export default ({ app, store }, inject) => { inject('isDev', process.env.NODE_ENV !== 'production') store.commit('setRouterBasePath', app.$config.routerBasePath) -} \ No newline at end of file +} diff --git a/client/plugins/utils.js b/client/plugins/utils.js index 76dda3c9..c9ece333 100644 --- a/client/plugins/utils.js +++ b/client/plugins/utils.js @@ -1,4 +1,5 @@ import Vue from 'vue' +import cronParser from 'cron-parser' Vue.prototype.$bytesPretty = (bytes, decimals = 2) => { if (isNaN(bytes) || bytes == 0) { @@ -136,6 +137,11 @@ Vue.prototype.$parseCronExpression = (expression) => { } } +Vue.prototype.$getNextScheduledDate = (expression) => { + const interval = cronParser.parseExpression(expression); + return interval.next().toDate() +} + export function supplant(str, subs) { // source: http://crockford.com/javascript/remedial.html return str.replace(/{([^{}]*)}/g, @@ -144,4 +150,4 @@ export function supplant(str, subs) { return typeof r === 'string' || typeof r === 'number' ? r : a } ) -} \ No newline at end of file +} diff --git a/client/store/globals.js b/client/store/globals.js index 953398c1..9c126a97 100644 --- a/client/store/globals.js +++ b/client/store/globals.js @@ -32,9 +32,39 @@ export const state = () => ({ text: 'DD/MM/YYYY', value: 'dd/MM/yyyy' }, + { + text: 'DD.MM.YYYY', + value: 'dd.MM.yyyy' + }, { text: 'YYYY-MM-DD', value: 'yyyy-MM-dd' + }, + { + text: 'MMM do, yyyy', + value: 'MMM do, yyyy' + }, + { + text: 'MMMM do, yyyy', + value: 'MMMM do, yyyy' + }, + { + text: 'dd MMM yyyy', + value: 'dd MMM yyyy' + }, + { + text: 'dd MMMM yyyy', + value: 'dd MMMM yyyy' + } + ], + timeFormats: [ + { + text: 'h:mma (am/pm)', + value: 'h:mma' + }, + { + text: 'HH:mm (24-hour)', + value: 'HH:mm' } ], podcastTypes: [ diff --git a/client/strings/de.json b/client/strings/de.json index 32de2cfe..28785b3d 100644 --- a/client/strings/de.json +++ b/client/strings/de.json @@ -198,6 +198,7 @@ "LabelCronExpression": "Cron Ausdruck", "LabelCurrent": "Aktuell", "LabelCurrently": "Aktuell:", + "LabelCustomCronExpression": "Custom Cron Expression:", "LabelDatetime": "Datum & Uhrzeit", "LabelDescription": "Beschreibung", "LabelDeselectAll": "Alles abwählen", @@ -215,6 +216,7 @@ "LabelEpisode": "Episode", "LabelEpisodeTitle": "Episodentitel", "LabelEpisodeType": "Episodentyp", + "LabelExample": "Example", "LabelExplicit": "Explizit (Altersbeschränkung)", "LabelFeedURL": "Feed URL", "LabelFile": "Datei", @@ -276,6 +278,8 @@ "LabelNewestAuthors": "Neuste Autoren", "LabelNewestEpisodes": "Neueste Episoden", "LabelNewPassword": "Neues Passwort", + "LabelNextBackupDate": "Next backup date", + "LabelNextScheduledRun": "Next scheduled run", "LabelNotes": "Hinweise", "LabelNotFinished": "nicht beendet", "LabelNotificationAppriseURL": "Apprise URL(s)", @@ -368,6 +372,7 @@ "LabelSettingsStoreCoversWithItemHelp": "Standardmäßig werden die Titelbilder in /metadata/items gespeichert. Wenn diese Option aktiviert ist, werden die Titelbilder als jpg Datei in dem gleichen Ordner gespeichert in welchem sich auch das Medium befindet. Es wird immer nur eine Datei mit dem Namen \"cover.jpg\" gespeichert.", "LabelSettingsStoreMetadataWithItem": "Metadaten als OPF-Datei im Medienordner speichern", "LabelSettingsStoreMetadataWithItemHelp": "Standardmäßig werden die Metadaten in /metadata/items gespeichert. Wenn diese Option aktiviert ist, werden die Metadaten als OPF-Datei (Textdatei) in dem gleichen Ordner gespeichert in welchem sich auch das Medium befindet. Es wird immer nur eine Datei mit dem Namen \"matadata.abs\" gespeichert.", + "LabelSettingsTimeFormat": "Time Format", "LabelShowAll": "Alles anzeigen", "LabelSize": "Größe", "LabelSleepTimer": "Einschlaf-Timer", diff --git a/client/strings/en-us.json b/client/strings/en-us.json index a76db534..33bc5fdc 100644 --- a/client/strings/en-us.json +++ b/client/strings/en-us.json @@ -198,6 +198,7 @@ "LabelCronExpression": "Cron Expression", "LabelCurrent": "Current", "LabelCurrently": "Currently:", + "LabelCustomCronExpression": "Custom Cron Expression:", "LabelDatetime": "Datetime", "LabelDescription": "Description", "LabelDeselectAll": "Deselect All", @@ -215,6 +216,7 @@ "LabelEpisode": "Episode", "LabelEpisodeTitle": "Episode Title", "LabelEpisodeType": "Episode Type", + "LabelExample": "Example", "LabelExplicit": "Explicit", "LabelFeedURL": "Feed URL", "LabelFile": "File", @@ -276,6 +278,8 @@ "LabelNewestAuthors": "Newest Authors", "LabelNewestEpisodes": "Newest Episodes", "LabelNewPassword": "New Password", + "LabelNextBackupDate": "Next backup date", + "LabelNextScheduledRun": "Next scheduled run", "LabelNotes": "Notes", "LabelNotFinished": "Not Finished", "LabelNotificationAppriseURL": "Apprise URL(s)", @@ -368,6 +372,7 @@ "LabelSettingsStoreCoversWithItemHelp": "By default covers are stored in /metadata/items, enabling this setting will store covers in your library item folder. Only one file named \"cover\" will be kept", "LabelSettingsStoreMetadataWithItem": "Store metadata with item", "LabelSettingsStoreMetadataWithItemHelp": "By default metadata files are stored in /metadata/items, enabling this setting will store metadata files in your library item folders. Uses .abs file extension", + "LabelSettingsTimeFormat": "Time Format", "LabelShowAll": "Show All", "LabelSize": "Size", "LabelSleepTimer": "Sleep timer", diff --git a/client/strings/es.json b/client/strings/es.json index a76db534..33bc5fdc 100644 --- a/client/strings/es.json +++ b/client/strings/es.json @@ -198,6 +198,7 @@ "LabelCronExpression": "Cron Expression", "LabelCurrent": "Current", "LabelCurrently": "Currently:", + "LabelCustomCronExpression": "Custom Cron Expression:", "LabelDatetime": "Datetime", "LabelDescription": "Description", "LabelDeselectAll": "Deselect All", @@ -215,6 +216,7 @@ "LabelEpisode": "Episode", "LabelEpisodeTitle": "Episode Title", "LabelEpisodeType": "Episode Type", + "LabelExample": "Example", "LabelExplicit": "Explicit", "LabelFeedURL": "Feed URL", "LabelFile": "File", @@ -276,6 +278,8 @@ "LabelNewestAuthors": "Newest Authors", "LabelNewestEpisodes": "Newest Episodes", "LabelNewPassword": "New Password", + "LabelNextBackupDate": "Next backup date", + "LabelNextScheduledRun": "Next scheduled run", "LabelNotes": "Notes", "LabelNotFinished": "Not Finished", "LabelNotificationAppriseURL": "Apprise URL(s)", @@ -368,6 +372,7 @@ "LabelSettingsStoreCoversWithItemHelp": "By default covers are stored in /metadata/items, enabling this setting will store covers in your library item folder. Only one file named \"cover\" will be kept", "LabelSettingsStoreMetadataWithItem": "Store metadata with item", "LabelSettingsStoreMetadataWithItemHelp": "By default metadata files are stored in /metadata/items, enabling this setting will store metadata files in your library item folders. Uses .abs file extension", + "LabelSettingsTimeFormat": "Time Format", "LabelShowAll": "Show All", "LabelSize": "Size", "LabelSleepTimer": "Sleep timer", diff --git a/client/strings/fr.json b/client/strings/fr.json index a4cdbfc9..57b58b6b 100644 --- a/client/strings/fr.json +++ b/client/strings/fr.json @@ -198,6 +198,7 @@ "LabelCronExpression": "Expression Cron", "LabelCurrent": "Courrant", "LabelCurrently": "En ce moment :", + "LabelCustomCronExpression": "Custom Cron Expression:", "LabelDatetime": "Datetime", "LabelDescription": "Description", "LabelDeselectAll": "Tout déselectionner", @@ -215,6 +216,7 @@ "LabelEpisode": "Épisode", "LabelEpisodeTitle": "Titre de l'épisode", "LabelEpisodeType": "Type de l'épisode", + "LabelExample": "Example", "LabelExplicit": "Restriction", "LabelFeedURL": "URL deu flux", "LabelFile": "Fichier", @@ -276,6 +278,8 @@ "LabelNewestAuthors": "Nouveaux auteurs", "LabelNewestEpisodes": "Derniers épisodes", "LabelNewPassword": "Nouveau mot de passe", + "LabelNextBackupDate": "Next backup date", + "LabelNextScheduledRun": "Next scheduled run", "LabelNotes": "Notes", "LabelNotFinished": "Non terminé(e)", "LabelNotificationAppriseURL": "URL(s) d'apprise", @@ -368,6 +372,7 @@ "LabelSettingsStoreCoversWithItemHelp": "Par défaut, les couvertures sont enregistrées dans /metadata/items. Activer ce paramètre enregistrera les couvertures dans le dossier avec les fichiersde l'article. Seul un fichier nommé \"cover\" sera gardé.", "LabelSettingsStoreMetadataWithItem": "Enregistrer les Métadonnées avec les articles", "LabelSettingsStoreMetadataWithItemHelp": "Par défaut, les métadonnées sont enregistrées dans /metadata/items. Activer ce paramètre enregistrera les métadonnées dans le dossier de l'article avec une extension \".abs\".", + "LabelSettingsTimeFormat": "Time Format", "LabelShowAll": "Afficher Tout", "LabelSize": "Taille", "LabelSleepTimer": "Minuterie", diff --git a/client/strings/hr.json b/client/strings/hr.json index 404c4d78..1c0b4211 100644 --- a/client/strings/hr.json +++ b/client/strings/hr.json @@ -198,6 +198,7 @@ "LabelCronExpression": "Cron Expression", "LabelCurrent": "Trenutan", "LabelCurrently": "Trenutno:", + "LabelCustomCronExpression": "Custom Cron Expression:", "LabelDatetime": "Datetime", "LabelDescription": "Opis", "LabelDeselectAll": "Odznači sve", @@ -215,6 +216,7 @@ "LabelEpisode": "Epizoda", "LabelEpisodeTitle": "Naslov epizode", "LabelEpisodeType": "Vrsta epizode", + "LabelExample": "Example", "LabelExplicit": "Explicit", "LabelFeedURL": "Feed URL", "LabelFile": "Datoteka", @@ -276,6 +278,8 @@ "LabelNewestAuthors": "Najnoviji autori", "LabelNewestEpisodes": "Najnovije epizode", "LabelNewPassword": "Nova lozinka", + "LabelNextBackupDate": "Next backup date", + "LabelNextScheduledRun": "Next scheduled run", "LabelNotes": "Bilješke", "LabelNotFinished": "Nedovršeno", "LabelNotificationAppriseURL": "Apprise URL(s)", @@ -368,6 +372,7 @@ "LabelSettingsStoreCoversWithItemHelp": "By default covers are stored in /metadata/items, enabling this setting will store covers in your library item folder. Only one file named \"cover\" will be kept", "LabelSettingsStoreMetadataWithItem": "Spremi metapodatke uz stavku", "LabelSettingsStoreMetadataWithItemHelp": "Po defaultu metapodatci su spremljeni u /metadata/items, uključujućite li ovu postavku, metapodatci će biti spremljeni u folderima od biblioteke. Koristi .abs ekstenziju.", + "LabelSettingsTimeFormat": "Time Format", "LabelShowAll": "Prikaži sve", "LabelSize": "Veličina", "LabelSleepTimer": "Sleep timer", diff --git a/client/strings/it.json b/client/strings/it.json index f6c2b528..6363993a 100644 --- a/client/strings/it.json +++ b/client/strings/it.json @@ -198,6 +198,7 @@ "LabelCronExpression": "Espressione Cron", "LabelCurrent": "Attuale", "LabelCurrently": "Attualmente:", + "LabelCustomCronExpression": "Custom Cron Expression:", "LabelDatetime": "Data & Ora", "LabelDescription": "Descrizione", "LabelDeselectAll": "Deseleziona Tutto", @@ -215,6 +216,7 @@ "LabelEpisode": "Episodio", "LabelEpisodeTitle": "Titolo Episodio", "LabelEpisodeType": "Tipo Episodio", + "LabelExample": "Example", "LabelExplicit": "Esplicito", "LabelFeedURL": "Feed URL", "LabelFile": "File", @@ -276,6 +278,8 @@ "LabelNewestAuthors": "Autori Recenti", "LabelNewestEpisodes": "Episodi Recenti", "LabelNewPassword": "Nuova Password", + "LabelNextBackupDate": "Next backup date", + "LabelNextScheduledRun": "Next scheduled run", "LabelNotes": "Note", "LabelNotFinished": "Da Completare", "LabelNotificationAppriseURL": "Apprendi URL(s)", @@ -368,6 +372,7 @@ "LabelSettingsStoreCoversWithItemHelp": "Di default, le immagini di copertina sono salvate dentro /metadata/items, abilitando questa opzione le copertine saranno archiviate nella cartella della libreria corrispondente. Verrà conservato solo un file denominato \"cover\"", "LabelSettingsStoreMetadataWithItem": "Archivia i metadata con il file", "LabelSettingsStoreMetadataWithItemHelp": "Di default, i metadati sono salvati dentro /metadata/items, abilitando questa opzione si memorizzeranno i metadata nella cartella della libreria. I file avranno estensione .abs", + "LabelSettingsTimeFormat": "Time Format", "LabelShowAll": "Mostra Tutto", "LabelSize": "Dimensione", "LabelSleepTimer": "Sleep timer", diff --git a/client/strings/pl.json b/client/strings/pl.json index db18a20f..1efed284 100644 --- a/client/strings/pl.json +++ b/client/strings/pl.json @@ -198,6 +198,7 @@ "LabelCronExpression": "Wyrażenie CRON", "LabelCurrent": "Aktualny", "LabelCurrently": "Obecnie:", + "LabelCustomCronExpression": "Custom Cron Expression:", "LabelDatetime": "Data i godzina", "LabelDescription": "Opis", "LabelDeselectAll": "Odznacz wszystko", @@ -215,6 +216,7 @@ "LabelEpisode": "Odcinek", "LabelEpisodeTitle": "Tytuł odcinka", "LabelEpisodeType": "Typ odcinka", + "LabelExample": "Example", "LabelExplicit": "Nieprzyzwoite", "LabelFeedURL": "URL kanału", "LabelFile": "Plik", @@ -276,6 +278,8 @@ "LabelNewestAuthors": "Najnowsi autorzy", "LabelNewestEpisodes": "Najnowsze odcinki", "LabelNewPassword": "Nowe hasło", + "LabelNextBackupDate": "Next backup date", + "LabelNextScheduledRun": "Next scheduled run", "LabelNotes": "Uwagi", "LabelNotFinished": "Nieukończone", "LabelNotificationAppriseURL": "URLe Apprise", @@ -368,6 +372,7 @@ "LabelSettingsStoreCoversWithItemHelp": "Domyślnie okładki są przechowywane w folderze /metadata/items, włączenie tej opcji spowoduje, że okładka będzie przechowywana w folderze ksiązki. Tylko jedna okładka o nazwie pliku \"cover\" będzie przechowywana.", "LabelSettingsStoreMetadataWithItem": "Przechowuj metadane w folderze książki", "LabelSettingsStoreMetadataWithItemHelp": "Domyślnie metadane są przechowywane w folderze /metadata/items, włączenie tej opcji spowoduje, że okładka będzie przechowywana w folderze ksiązki. Tylko jedna okładka o nazwie pliku \"cover\" będzie przechowywana. Rozszerzenie pliku metadanych: .abs", + "LabelSettingsTimeFormat": "Time Format", "LabelShowAll": "Pokaż wszystko", "LabelSize": "Rozmiar", "LabelSleepTimer": "Wyłącznik czasowy", diff --git a/client/strings/ru.json b/client/strings/ru.json index dd5d36d2..d4c1aa5a 100644 --- a/client/strings/ru.json +++ b/client/strings/ru.json @@ -198,6 +198,7 @@ "LabelCronExpression": "Выражение Cron", "LabelCurrent": "Текущий", "LabelCurrently": "Текущее:", + "LabelCustomCronExpression": "Custom Cron Expression:", "LabelDatetime": "Дата и время", "LabelDescription": "Описание", "LabelDeselectAll": "Снять Выделение", @@ -215,6 +216,7 @@ "LabelEpisode": "Эпизод", "LabelEpisodeTitle": "Имя Эпизода", "LabelEpisodeType": "Тип Эпизода", + "LabelExample": "Example", "LabelExplicit": "Явный", "LabelFeedURL": "URL Канала", "LabelFile": "Файл", @@ -276,6 +278,8 @@ "LabelNewestAuthors": "Новые Авторы", "LabelNewestEpisodes": "Новые Эпизоды", "LabelNewPassword": "Новый Пароль", + "LabelNextBackupDate": "Next backup date", + "LabelNextScheduledRun": "Next scheduled run", "LabelNotes": "Заметки", "LabelNotFinished": "Не Завершено", "LabelNotificationAppriseURL": "URL(ы) для извещений", @@ -368,6 +372,7 @@ "LabelSettingsStoreCoversWithItemHelp": "По умолчанию обложки сохраняются в папке /metadata/items, при включении этой настройки обложка будет храниться в папке элемента. Будет сохраняться только один файл с именем \"cover\"", "LabelSettingsStoreMetadataWithItem": "Хранить метаинформацию с элементом", "LabelSettingsStoreMetadataWithItemHelp": "По умолчанию метаинформация сохраняется в папке /metadata/items, при включении этой настройки метаинформация будет храниться в папке элемента. Используется расширение файла .abs", + "LabelSettingsTimeFormat": "Time Format", "LabelShowAll": "Показать Все", "LabelSize": "Размер", "LabelSleepTimer": "Таймер сна", diff --git a/client/strings/zh-cn.json b/client/strings/zh-cn.json index 16234d90..dd6495ae 100644 --- a/client/strings/zh-cn.json +++ b/client/strings/zh-cn.json @@ -198,6 +198,7 @@ "LabelCronExpression": "计划任务表达式", "LabelCurrent": "当前", "LabelCurrently": "当前:", + "LabelCustomCronExpression": "Custom Cron Expression:", "LabelDatetime": "日期时间", "LabelDescription": "描述", "LabelDeselectAll": "全部取消选择", @@ -215,6 +216,7 @@ "LabelEpisode": "剧集", "LabelEpisodeTitle": "剧集标题", "LabelEpisodeType": "剧集类型", + "LabelExample": "Example", "LabelExplicit": "信息准确", "LabelFeedURL": "源 URL", "LabelFile": "文件", @@ -276,6 +278,8 @@ "LabelNewestAuthors": "最新作者", "LabelNewestEpisodes": "最新剧集", "LabelNewPassword": "新密码", + "LabelNextBackupDate": "Next backup date", + "LabelNextScheduledRun": "Next scheduled run", "LabelNotes": "注释", "LabelNotFinished": "未听完", "LabelNotificationAppriseURL": "通知 URL(s)", @@ -368,6 +372,7 @@ "LabelSettingsStoreCoversWithItemHelp": "默认情况下封面存储在/metadata/items文件夹中, 启用此设置将存储封面在你媒体项目文件夹中. 只保留一个名为 \"cover\" 的文件", "LabelSettingsStoreMetadataWithItem": "存储项目元数据", "LabelSettingsStoreMetadataWithItemHelp": "默认情况下元数据文件存储在/metadata/items文件夹中, 启用此设置将存储元数据在你媒体项目文件夹中. 使 .abs 文件护展名", + "LabelSettingsTimeFormat": "Time Format", "LabelShowAll": "全部显示", "LabelSize": "文件大小", "LabelSleepTimer": "睡眠定时", diff --git a/package-lock.json b/package-lock.json index 8edcbc01..1533c39a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2314,4 +2314,4 @@ "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" } } -} \ No newline at end of file +} diff --git a/server/objects/settings/ServerSettings.js b/server/objects/settings/ServerSettings.js index 38b75370..1dbd3417 100644 --- a/server/objects/settings/ServerSettings.js +++ b/server/objects/settings/ServerSettings.js @@ -51,6 +51,7 @@ class ServerSettings { this.chromecastEnabled = false this.enableEReader = false this.dateFormat = 'MM/dd/yyyy' + this.timeFormat = 'HH:mm' this.language = 'en-us' this.logLevel = Logger.logLevel @@ -96,6 +97,7 @@ class ServerSettings { this.chromecastEnabled = !!settings.chromecastEnabled this.enableEReader = !!settings.enableEReader this.dateFormat = settings.dateFormat || 'MM/dd/yyyy' + this.timeFormat = settings.timeFormat || 'HH:mm' this.language = settings.language || 'en-us' this.logLevel = settings.logLevel || Logger.logLevel this.version = settings.version || null @@ -146,6 +148,7 @@ class ServerSettings { chromecastEnabled: this.chromecastEnabled, enableEReader: this.enableEReader, dateFormat: this.dateFormat, + timeFormat: this.timeFormat, language: this.language, logLevel: this.logLevel, version: this.version @@ -178,4 +181,4 @@ class ServerSettings { return hasUpdates } } -module.exports = ServerSettings \ No newline at end of file +module.exports = ServerSettings