//flag by grimes
//fb2k v2+, JScript Panel 3+
//DUI/CUI ready
// ==PREPROCESSOR==
// @name "flag"
// @version "2"
// @author "grimes"
// ==/PREPROCESSOR==
var cfg_foobarpath = window.GetProperty("foobar path:", fb.Profilepath);
var cfg_flag = window.GetProperty("flag folder:", "flags");
var svg_file = cfg_foobarpath + cfg_flag + "\\noflag.svg";
var svg_content = utils.ReadUTF8(svg_file);
var dui = window.IsDefaultUI;
var original = utils.LoadSVG(svg_file);
function on_paint(gr) {
gr.FillRectangle(0, 0, window.Width, window.Height, dui == 1 ? window.GetColourDUI(1) : window.GetColourCUI(3));
if (original) {
var scale = 0;
var x = 0,
y = 0;
var scale_w = window.Width / original.Width;
var scale_h = window.Height / original.Height;
if (scale_w <= scale_h) {
scale = scale_w;
y = (window.Height - original.Height * scale) / 2;
} else {
scale = scale_h;
x = (window.Width - original.Width * scale) / 2;
}
gr.DrawImage(original, x, y, original.Width * scale, original.Height * scale, 0, 0, original.Width, original.Height);
}
}
if(fb.IsPlaying || fb.IsPaused) {
country = fb.TitleFormat("%country%").Eval();
original = utils.LoadSVG(cfg_foobarpath + cfg_flag + "\\" + country + ".svg");
window.Repaint();
}
else {
original = utils.LoadSVG(svg_file);
window.Repaint();
}
function on_playback_new_track() {
country = fb.TitleFormat("%country%").Eval();
original = utils.LoadSVG(cfg_foobarpath + cfg_flag + "\\" + country + ".svg");
window.Repaint();
}
function on_playback_stop(reason) {
original = utils.LoadSVG(svg_file);
window.Repaint();
}
ZitatReverted 1.6.15 optimization with fast DSP reinitialization on manual track change.
This behavior breaks many third party components and can't be enabled by default.
It's now available as an option because it improves performance when using heavy-to-initialize DSPs such as new VST adapter.
ZitatMaintenance release with changes backported from 2.0 series.
Less DSP reinitializing when cycling played tracks etc.
Fixed crash after loss of audio output device while playing.
RIFF64 format reading bug fixes.
Fixed playlist column layout changes not being remembered in certain scenarios.
Converter: Fixed very old bugs in AU writer.
Less strict reading of AIFF format.
Media Library: Don't report non-audio files (such as pictures or text) inside archives as indexing errors.
Fixed problems with accessing some non-UTF8-compliant FTP servers.
ZitatFixed missing CListControl accessibility support in 64-bit version.
Fixed crash after loss of audio output device while playing.
Fixed random shutdown crash when using Album List or ReFacets with filters.
Fixed wrong content shown in left pane of File Operations pattern picker.
Seite erstellt in 0.011 Sekunden mit 13 Abfragen.