Shoutbox

[Question] Now playing/Display picture. - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [Question] Now playing/Display picture. (/showthread.php?tid=62009)

[Question] Now playing/Display picture. by Eisenkanzler on 06-29-2006 at 11:21 AM

Well this is a weird suggestion i guess.

When toying around with Random DP 1.1, I ran into two things that made me think a bit.  First: it's inability to "grab" images from subdirectories (I'm one of those people who puts everything in categories) and secondly: for some reason my friend was under the impression that i was displaying the albumart of the songs i was listening to.

The second point is where the suggestion/question starts.
Is it possible to display the embedded albumart (or the folderart) of the songs you play? I'm betting it can't be done, otherwise it would be done a long time ago, but perhaps it's just something that people haven't thought about.

Just to clarify, because I tend to be misunderstood alot:
I'm wondering if it's possible for a "now playing" plugin to display the albumart of the song that I'm listening to as my display picture.

if it has been suggested before and ruled out as impossible, ignore this post then. :)


RE: [Question] Now playing/Display picture. by rob_botch on 06-29-2006 at 11:59 AM

It will be possible, yes. But the images would probably have to be saved separately to the music files, perhaps with the same name, so the script can recognise the correct picture.


RE: [Question] Now playing/Display picture. by geeksada on 06-29-2006 at 12:01 PM

I think that the only way to do a script like that, is to find the path of the song, and the to show the albumart.
I supose it is too difficult to search for the path of each song it plays. In addition there will be another problem with tags.


RE: [Question] Now playing/Display picture. by rob_botch on 06-29-2006 at 12:04 PM

As far as I know, albumn art is not stored as part of the audio file. It is usually stored in a file for the audio player. So for this to work, the script would either have to also integrate with the player that you use (hard) or look in a specific folder for images with the correct names (easier). The lattter is probably batter, as not everyone uses the same media player.


Hope that this helps,


RE: RE: [Question] Now playing/Display picture. by Eisenkanzler on 06-29-2006 at 01:26 PM

quote:
Originally posted by rob_botch
As far as I know, albumn art is not stored as part of the audio file.


well, it can be saved as part of a id3v2 tag or as a separate .jpg file in the director the files are in. the latter option only works if you have all files sorted by album (like I do), the former is probably better if you have a big folder where you dump all your music into.

edit:
I guess you have to find a way to send the id3v2 info other than song/artist/album to msn so that it chances the display picture, this could be very hard i guess.

or what already was suggested:
find a way to resolve the folder/cover/albumart.jpg (whatever format you use) and set it as a DP whenever your song changes.

either way:
sounds like a lot of work :)
RE: [Question] Now playing/Display picture. by rob_botch on 06-29-2006 at 01:30 PM

Oh yes, I forgot about id3v2 tags. But I would have thought that you would need quite a complex piece of code to read those. I still think that separate files would be the best option, because the user could choose the image him/herself, and they could use any audio files, even those without the requisite id3v2 tag.


RE: [Question] Now playing/Display picture. by Eisenkanzler on 06-29-2006 at 01:38 PM

yes, ogg, mpc and wma do not support images in their tags and I believe that APEv2 doesn't support them either. Foobar2000 favors those tags over id3v2.



RE: [Question] Now playing/Display picture. by MGrove03 on 06-29-2006 at 01:50 PM

this is currently available with the iTunes+ script, it displays the album art as your display picture depending on what song your playing but it depends on whether you have stored the album art in iTunes. It is also being developed for other media players but i do not know when it will be available


RE: RE: [Question] Now playing/Display picture. by alexp2_ad on 06-29-2006 at 05:37 PM

quote:
Originally posted by MGrove03
this is currently available with the iTunes+ script, it displays the album art as your display picture depending on what song your playing but it depends on whether you have stored the album art in iTunes. It is also being developed for other media players but i do not know when it will be available

Don't count on anytime soon... but I might. ;)

Anyway, this would be a fairly simple thing to do, all that needs to be done is ask the user for the location of the image file in location to the music, then getting the file path for the song and adapting it for the image...  and in general I think album art is usually stored in the same folder as the music as folder.jpg for winamp and wmp...?  I'm sure -dt- is up to that... :P
RE: [Question] Now playing/Display picture. by can16358p on 06-29-2006 at 05:46 PM

What I get from raw message is something like this:
\0Music\01\0{0} - {1}\0Ghost of the Sun\0Katatonia\0Viva Emptiness\0{AA5921BB-60A7-4439-B026-6E47F1A0B0FA}\0

and NO, there is no file like AlbumArt_{AA592... with the album art.

What is that number.
What are {0} and {1} around "Music".
There must have meanings?


//edit: sorry for wrong information, I thought it only showed song and the artist.

I've written some code: have a look at this.

code:
var path="D:/Documents/My Music/";
var imgname="folder.jpg";
var name="";
var artist="";
var album="";
var id="";
function OnEvent_Initialize(MessengerStart)
{
Debug.trace("Script Start");
makedp(Messenger.MyCurrentMedia);
}

function OnEvent_Uninitialize(MessengerExit)
{
Debug.trace("Script End");
}

function OnEvent_MyMediaChange(newsong){
makedp(newsong);
}
function makedp(str){
str=str.substring(str.indexOf("{1}\\0")+5);
song=str.substring(0,str.indexOf("\\0"));
str=str.substring(str.indexOf("\\0")+2);
artist=str.substring(0,str.indexOf("\\0"));
str=str.substring(str.indexOf("\\0")+2);
album=str.substring(0,str.indexOf("\\0"));
str=str.substring(str.indexOf("\\0")+2);
id=str.substring(0,str.indexOf("\\0"));
str=str.substring(str.indexOf("\\0")+2);
Debug.trace("Artist: "+artist+", Song: "+song+", Album: "+album);
Messenger.MyDisplayPicture=path+artist+"/"+album+"/"+imgname;
}


I can't test it, probably there is an error at least somewhere, I got disconnected and can't sign in.

Don't forget to change the path to your My Music folder.
RE: [Question] Now playing/Display picture. by cirix on 06-29-2006 at 06:50 PM

I havent read entire post, but currently im working on a Script that currently only works with Wianmp, but I belive its easily implemented to other media players, one of the "problems" I have encountered is that Winamp does not have a very good implementation of the Album Art, so I have been using Samurize ( www.samurize.com ) to get the Cd covers, and my script executing Samurize Server, I also have a vb6 app that does this but I belive the script will have a better Implemntation , also someone had done an iTunes DP program some time ago, I will get the link later, and the iTunes scrip also has the ability to do Album Art to display. But I dont use iTunes for everyday, just to sync the iPod.


RE: [Question] Now playing/Display picture. by cirix on 06-29-2006 at 06:54 PM

Here is the scrip, Im onli having a problem with the second time I dont know whats wrong, the problem is that I need a pause between executing samurizeserver and setting the DP notice the quoted parts:

quote:
var objShell = new ActiveXObject("Shell.Application");
var one;
var changemedia;
var two;
function OnEvent_MyMediaChange(changemedia){

playerHwnd = Interop.Call('User32','FindWindowW','Winamp v1.x',0);

var lBuffer = Interop.Call('user32', 'GetWindowTextLengthW', playerHwnd)+1;

var sBuffer = Interop.Allocate(2*(lBuffer+2));

var Title = Interop.Call('user32', 'GetWindowTextW', playerHwnd, sBuffer, lBuffer);

one = sBuffer.ReadString(0);

Debug.Trace('sBuffer: '+ one );

//Debug.Trace('sBuffer: '+sBuffer.ReadString(0));

objShell.ShellExecute('C:\\Program Files\\Samurize\\SamurizeServer.exe', "i=mcover c=msnc.ini close", "", "", 1);

MsgPlus.AddTimer ("check",3000);

}

function OnEvent_Timer(TimerId)
{
    if (TimerId == "check")
    {
   
    Debug.Trace( one);

    var lBuffer = Interop.Call('user32', 'GetWindowTextLengthW', playerHwnd)+1;

    var sBuffer = Interop.Allocate(2*(lBuffer+2));

    var Title = Interop.Call('user32', 'GetWindowTextW', playerHwnd, sBuffer, lBuffer);

    two = sBuffer.ReadString(0);
   
    Debug.Trace('sBuffer: '+ two + one);
   
   
    if (two == one)
    {
   
    objShell.ShellExecute('C:\\Program Files\\Samurize\\SamurizeServer.exe', "i=mcover c=msnc.ini", "", "", 1);
    //MsgPlus.AddTimer ("samur",2000);
}


//function OnEvent_Timer(TimerId)
//{
  //if (TimerId == "samur")
  //{   
  //Debug.Trace('CHANGE ');
    //Messenger.MyDisplayPicture = "C:\\Program Files\\Samurize\\samurizeoutput.png";
    //objShell.ShellExecute('C:\\Program Files\\Samurize\\SamurizeServer.exe close', "i=mcover c=msnc.ini -close", "", "", 1);

//} 
//}
}   
}


function OnEvent_Uninitialize(MessengerExit)
{
objShell.ShellExecute('C:\\Program Files\\Samurize\\SamurizeServer.exe', "i=mcover c=msnc.ini trayiconvisible=0 close", "", "", 1);
             
}



RE: [Question] Now playing/Display picture. by Ža7oŽ on 06-29-2006 at 07:39 PM

As i'm Devoleping Sharp Media (a Media Player)
i allway's like to intagrate things into Messenger's.
while reading this sparked an idea.
i can do this from my player, without askign the user for an image.
if anyone is intrested you can pick up a light version of Sharpmedia at
www.5070live.com

if you do use it, check for update's often it just might be released very soon.


RE: [Question] Now playing/Display picture. by Voldemort on 06-29-2006 at 08:11 PM

Guys, this thing of  Now Playind album art to DP is already done.... only works for WMP.... Its a script by Veggie, Sadly, I cant link you to it, its on a private subforum...


RE: [Question] Now playing/Display picture. by noroom on 06-29-2006 at 08:13 PM

This was implemented weeks ago by CAD RC4.
www.closetosoftware.com

Check the forums for the latest build.


RE: [Question] Now playing/Display picture. by can16358p on 06-29-2006 at 08:17 PM

I could now sign in and saw my untested script working :)

It's very simple, take it, develop it, publish under your name if you want. I did it to use myself.


RE: [Question] Now playing/Display picture. by cirix on 06-29-2006 at 08:50 PM

I havent tried CD Art Display In a long time, well it does basicly the same thing as my current samurize scrip, but I remember when I tried it I whould only get pictures for entire folders so if you have various singel mp3s in the same folder it whould not work, while Samurize had a folder tu dump all the single mp3 covers, I dont know if CD Art Display RC4 has this feature. I will try it.


RE: [Question] Now playing/Display picture. by can16358p on 06-29-2006 at 10:47 PM

I had a half built code, I've edited it a bit more and this is more reliable. Just a simple solution, but at least a solution, and works absolutely great with me!

code:
//Music DP by can16358p
//Make your Display Picture the cover of the album of the song you are listening to!
//Edit the path to your My Music folder
//For any reason, if another filename is used for album arts instead of folder.jpg, change it there
//Tested with Windows Media Player 11, but should work with any configuration that has the songs and the album art file in My Music/Artist/Album/
//Do anything you want with this code. Play with it, change things in it.
var initial="";
var path="D:/Documents/My Music/";
var imgfile="";
var imgname="folder.jpg";
var name="";
var artist="";
var album="";
var id="";
var existcheck=new ActiveXObject("Scripting.FileSystemObject");
var sinfo="<ScriptMenu>"
sinfo+="<MenuEntry Id=\"mddp\">Make current DP default</MenuEntry> ";
sinfo+="</ScriptMenu>";

function OnEvent_Initialize(MessengerStart){
    initial=Messenger.MyDisplayPicture;
    Debug.trace("Script Started!");
    Debug.trace("Default DP: "+initial);
}

function OnEvent_MenuClicked(id,loc,orig){
    if(id=="mddp"){
        initial=Messenger.MyDisplayPicture;
        Debug.trace("Default DP Updated.");
        Debug.trace("Default DP: "+initial);    }
}

function OnGetScriptMenu(loc){
    return sinfo;
}

function OnEvent_Signin(mailaddrr){
    var initial=Messenger.MyDisplayPicture;
    Debug.trace("Initial Image is: "+initial);
    if(Messenger.MyStatus>=3){
        makedp(Messenger.MyCurrentMedia);
    }
}

function OnEvent_Uninitialize(MessengerExit)
{
    Messenger.MyDisplayPicture=initial;
}

function OnEvent_MyMediaChange(newsong){
    makedp(newsong);
}
function makedp(str){
    str=str.substring(str.indexOf("{1}\\0")+5);
    song=str.substring(0,str.indexOf("\\0"));
    str=str.substring(str.indexOf("\\0")+2);
    artist=str.substring(0,str.indexOf("\\0"));
    str=str.substring(str.indexOf("\\0")+2);
    album=str.substring(0,str.indexOf("\\0"));
    str=str.substring(str.indexOf("\\0")+2);
    id=str.substring(0,str.indexOf("\\0"));
    str=str.substring(str.indexOf("\\0")+2);
    imgfile=path+artist+"/"+album+"/"+imgname;
    if(existcheck.FileExists(imgfile) && song!=""){
        Debug.trace("Artist: "+artist+", Song: "+song+", Album: "+album);
        Messenger.MyDisplayPicture=path+artist+"/"+album+"/"+imgname;
    }else{
        Debug.trace("File not found! Changing DP to "+initial);
        Messenger.MyDisplayPicture=initial;
    }
}


RE: [Question] Now playing/Display picture. by -dt- on 06-29-2006 at 11:07 PM

quote:
Originally posted by alexp2_ad
and in general I think album art is usually stored in the same folder as the music as folder.jpg for winamp and wmp...?  I'm sure -dt- is up to that..
not a clue , Ill look into it if not ill download and cache it from amazon
RE: [Question] Now playing/Display picture. by noroom on 06-30-2006 at 06:57 AM

quote:
Originally posted by cirix
I dont know if CD Art Display RC4 has this feature. I will try it.
It does. It can also load covers from the ID3v2 tags.
RE: [Question] Now playing/Display picture. by giken on 06-30-2006 at 08:13 AM

we have plugin for it in beta testing private forum from Veggie.

It works using Windows Media Player album arts and doesn't need to know folder paths or similar.

It's in beta now, stay tuned for release ;)


RE: RE: [Question] Now playing/Display picture. by alexp2_ad on 06-30-2006 at 09:00 AM

quote:
Originally posted by Voldemort
Guys, this thing of  Now Playind album art to DP is already done.... only works for WMP.... Its a script by Veggie, Sadly, I cant link you to it, its on a private subforum...

And it's already been done for iTunes, but he wants it for winamp, clearly.

quote:
Originally posted by -dt-
quote:
Originally posted by alexp2_ad
and in general I think album art is usually stored in the same folder as the music as folder.jpg for winamp and wmp...?  I'm sure -dt- is up to that..
not a clue , Ill look into it if not ill download and cache it from amazon

Simple, you can get the path to the file, then you just cut off the file name and either add folder.jpeg, or add a user specified string like covers/front.jpeg.  Although most people don't keep a cover collection for winamp, so amazon might be a better bet... but you could always offer both.  User choice is always the way to go!

quote:
Originally posted by giken
we have plugin for it in beta testing private forum from Veggie.

It works using Windows Media Player album arts and doesn't need to know folder paths or similar.

It's in beta now, stay tuned for release ;)

Yeah, well it won't need to know folder paths but it will need your music to be on Amazon, and hope for the right result.
RE: [Question] Now playing/Display picture. by Eisenkanzler on 06-30-2006 at 09:52 AM

User choice a very good thing to add, I tag all my albums with tag&rename and it adds the albumart as folder.jpg to the folders.
WMP gives it all sorts of weird random numeral names and scales the art up/down to 200x200 files. On top of that: it picks the wrong art on numerous occasions, especially with lesser known albums.

oh and for the record:
I don't use Winamp, I use Foobar2000.
that's not a big issue, since Foobar has a plugin that emulates the Winamp API.
(you can find it at www.r1ch.net)

edit edit edit:
well color me suprised, cd art display does exactly what i wanted and it accepts id3v2 input, folder.jpg/cover.jpg and any other input.
just had to tell AMIP to stop sending the song information to msn and every worked peachy. :)


RE: [Question] Now playing/Display picture. by noroom on 06-30-2006 at 11:25 AM

Told ya ;)

CAD is my favorite desktop gadget :D


RE: [Question] Now playing/Display picture. by Veggie on 06-30-2006 at 12:06 PM

ive just released a script for winamp and wmp and possibly itunes (untested)

http://shoutbox.menthix.net/showthread.php?tid=62115


RE: RE: [Question] Now playing/Display picture. by Eisenkanzler on 06-30-2006 at 01:48 PM

quote:
Originally posted by noroom
Told ya ;)

CAD is my favorite desktop gadget :D


small problem: .m4a and .ogg files are read a bit weird, it doesn't pick up the album information, but the rest works.

RE: [Question] Now playing/Display picture. by cirix on 06-30-2006 at 05:34 PM

Is it just me or does CAD use too much resources, I tried it and its using around 20mb of RAM, a second problem I found is that it changes the DP right after you select the track so if you change track fast looking for a song it will load a bunch of useless DP and even the searching and blank covers.
I will use Samurize and continue developing my script.


RE: [Question] Now playing/Display picture. by noroom on 07-01-2006 at 01:18 AM

quote:
Originally posted by cirix
Is it just me or does CAD use too much resources, I tried it and its using around 20mb of RAM, a second problem I found is that it changes the DP right after you select the track so if you change track fast looking for a song it will load a bunch of useless DP and even the searching and blank covers.
I will use Samurize and continue developing my script.
Then you need to try the latest build. :)

RE: [Question] Now playing/Display picture. by robochief on 07-01-2006 at 04:07 AM

Can this script take the cover image (always named "cover.jpg") from the same directory where the mp3 file is allocated?

Or, how can I retrieve in the makedp function the year?

Because my folder structure is:

code:
artist\year - album\track - title.mp3