Skip to content

Commit

Permalink
Back to showing bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
jacklul committed Jun 2, 2024
1 parent 4cba6f0 commit b3d3206
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Assets/USharpVideoSubtitles/Scripts/SubtitleManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ private void FetchFromURL(VRCUrl url)

public override void OnStringLoadSuccess(IVRCStringDownload result)
{
LogMessage($"Remote string load success ({BytesToKilobytes(BitConverter.ToInt32(result.ResultBytes, 0))} kilobytes)");
LogMessage($"Remote string load success ({BitConverter.ToInt32(result.ResultBytes, 0)} bytes)");

if (result.Url == _URLTmp) // User entered URL - to be synchronized
ProcessInput(result.Result);
Expand Down Expand Up @@ -1363,11 +1363,5 @@ private void SendCallback(string callbackName)
callbackReceiver.SendCustomEvent(callbackName);
}
}

private double BytesToKilobytes(long bytes)
{
const double bytesPerKilobyte = 1024.0;
return bytes / bytesPerKilobyte;
}
}
}

0 comments on commit b3d3206

Please sign in to comment.