mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
Merge branch 'master' into new-torrent
This commit is contained in:
@@ -67,7 +67,10 @@ export default function AddDialog({
|
||||
|
||||
const allHashes = torrents.map(({ hash }) => hash)
|
||||
allHashes.includes(currentSourceHash) && handleClose()
|
||||
}, [isSaving, torrents, currentSourceHash, handleClose])
|
||||
// FIXME! check api reply on add links
|
||||
const linkRegex = /^(http(s?)):\/\/.*/i
|
||||
torrentSource.match(linkRegex) !== null && handleClose()
|
||||
}, [isSaving, torrents, torrentSource, currentSourceHash, handleClose])
|
||||
|
||||
const fullScreen = useMediaQuery('@media (max-width:930px)')
|
||||
|
||||
|
||||
@@ -95,8 +95,16 @@ export default function App() {
|
||||
)}
|
||||
</HeaderToggle>
|
||||
|
||||
<HeaderToggle onClick={() => (currentLang === 'en' ? changeLang('ru') : changeLang('en'))}>
|
||||
{currentLang === 'en' ? 'EN' : 'RU'}
|
||||
<HeaderToggle
|
||||
onClick={() =>
|
||||
currentLang === 'en'
|
||||
? changeLang('ru')
|
||||
: currentLang === 'ru'
|
||||
? changeLang('ua')
|
||||
: changeLang('en')
|
||||
}
|
||||
>
|
||||
{currentLang.toUpperCase()}
|
||||
</HeaderToggle>
|
||||
</div>
|
||||
</AppHeader>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import styled, { css } from 'styled-components'
|
||||
|
||||
const viewedPrimaryColor = '#bdbdbd'
|
||||
const viewedSecondaryColor = '#c4c4c4'
|
||||
const viewedTertiaryColor = '#c9c9c9'
|
||||
const bigTableDividerColor = '#ddd'
|
||||
const bigTableDefaultRowColor = '#fff'
|
||||
const bigTableViewedRowColor = '#f3f3f3'
|
||||
const viewedPrimaryColor = '#858c90'
|
||||
const viewedSecondaryColor = '#8c9498'
|
||||
const viewedTertiaryColor = '#949ca0'
|
||||
const bigTableDividerColor = '#d2d2d2'
|
||||
const bigTableDefaultRowColor = '#f3f3f3'
|
||||
const bigTableViewedRowColor = '#ddd'
|
||||
|
||||
const viewedIndicator = css`
|
||||
${({
|
||||
@@ -187,7 +187,7 @@ export const ShortTable = styled.div`
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
background: #fff;
|
||||
background: #f3f3f3;
|
||||
|
||||
@media (max-width: 410px) {
|
||||
gap: 10px;
|
||||
|
||||
@@ -93,7 +93,7 @@ const TorrentCache = ({ cache, isMini, isSnakeDebugMode }) => {
|
||||
|
||||
if (isSnakeDebugMode && priority > 0) {
|
||||
let info = ''
|
||||
if (priority === 1) info = '*'
|
||||
if (priority === 1) info = ''
|
||||
else if (priority === 2) info = 'H'
|
||||
else if (priority === 3) info = 'R'
|
||||
else if (priority === 4) info = 'N'
|
||||
|
||||
@@ -7,10 +7,10 @@ export const snakeSettings = {
|
||||
borderWidth: 1,
|
||||
pieceSize: 14,
|
||||
gapBetweenPieces: 3,
|
||||
borderColor: rgba('#949ca0', 0.25),
|
||||
borderColor: rgba('#fff', 0.2),
|
||||
completeColor: rgba(mainColors.dark.primary, 0.5),
|
||||
backgroundColor: '#f1eff3',
|
||||
progressColor: mainColors.dark.secondary,
|
||||
backgroundColor: '#949ca0',
|
||||
progressColor: rgba('#fff', 0.2),
|
||||
readerColor: '#8f0405',
|
||||
rangeColor: '#cda184',
|
||||
},
|
||||
|
||||
@@ -28,13 +28,16 @@ const TorrentFunctions = memo(
|
||||
<>
|
||||
<SmallLabel>{t('DownloadPlaylist')}</SmallLabel>
|
||||
<SectionSubName mb={10}>
|
||||
<strong>{t('LatestFilePlayed')}</strong> {latestViewedFileData?.title}.
|
||||
{latestViewedFileData?.season && (
|
||||
<>
|
||||
{' '}
|
||||
{t('Season')}: {latestViewedFileData?.season}. {t('Episode')}: {latestViewedFileData?.episode}.
|
||||
</>
|
||||
)}
|
||||
{t('LatestFilePlayed')}{' '}
|
||||
<strong>
|
||||
{latestViewedFileData?.title}.
|
||||
{latestViewedFileData?.season && (
|
||||
<>
|
||||
{' '}
|
||||
{t('Season')}: {latestViewedFileData?.season}. {t('Episode')}: {latestViewedFileData?.episode}.
|
||||
</>
|
||||
)}
|
||||
</strong>
|
||||
</SectionSubName>
|
||||
|
||||
<MainSectionButtonGroup>
|
||||
|
||||
@@ -289,7 +289,7 @@ export const LoadingProgress = styled.div.attrs(
|
||||
return {
|
||||
// this block is here according to styled-components recomendation about fast changable components
|
||||
style: {
|
||||
background: `linear-gradient(to right, ${gradientStartColor} 0%, ${gradientEndColor} ${percentage}%, #fff ${percentage}%, #fff 100%)`,
|
||||
background: `linear-gradient(to right, ${gradientStartColor} 0%, ${gradientEndColor} ${percentage}%, #eee ${percentage}%, #fff 100%)`,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10,6 +10,7 @@ export default function SecondarySettingsComponent({ settings, inputForm }) {
|
||||
const {
|
||||
RetrackersMode,
|
||||
TorrentDisconnectTimeout,
|
||||
EnableDLNA,
|
||||
EnableIPv6,
|
||||
ForceEncrypt,
|
||||
DisableTCP,
|
||||
@@ -133,6 +134,11 @@ export default function SecondarySettingsComponent({ settings, inputForm }) {
|
||||
label='UPnP (Universal Plug and Play)'
|
||||
labelPlacement='start'
|
||||
/>
|
||||
<FormControlLabel
|
||||
control={<Switch checked={EnableDLNA} onChange={inputForm} id='EnableDLNA' color='secondary' />}
|
||||
label={t('SettingsDialog.DLNA')}
|
||||
labelPlacement='start'
|
||||
/>
|
||||
<br />
|
||||
<InputLabel htmlFor='RetrackersMode'>{t('SettingsDialog.RetrackersMode')}</InputLabel>
|
||||
<Select
|
||||
|
||||
@@ -3,6 +3,7 @@ import { initReactI18next } from 'react-i18next'
|
||||
import LanguageDetector from 'i18next-browser-languagedetector'
|
||||
import translationEN from 'locales/en/translation.json'
|
||||
import translationRU from 'locales/ru/translation.json'
|
||||
import translationUA from 'locales/ua/translation.json'
|
||||
|
||||
i18n
|
||||
.use(LanguageDetector)
|
||||
@@ -10,7 +11,11 @@ i18n
|
||||
.init({
|
||||
fallbackLng: 'en', // default language will be used if none of declared lanuages detected (en, ru)
|
||||
interpolation: { escapeValue: false }, // react already safes from xss
|
||||
resources: { en: { translation: translationEN }, ru: { translation: translationRU } },
|
||||
resources: {
|
||||
en: { translation: translationEN },
|
||||
ru: { translation: translationRU },
|
||||
ua: { translation: translationUA },
|
||||
},
|
||||
})
|
||||
|
||||
export default i18n
|
||||
|
||||
@@ -33,12 +33,12 @@
|
||||
"CopyHash": "Copy Hash",
|
||||
"CopyLink": "Copy link",
|
||||
"Data": "Data",
|
||||
"DebugMode": "Show download priorities",
|
||||
"DebugMode": "Download priorities",
|
||||
"Delete": "Delete",
|
||||
"DeleteTorrent?": "Delete Torrent?",
|
||||
"DeleteTorrents?": "Delete All Torrents?",
|
||||
"DetailedCacheView": {
|
||||
"button": "Detailed Cache View",
|
||||
"button": "Cache Details View",
|
||||
"header": "$t(DetailedCacheView.button)"
|
||||
},
|
||||
"Details": "Details",
|
||||
@@ -98,6 +98,7 @@
|
||||
"DHT": "DHT (Distributed Hash Table)",
|
||||
"DhtConnectionLimit": "DHT Connection Limit",
|
||||
"Disk": "Disk",
|
||||
"DLNA": "DLNA Media Server",
|
||||
"DontAddRetrackers": "Don`t add retrackers",
|
||||
"DownloadRateLimit": "Download Rate Limit",
|
||||
"ForceEncrypt": "Force Encrypt Headers",
|
||||
|
||||
@@ -33,13 +33,13 @@
|
||||
"CopyHash": "Скопировать хеш",
|
||||
"CopyLink": "Копировать",
|
||||
"Data": "Данные",
|
||||
"DebugMode": "Метки приоритетов загрузки",
|
||||
"DebugMode": "Метки приоритетов",
|
||||
"Delete": "Удалить",
|
||||
"DeleteTorrent?": "Удалить торрент?",
|
||||
"DeleteTorrents?": "Удалить все торренты?",
|
||||
"DetailedCacheView": {
|
||||
"button": "Информация о заполнении кеша",
|
||||
"header": "Заполнение кеша"
|
||||
"button": "Заполнение кеша",
|
||||
"header": "Информация о кеше"
|
||||
},
|
||||
"Details": "Инфо",
|
||||
"Donate?": "Хотите поддержать проект?",
|
||||
@@ -66,7 +66,7 @@
|
||||
"Mbps": "Мбит/c",
|
||||
"Name": "Название",
|
||||
"NoTorrentsAdded": "Нет торрентов",
|
||||
"Offline": "Сервер не доступен",
|
||||
"Offline": "Сервер недоступен",
|
||||
"OK": "OK",
|
||||
"OpenLink": "Открыть",
|
||||
"Peers": "Пиры",
|
||||
@@ -98,6 +98,7 @@
|
||||
"DHT": "DHT (Distributed Hash Table)",
|
||||
"DhtConnectionLimit": "Лимит подключений DHT",
|
||||
"Disk": "ПЗУ / Накопитель",
|
||||
"DLNA": "DLNA-медиасервер",
|
||||
"DontAddRetrackers": "Ничего не делать",
|
||||
"DownloadRateLimit": "Ограничение скорости загрузки",
|
||||
"ForceEncrypt": "Принудительное шифрование заголовков",
|
||||
|
||||
151
web/src/locales/ua/translation.json
Normal file
151
web/src/locales/ua/translation.json
Normal file
@@ -0,0 +1,151 @@
|
||||
{
|
||||
"About": "Про сервер",
|
||||
"Actions": "Дії",
|
||||
"Add": "Додати",
|
||||
"AddDialog": {
|
||||
"AddPosterLinkInput": "Посилання на плакат",
|
||||
"AddTorrentSourceNotification": "Спочатку додайте torrent-джерело",
|
||||
"AppendFile": {
|
||||
"Or": "ЧИ",
|
||||
"ClickOrDrag": "НАТИСНІТЬ / ПЕРЕТЯГНІТЬ ФАЙЛ (.torrent)"
|
||||
},
|
||||
"CustomTorrentTitle": "Власна назва (опційно)",
|
||||
"CustomTorrentTitleHelperText": "Напишіть власну назву, щоб знайти плакат",
|
||||
"HashExists": "Даний торент вже є у базі даних",
|
||||
"OriginalTorrentTitle": "Оригінальна назва торенту",
|
||||
"TitleBlank": "Назва (порожнє - ориг. назва торенту)",
|
||||
"TorrentSourceLink": "Посилання на джерело терента",
|
||||
"TorrentSourceOptions": "magnet-посилання / хеш / посилання на .torrent файл",
|
||||
"WrongTorrentSource": "Хибне torrent-джерело"
|
||||
},
|
||||
"AddFromLink": "Додати торент",
|
||||
"AddNewTorrent": "Додати новий торент",
|
||||
"B": "Б",
|
||||
"bps": "біт/c",
|
||||
"Buffer": "Буфер",
|
||||
"BufferNote": "Встановіть буфер попереднього завантаження > 32 МБ в налаштуваннях, щоб його змінити.",
|
||||
"Cache": "Кеш",
|
||||
"Cancel": "Скасувати",
|
||||
"Clear": "Очистити",
|
||||
"Close": "Закрити",
|
||||
"CloseServer?": "Хочете вимкнути сервер?",
|
||||
"CloseServer": "Вимк. сервер",
|
||||
"CopyHash": "Скопіювати хеш",
|
||||
"CopyLink": "Копіювати",
|
||||
"Data": "Дані",
|
||||
"DebugMode": "Мітки пріоритетів",
|
||||
"Delete": "Видалити",
|
||||
"DeleteTorrent?": "Видалити торент?",
|
||||
"DeleteTorrents?": "Видалити всі торенти?",
|
||||
"DetailedCacheView": {
|
||||
"button": "Заповнення кеша",
|
||||
"header": "Інформація про кеш"
|
||||
},
|
||||
"Details": "Деталі",
|
||||
"Donate?": "Бажаєте підтримати проєкт?",
|
||||
"Donate": "Підтримка",
|
||||
"DownloadPlaylist": "Завантажити список відтворення",
|
||||
"DownloadSpeed": "Швидкість завантаження",
|
||||
"Drop": "Скинути",
|
||||
"DropTorrent": "Скинути торент",
|
||||
"Edit": "Редагувати",
|
||||
"EditTorrent": "Редагувати торент",
|
||||
"Episode": "Серія",
|
||||
"FromLatestFile": "З останнього файлу",
|
||||
"Full": "Повний",
|
||||
"GB": "ГБ",
|
||||
"Gbps": "Гбіт/c",
|
||||
"Host": "Хост",
|
||||
"Info": "Інфо",
|
||||
"KB": "КБ",
|
||||
"kbps": "кбіт/с",
|
||||
"Kilobytes": "Кілобайт",
|
||||
"LatestFilePlayed": "Останній файл, що програвався:",
|
||||
"Links": "Посилання",
|
||||
"MB": "МБ",
|
||||
"Mbps": "Мбіт/c",
|
||||
"Name": "Назва",
|
||||
"NoTorrentsAdded": "Немає торентів",
|
||||
"Offline": "Сервер не доступний",
|
||||
"OK": "OK",
|
||||
"OpenLink": "Відкрити",
|
||||
"Peers": "Піри",
|
||||
"PiecesCount": "К-сть блоків",
|
||||
"PiecesLength": "Розмір блоку",
|
||||
"Playlist": "Плейлист",
|
||||
"Preload": "Передзав.",
|
||||
"ProjectSource": "Сайт проекту",
|
||||
"Releases": "Релізи TorrServer",
|
||||
"RemoveAll": "Видалити все",
|
||||
"RemoveViews": "Видалити перегляди",
|
||||
"Resolution": "Дозволи",
|
||||
"Save": "Зберегти",
|
||||
"ScrollDown": "прокрутіть вних",
|
||||
"Season": "Сезон",
|
||||
"Sec": "c",
|
||||
"Seconds": "Секунди",
|
||||
"SelectSeason": "Вибір сезону",
|
||||
"SettingsDialog": {
|
||||
"AddRetrackers": "Додавати",
|
||||
"AdditionalSettings": "Додаткові налаштування",
|
||||
"CacheBeforeReaderDesc": "з кешу буде збережено до поточного відтворюваного кадру",
|
||||
"CacheAfterReaderDesc": "з кешу буде завантажено після поточно відтвореного кадру",
|
||||
"CacheSize": "Размір кешу",
|
||||
"CacheSettings": "Налаштування кешу",
|
||||
"CacheStorageLocation": "Місце збереження кешу",
|
||||
"ConnectionsLimit": "Обмеження з'єдань",
|
||||
"ConnectionsLimitHint": "рекомендовано 20-25",
|
||||
"DHT": "DHT (Distributed Hash Table)",
|
||||
"DhtConnectionLimit": "Обмеження з'єдань DHT",
|
||||
"Disk": "ПЗП / Носій",
|
||||
"DLNA": "DLNA-медиасервер",
|
||||
"DontAddRetrackers": "Нічого не робити",
|
||||
"DownloadRateLimit": "Обмеження швидкості завантаження",
|
||||
"ForceEncrypt": "Примусово шифрувати заголовки",
|
||||
"PeersListenPort": "Порт для вхідних з'єднань",
|
||||
"PeersListenPortHint": "1024 - 65535, 0 - авто",
|
||||
"PreloadCache": "Буфер попер. завантаження",
|
||||
"ProMode": "ПРО-режим",
|
||||
"RAM": "Оперативна пам'ять",
|
||||
"ReaderReadAHead": "Качати кеш зазделегідь (5-100%, рек. 95%)",
|
||||
"RemoveCacheOnDrop": "Видаляти кеш при відключенні від торрента",
|
||||
"RemoveCacheOnDropDesc": "Якщо виключено, тоді кеш видаляється при видалені торенту.",
|
||||
"RemoveRetrackers": "Видалити",
|
||||
"ReplaceRetrackers": "Замінити",
|
||||
"RetrackersMode": "Ретрекери",
|
||||
"ResetToDefault": "Базові налаштування",
|
||||
"Settings": "Налаштування",
|
||||
"TorrentDisconnectTimeout": "Час очікування відключення торрента",
|
||||
"TorrentsSavePath": "Шлях для збереження кешу",
|
||||
"Upload": "Відвантаження (не рекомендується вимикати)",
|
||||
"UploadRateLimit": "Обмеження швидкості відвантаження",
|
||||
"UseDiskDesc": "Краще використовуйте оперативну пам'ять або зовнішню пам'ять на пристроях на основі flash-пам'яттю",
|
||||
"Tabs": {
|
||||
"Main": "Основні",
|
||||
"Additional": "Додаткові",
|
||||
"AdditionalDisabled": "(включіть ПРО-режим)"
|
||||
}
|
||||
},
|
||||
"Size": "Розмір",
|
||||
"SpecialThanks": "Окрема подяка",
|
||||
"Speed": "Швидкість",
|
||||
"Support": "Підтримати",
|
||||
"TB": "ТБ",
|
||||
"Tbps": "Тбіт/с",
|
||||
"ThanksToEveryone": "Дякуємо всім, хто тестував і допомагав!",
|
||||
"TorrentAdded": "Доданий",
|
||||
"TorrentClosed": "Закритий",
|
||||
"TorrentContent": "Вміст торенту",
|
||||
"TorrentDetails": "Інформація про торент",
|
||||
"TorrentGettingInfo": "Отримання інформації",
|
||||
"TorrentInDb": "Торент в БД",
|
||||
"TorrentPreload": "Передзавантаження",
|
||||
"TorrentSize": "Розмір торенту",
|
||||
"TorrentState": "Дані торенту",
|
||||
"TorrentStatus": "Статус торенту",
|
||||
"TorrentWorking": "Активний",
|
||||
"TurnOff": "Виключити",
|
||||
"UploadFile": "Завантажити файл",
|
||||
"UploadSpeed": "Швидкість відвантаження",
|
||||
"Viewed": "Перегл."
|
||||
}
|
||||
@@ -78,7 +78,7 @@ export const themeColors = {
|
||||
detailedView: {
|
||||
gradientStartColor: '#656f76',
|
||||
gradientEndColor: '#545a5e',
|
||||
cacheSectionBGColor: '#dee3e5',
|
||||
cacheSectionBGColor: '#949ca0',
|
||||
},
|
||||
addDialog: {
|
||||
gradientStartColor: '#656f76',
|
||||
|
||||
Reference in New Issue
Block a user