mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
Minor improvements (#1633)
* Minor improvements * Update CHANGELOG.md * Update filelist.php * Update ffprobe_info.php * Updated * Update announce.php * Update announce.php * Update ffprobe_info.php * Updated * Update ffprobe_info.php * Update ffprobe_info.php * Updated * Update common.php * Update common.php * Revert "Update common.php" This reverts commit3793263ff0
. * Revert "Update common.php" This reverts commit3911e72dba
. * Update common.php * Updated * Update playback_m3u.tpl * Update ffprobe_info.php * Update playback_m3u.php * Update dl.php * Update dl.php * Updated * Update dl.php * Update playback_m3u.php * Revert "Update playback_m3u.php" This reverts commit8cf6e9a041
. * Revert "Update dl.php" This reverts commit7c11cc385b
. * Revert "Updated" This reverts commit9c004f0651
. * Revert "Update dl.php" This reverts commit26d5feffa5
. * Revert "Update dl.php" This reverts commit261f8d3e62
. * Update playback_m3u.php * Updated * Update dl.php * Update dl.php * Update CHANGELOG.md
This commit is contained in:
parent
f5a9490dfe
commit
001c210217
16 changed files with 80 additions and 51 deletions
|
@ -595,29 +595,6 @@ function humn_size($size, $rounder = null, $min = null, $space = ' ')
|
|||
return round($size, $rounder) . $space . $ext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Bitrate to human-readable format
|
||||
*
|
||||
* @param int $bitrate
|
||||
* @param string $space
|
||||
* @return string
|
||||
*/
|
||||
function humn_bitrate(int $bitrate, string $space = ' '): string
|
||||
{
|
||||
if ($bitrate >= 1000000) {
|
||||
$unit = 'Mbps';
|
||||
$bitrate /= 1000000;
|
||||
} elseif ($bitrate >= 1000) {
|
||||
$unit = 'kbps';
|
||||
$bitrate /= 1000;
|
||||
} else {
|
||||
$unit = 'bps';
|
||||
}
|
||||
|
||||
$formattedBitrate = number_format($bitrate, 2);
|
||||
return $formattedBitrate . $space . $unit;
|
||||
}
|
||||
|
||||
function bt_show_ip($ip, $port = '')
|
||||
{
|
||||
global $bb_cfg;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue