mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
reformat peers info
This commit is contained in:
@@ -51,7 +51,7 @@ export const PeersWidget = ({ data }) => {
|
||||
return (
|
||||
<StatisticsField
|
||||
title={t('Peers')}
|
||||
value={getPeerString(data) || '0 · 0 / 0'}
|
||||
value={getPeerString(data) || '0 / 0 · 0'}
|
||||
iconBg={iconBGColor}
|
||||
valueBg={valueBGColor}
|
||||
icon={SwapVerticalCircleIcon}
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
"Offline": "Извън линия",
|
||||
"OK": "OK",
|
||||
"OpenLink": "Отвори линк",
|
||||
"Peers": "Пиъри",
|
||||
"Peers": "Пиъри·Сийдъри",
|
||||
"PiecesCount": "Брой парчета",
|
||||
"PiecesLength": "Дължина на парчетата",
|
||||
"Playlist": "Плейлист",
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
"Offline": "Offline",
|
||||
"OK": "OK",
|
||||
"OpenLink": "Open link",
|
||||
"Peers": "Peers",
|
||||
"Peers": "Peers·Seeds",
|
||||
"PiecesCount": "Pieces count",
|
||||
"PiecesLength": "Pieces length",
|
||||
"Playlist": "Playlist",
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
"Offline": "Сервер недоступен",
|
||||
"OK": "OK",
|
||||
"OpenLink": "Открыть",
|
||||
"Peers": "Пиры",
|
||||
"Peers": "Пиры·Сиды",
|
||||
"PiecesCount": "Кол-во блоков",
|
||||
"PiecesLength": "Размер блока",
|
||||
"Playlist": "Плейлист",
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
"Offline": "Сервер не доступний",
|
||||
"OK": "OK",
|
||||
"OpenLink": "Відкрити",
|
||||
"Peers": "Піри",
|
||||
"Peers": "Піри·Сіди",
|
||||
"PiecesCount": "К-сть блоків",
|
||||
"PiecesLength": "Розмір блоку",
|
||||
"Playlist": "Плейлист",
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
"Offline": "离线",
|
||||
"OK": "确定",
|
||||
"OpenLink": "打开链接",
|
||||
"Peers": "Peers",
|
||||
"Peers": "Peers·Seeds",
|
||||
"PiecesCount": "块数量",
|
||||
"PiecesLength": "块长度",
|
||||
"Playlist": "播放列表",
|
||||
|
||||
@@ -20,8 +20,9 @@ export function humanizeSpeed(speed) {
|
||||
}
|
||||
|
||||
export function getPeerString(torrent) {
|
||||
if (!torrent || !torrent.connected_seeders) return null
|
||||
return `${torrent.connected_seeders} · ${torrent.active_peers} / ${torrent.total_peers}`
|
||||
if (!torrent || !torrent.active_peers) return null
|
||||
const seeders = typeof torrent.connected_seeders !== 'undefined' ? torrent.connected_seeders : 0
|
||||
return `${torrent.active_peers} / ${torrent.total_peers} · ${seeders}`
|
||||
}
|
||||
|
||||
export const shortenText = (text, sympolAmount) =>
|
||||
|
||||
Reference in New Issue
Block a user