<commit_before><div style='border: 1px solid black;'>
    <table>
        <tr style='padding:10px;'>
            <td style='padding:10px;'>
                <img src='<?php echo $broadcast['preview']; ?>' /> 
            </td>
            <td>
                <table>
                    <tr>
                        <td>Title</td>
                        <td><?php echo $broadcast['title']; ?></td>
                    </tr>
                    <tr>
                        <td>Lenght</td>
                        <td><?php echo gmdate("H:i:s", $broadcast['length']); ?></td>
                    </tr>
                </table>
                <div style='margin-top:20px;'>
                    <h1>Current status</h1> 
                    <table>
                        <tr>
                            <td>Download %</td>
                            <td>
                                <?php
                                    echo (($totaldownloadsize != 0) ? (round(($downloadedsize /  $totaldownloadsize) * 100, 2)) : 0) . '% <br />';
                                ?>
                            </td>
                        </tr>
                        <tr>
                            <td>Downloaded Parts </td>
                            <td>
                                <?php
                                    echo $downloaded. '/'.count($video_info);
                                ?>
                            </td>
                        </tr>                        
                        <tr>
                            <td>Converting</td>
                            <td>
                                <?php
                                    $converted = 0;
                                    foreach($ffmpegjobs as $job) {
                                        if($job['Ffmpegjob']['status'] == 'Done' && $job['Ffmpegjob']['type'] == 'Conversion') {
                                            $converted++;
                                        }
                                    }
                                    echo ($converted == 0) ? 'Queued' : $converted. '/'.count($video_info);
                                ?>
                            </td>
                        </tr>
                        <tr>
                            <td>Merging</td>
                            <td>
                                <?php
                                    foreach($ffmpegjobs as $job) {
                                        if($job['Ffmpegjob']['type'] == 'Combining') {
                                            if($job['Ffmpegjob']['status'] == 'Done') {
                                                $status = 'Done';
                                            } elseif($job['Ffmpegjob']['status'] == 'Busy') {
                                                $status = 'Working';
                                            } else {
                                                $status = 'Failed';
                                            }
                                            break;
                                        }
                                    }
                                    echo (empty($status)) ? 'Queued' : $status;                                
                                ?>
                            </td>
                        </tr>                        
                    </table>
                </div>
            </td>
        </tr>
    </table>
    <div style='width:100%; text-align:center; font-size:2em;'>
        <?php
            if($canview) { 
                echo $this->Html->link('Watch', '/final/'.$video_info[0]['broadcast_id']. DS .$video_info[0]['broadcast_id'].'.mp4');
            } else {
                echo "Preparing, please wait ...";
            }
        ?>
    </div>
</div><commit_msg>display % correctly when conversion was complete<commit_after><div style='border: 1px solid black;'>
    <table>
        <tr style='padding:10px;'>
            <td style='padding:10px;'>
                <img src='<?php echo $broadcast['preview']; ?>' /> 
            </td>
            <td>
                <table>
                    <tr>
                        <td>Title</td>
                        <td><?php echo $broadcast['title']; ?></td>
                    </tr>
                    <tr>
                        <td>Lenght</td>
                        <td><?php echo gmdate("H:i:s", $broadcast['length']); ?></td>
                    </tr>
                </table>
                <div style='margin-top:20px;'>
                    <h1>Current status</h1> 
                    <table>
                        <tr>
                            <td>Download %</td>
                            <td>
                                <?php
                                    if($canview) {
                                        echo '100%';
                                    } else {
                                        echo (($totaldownloadsize != 0) ? (round(($downloadedsize /  $totaldownloadsize) * 100, 2)) : 0) . '% <br />';
                                    }
                                ?>
                            </td>
                        </tr>
                        <tr>
                            <td>Downloaded Parts </td>
                            <td>
                                <?php
                                    echo $downloaded. '/'.count($video_info);
                                ?>
                            </td>
                        </tr>                        
                        <tr>
                            <td>Converting</td>
                            <td>
                                <?php
                                    $converted = 0;
                                    foreach($ffmpegjobs as $job) {
                                        if($job['Ffmpegjob']['status'] == 'Done' && $job['Ffmpegjob']['type'] == 'Conversion') {
                                            $converted++;
                                        }
                                    }
                                    echo ($converted == 0) ? 'Queued' : $converted. '/'.count($video_info);
                                ?>
                            </td>
                        </tr>
                        <tr>
                            <td>Merging</td>
                            <td>
                                <?php
                                    foreach($ffmpegjobs as $job) {
                                        if($job['Ffmpegjob']['type'] == 'Combining') {
                                            if($job['Ffmpegjob']['status'] == 'Done') {
                                                $status = 'Done';
                                            } elseif($job['Ffmpegjob']['status'] == 'Busy') {
                                                $status = 'Working';
                                            } else {
                                                $status = 'Failed';
                                            }
                                            break;
                                        }
                                    }
                                    echo (empty($status)) ? 'Queued' : $status;                                
                                ?>
                            </td>
                        </tr>                        
                    </table>
                </div>
            </td>
        </tr>
    </table>
    <div style='width:100%; text-align:center; font-size:2em;'>
        <?php
            if($canview) { 
                echo $this->Html->link('Watch', '/final/'.$video_info[0]['broadcast_id']. DS .$video_info[0]['broadcast_id'].'.mp4');
            } else {
                echo "Preparing, please wait ...";
            }
        ?>
    </div>
</div>
{'fraction_non_alphanumeric': 0.11953568782415411, 'fraction_numerical': 0.0062978513213139044, 'mean_word_length': 0.5295561850802644, 'pattern_counts': {'":': 0, '<': 135, '<?xml version=': 0, '>': 139, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 87, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6169720', 'n_tokens_mistral': 1787, 'n_tokens_neox': 1616, 'n_words': 282}