-
-
Save nixdagibts/0d46527c5e91eabf053a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==PREPROCESSOR== | |
// @import "%fb2k_profile_path%marc2003\common7.js" | |
// @name "Web Links" | |
// @author "marc2003. Images by komodomedia.com and mjm716" | |
// @feature "v1.4" | |
// @feature "watch-metadb" | |
// ==/PREPROCESSOR== | |
var p = new panel("Web Links", ["custom_background", "metadb"]); | |
var b = new buttons(); | |
b.update = function() { | |
if (!p.metadb) return; | |
var artist = encodeURIComponent(p.eval("%artist%")); | |
var title = encodeURIComponent(p.eval("%title%")); | |
var path = "\"" + p.eval("%path%") + "\""; | |
var directory = "\"" + p.eval("$directory_path(%path%)") + "\""; | |
var arrPaths = plman.GetPlaylistSelectedItems(plman.ActivePlaylist); | |
var strPaths = "" | |
for (i = 0; i < arrPaths.count; i++) { strPaths += "\"" + arrPaths.item(i).Path + "\" "; }; | |
var nexusimage = "FoobarScripts\\exiftool\\exiftool.cmd " + path; | |
var google = "http://www.google.de/search?q=" + artist + "+" + title; | |
var mrtzcmp3 = "http://www.mrtzcmp3.net/" + artist + "_" + title + "_1s.html"; | |
var lastfm = "http://www.lastfm.de/music/" + artist + "/_/" + title + "/similar"; | |
var spotify = "\"T:\\Zips\\01 - Programme\\Internet\\Browser\\ChromePlus [Portable]\\chrome.exe \"" + "https://play.spotify.com/search/" + artist + "%20" + title; | |
var googlecover = "Powershell -windowstyle minimized -File FoobarScripts\\exiftool\\exiftool.ps1 " + path; | |
var mp3tag = "\"..\\..\\Audio Tools\\MP3 Tag [Portable]\\Mp3tag.exe \"" + directory; | |
var waveshop = "\"..\\..\\Audio Tools\\WaveShop [Portable]\\Waveshop.exe \"" + strPaths; | |
var mp3gain = "FoobarScripts\\mp3gain\\mp3gain.cmd " + strPaths; | |
var streamripper = "FoobarScripts\\streamripper\\streamripper.exe " + path + " -s -z -d C:\\Users\\nixdagibts\\desktop"; | |
b.buttons = { | |
nexusimage: new button(0, 0, 32, 32, {normal: "nexusimage.png", hover: "nexusimage.png"}, function() { p.run(nexusimage); }, "Extract & View over"), | |
google: new button(32, 0, 32, 32, {normal: "google.png", hover: "google_h.png"}, function() { p.run(google); }, "Google Artist & Title"), | |
mrtzcmp3: new button(64, 0, 32, 32, {normal: "mrtzcmp3.png", hover: "mrtzcmp3_h.png"}, function() { p.run(mrtzcmp3); }, "Download mp3"), | |
lastfm: new button(96, 0, 32, 32, {normal: "lastfm.png", hover: "lastfm_h.png"}, function() { p.run(lastfm); }, "Lastfm"), | |
spotify: new button(128, 0, 32, 32, {normal: "spotify.png", hover: "spotify_h.png"}, function() { p.run(spotify); }, "Spotify"), | |
googlecover: new button(160, 0, 32, 32, {normal: "googlecover.png", hover: "googlecover_h.png"}, function() { p.run(googlecover); }, "Google Cover"), | |
mp3tag: new button(192, 0, 32, 32, {normal: "mp3tag.png", hover: "mp3tag_h.png"}, function() { p.run(mp3tag); }, "mp3tag"), | |
waveshop: new button(224, 0, 32, 32, {normal: "audacity.png", hover: "audacity_h.png"}, function() { p.run(waveshop); }, "WaveShop"), | |
mp3gain: new button(256, 0, 32, 32, {normal: "mp3gain.png", hover: "mp3gain_h.png"}, function() { p.run(mp3gain); }, "mp3gain"), | |
streamripper: new button(288, 0, 32, 32, {normal: "streamripper.png", hover: "streamripper_h.png"}, function() { p.run(streamripper); }, "Streamripper") | |
} | |
window.Repaint(); | |
} | |
on_item_focus_change(); | |
function on_size() { | |
p.size(); | |
} | |
function on_paint(gr) { | |
p.draw_background(gr); | |
b.draw(gr); | |
} | |
function on_metadb_changed() { | |
b.update(); | |
} | |
function on_mouse_move(x, y) { | |
b.move(x, y); | |
} | |
function on_mouse_lbtn_up(x, y) { | |
b.lbtn_up(x, y); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment