repo_description: Open Video Downloader - A cross-platform GUI for youtube-dl made in Rust with Tauri and Vue + Typescript.
repo_topics: cross-platform-gui downloader tailwind tauri vue youtube youtube-dl youtube-dl-gui ytdl
code: import { MediaGroupProgressPayload } from '../tauri/types/progress';
  
  export function computeGroupPercentage(p?: MediaGroupProgressPayload): number {
    if (!p) return 0;
    if (p.done && p.total) {
      return (p.done / p.total) * 100;
    }
    return 0;
  }
  
  export function capitalizeFirstLetter(value?: string): string {
    return (value ?? '').charAt(0).toUpperCase() + String(value).slice(1);
  }
  