Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to identify playlist? (Read 1070 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to identify playlist?

Is there a variable or other method of representing the playlist the currently playing track is playing from? I'd like to have that information visible in the title bar, along with the song title, etc. I often look at other playlists while a track is playing and then can't remember which playlist is playing at the moment.

Re: How to identify playlist?

Reply #1
There isn't a titleformat string for the playlist. But you can locate the playlist and the track you are playing by double clicking the status bar. It takes you to the currently playing track.

Re: How to identify playlist?

Reply #2
Aha! I didn't know that. That's an acceptable workaround, maybe even better than what I was looking for because it both switches to the playist and highlights the current track. Thanks! I've been looking for a solution on my own for months or years.

Re: How to identify playlist?

Reply #3
If you use ColumnsUI, you can add a little script to show you visually which playlist is playing:

Code: [Select]
$if(%is_playing%,♪,)
%title%
$ifequal(%size%,0,,[' ('%size%')'])
This code shows the playlist name and the count of files in it. As well, as if it is playing or not.

See the screenshots how to do it.

Re: How to identify playlist?

Reply #4
Ooh aah... I like the look of that. I've been using the Default User Interface, but I'll try this one out soon. Thanks for the tip!

 

Re: How to identify playlist?

Reply #5
I've been using the Default User Interface, but I'll try this one out soon.
...and just in case, you can copy that useful feature too:
you can locate the playlist and the track you are playing by double clicking the status bar. It takes you to the currently playing track.

Re: How to identify playlist?

Reply #6
Small jscript code showing currently active playlist (if that is what you are looking for). Works with foo_jscript_panel from marc.
Code: [Select]
// ==PREPROCESSOR==
// @name "Get some playlist info (15.June.2012)"
// @author "ExtremeHunter"
// ==/PREPROCESSOR==
function RGB(r, g, b) {
    return (0xff000000 | (r << 16) | (g << 8) | (b));
}

function getPlaylistInfo() {

    activePlaylist = plman.ActivePlaylist;
    getPlaylistItems = plman.GetPlaylistItems(activePlaylist);
    playlistItemCount = plman.PlaylistItemCount(activePlaylist);
    seconds = 0;
    sizeInBytes = 0;
    timeFormat = function (s) {

        var weeks = Math.floor(s / 604800),
            days = Math.floor(s % 604800 / 86400),
            hours = Math.floor((s % 86400) / 3600),
            minutes = Math.floor(((s % 86400) % 3600) / 60),
            seconds = (((s % 86400) % 3600) % 60).toFixed(0),
            weeks = weeks > 0 ? weeks + "wk " : "",
            days = days > 0 ? days + "d " : "",
            hours = hours > 0 ? hours + ":" : "",
            minutes = (minutes < 10 ? "0" + minutes : minutes) + ":",
            seconds = seconds < 10 ? "0" + seconds : seconds;

        return weeks + days + hours + minutes + seconds;

    }

    var tempFileName;
    for (var i = 0, l = playlistItemCount; i != l; i++) {

        seconds += parseFloat(fb.TitleFormat("%length_seconds_fp%").EvalWithMetadb(getPlaylistItems.Item(i)));
        fileName = fb.TitleFormat("$filename(%_path%).$ext(%_path%)").EvalWithMetadb(getPlaylistItems.Item(i));
        if (fileName != tempFileName) {
            sizeInBytes += Math.floor(fb.TitleFormat("%filesize%").EvalWithMetadb(getPlaylistItems.Item(i)));
        }
        tempFileName = fileName;
    }

    var sizeInMB = sizeInBytes / 1048576;
    var sizeInGB = sizeInBytes / 1073741824;

    if (sizeInMB < 1024) size = Math.floor(sizeInMB) + " MB";
    else size = Math.floor(100 * sizeInGB) / 100 + " GB";
   
    window.Repaint();

};
getPlaylistInfo();

function on_paint(gr) {
    gr.GdiDrawText("Playlist: " + plman.GetPlaylistName(activePlaylist) + "\n" + playlistItemCount + " Items" + (sizeInBytes ? "\nTotal time: " + timeFormat(seconds) + "\nSize: " + size : ""), gdi.font("Segoe Ui", 24, 0), RGB(0, 0, 0), 20, 20, 1000, 500, 0x00000004);
}

function on_playlist_switch() {
    getPlaylistInfo();
}

function on_playlist_items_added(playlist) {
    getPlaylistInfo();
}

function on_playlist_items_removed(playlist, new_count) {
    getPlaylistInfo();
}