<commit_before>$(function() {
    resetTooltip();
    var genre = getParameterByName('genre');
    var song = getParameterByName('song');
    selectAndSetContents(genre);
    loadSongInfo(genre, song);
    resetTooltip();

    tintPlaying = false;
});

function getBool(val){ 
    var num = +val;
    return !isNaN(num) ? !!num : !!String(val).toLowerCase().replace(!!0,'');
}

function loadSongInfo(genre, name) {
    $.get('../api/v1/song.php', $.param({
        file: name + '.mp3'
    }), function(data) {
        var html = '<div class="song-box info-box">';
        html += '<div class="song-image"><img src="../api/v1/art.php?file=' + data['href'] + '"></div><div class="song-info">';
        html += '<div class="song-title">' + data['title'] + '</div><br>';
        html += '<div class="song-artist">' + data['artist'];
        if(data['artist'] != data['album_artist'])
            html += ' (' + data['album_artist'] + ')';
        html += '</div><br><div class="song-artist">' + data['album'] + '</div><br>';
        html += '<div class="song-length">' + data['length'] + 'm - '  + data['genre'] + '</div><br>';

        html += '<div class="song-buttons"><div class="song-button song-play-button glyphicon glyphicon-play-circle"></div><a href="../media/' + data['href'] + '" download><div class="song-button song-download-button glyphicon glyphicon-download"></div></a></div></div>';
        html += '<hr><div class="song-little-info"><b>Bitrate: ' + ((data['bitrate'] / 1000) | 0) + 'kbps (' + data['bitrate_mode'] + ') | Size: ' + (data['size'] / 1048576).toFixed(2) + 'MB</b>';
        html += '<br>© Credit for audio featured on this site goes to the original artists.</div></div>';

        $('#song-info').html(html);
        document.title = data['artist'] + ' - ' + data['title'] + ' | Song Info | JPV Music Library';
        
        var autoplay = getParameterByName('autoplay');
        if (getBool(autoplay)) 
            var playBtn = $(document.getElementsByClassName('song-play-button')[0]);
            showPlayerFrom(playBtn);
    });<commit_msg>Well that was a stupid mistake that took far too long to debug...<commit_after>$(function() {
    resetTooltip();
    var genre = getParameterByName('genre');
    var song = getParameterByName('song');
    selectAndSetContents(genre);
    loadSongInfo(genre, song);
    resetTooltip();

    tintPlaying = false;
});

function getBool(val){ 
    var num = +val;
    return !isNaN(num) ? !!num : !!String(val).toLowerCase().replace(!!0,'');
}

function loadSongInfo(genre, name) {
    $.get('../api/v1/song.php', $.param({
        file: name + '.mp3'
    }), function(data) {
        var html = '<div class="song-box info-box">';
        html += '<div class="song-image"><img src="../api/v1/art.php?file=' + data['href'] + '"></div><div class="song-info">';
        html += '<div class="song-title">' + data['title'] + '</div><br>';
        html += '<div class="song-artist">' + data['artist'];
        if(data['artist'] != data['album_artist'])
            html += ' (' + data['album_artist'] + ')';
        html += '</div><br><div class="song-artist">' + data['album'] + '</div><br>';
        html += '<div class="song-length">' + data['length'] + 'm - '  + data['genre'] + '</div><br>';

        html += '<div class="song-buttons"><div class="song-button song-play-button glyphicon glyphicon-play-circle"></div><a href="../media/' + data['href'] + '" download><div class="song-button song-download-button glyphicon glyphicon-download"></div></a></div></div>';
        html += '<hr><div class="song-little-info"><b>Bitrate: ' + ((data['bitrate'] / 1000) | 0) + 'kbps (' + data['bitrate_mode'] + ') | Size: ' + (data['size'] / 1048576).toFixed(2) + 'MB</b>';
        html += '<br>© Credit for audio featured on this site goes to the original artists.</div></div>';

        $('#song-info').html(html);
        document.title = data['artist'] + ' - ' + data['title'] + ' | Song Info | JPV Music Library';
        
        var autoplay = getParameterByName('autoplay');
        if (getBool(autoplay)) {
            var playBtn = $(document.getElementsByClassName('song-play-button')[0]);
            showPlayerFrom(playBtn);
        }
    });
{'fraction_non_alphanumeric': 0.22846975088967972, 'fraction_numerical': 0.008540925266903915, 'mean_word_length': 3.2371859296482413, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 69, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3470592', 'n_tokens_mistral': 1401, 'n_tokens_neox': 1339, 'n_words': 266}