File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
vueapp/components/Videos/Actions Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -64,20 +64,20 @@ export default {
6464 getMediaText (media ) {
6565 var text = media? .info || ' ' ;
6666 text = text .replace (' * ' , ' x ' );
67- var size = parseInt (media? .size , 10 ) || 0 ;
67+ var size = media? .size || 0 ;
68+
6869 if (size == 0 ) {
6970 return text;
7071 }
7172
72- let kbtobytes = 1024 ;
73- let mbtobytes = 1000 * kbtobytes;
73+ size = size / 1024 ;
7474
75- if (size >= mbtobytes ) {
76- let megabytes = (size / mbtobytes). toFixed ( 1 );
77- text = text + ' (' + megabytes + ' MB)'
75+ if (size > 1024 ) {
76+ size = Math . round (size/ 1024 * 10 ) / 10
77+ text = text + ' (' + size + ' MB)'
7878 } else {
79- let kilobytes = (size / kbtobytes). toFixed ( 1 );
80- text = text + ' (' + kilobytes + ' KB)'
79+ size = Math . round (size * 10 ) / 10
80+ text = text + ' (' + size + ' KB)'
8181 }
8282
8383 return text
You can’t perform that action at this time.
0 commit comments