Skip to main content

Topic: [Not my release] Biography view (Read 321859 times) previous topic - next topic

always.beta and 2 Guests are viewing this topic.
  • marc2003
  • [*][*][*][*][*]
[Not my release] Biography view
Reply #675
i did a quick test but it was horrible. you get very similar images, some of which are tiny. also, because it uses multiple websites, there are all sorts of different ways you'd have to generate filenames to save to. i really can't be bothered with it.

  • mire777
  • [*][*][*][*][*]
[Not my release] Biography view
Reply #676
i did a quick test but it was horrible. you get very similar images, some of which are tiny. also, because it uses multiple websites, there are all sorts of different ways you'd have to generate filenames to save to. i really can't be bothered with it.


Ok, maybe not worth...

On the other hand, last.fm script from albumart downloader uses html to retrieve ''id'' number, for each individual image..

lastfm-artist.boo script:

Code: [Select]
encodedArtist = EncodeUrl(artist)
        imagesHtml = GetPage("http://www.last.fm/music/${encodedArtist}/+images")

        imageIdMatches = Regex("<a\\s+href=\"/music/[^/]+/\\+images/(?<id>\\d+)\"\\s+class=\"pic\"").Matches(imagesHtml)
        
        results.EstimatedCount = imageIdMatches.Count
        
        for imageIdMatch as Match in imageIdMatches:
            id = imageIdMatch.Groups["id"].Value
            results.Add("http://userserve-ak.last.fm/serve/126b/${id}.jpg", artist, "http://www.last.fm/music/${encodedArtist}/+images/${id}", -1, -1, "http://userserve-ak.last.fm/serve/_/${id}.jpg");



On http://www.last.fm/music/madonna/+images in html, you have that number on end every image.
Then if you detect images ''id'', you call http://userserve-ak.last.fm/serve/_/${id}.jpg , to download image...
Example: http://userserve-ak.last.fm/serve/_/93603867.jpg
I suppose you can do same in WSH.
In vbs is posibble to do that. But i don't now how?
  • Last Edit: 19 October, 2013, 01:09:30 PM by mire777

  • marc2003
  • [*][*][*][*][*]
[Not my release] Biography view
Reply #677
perhaps you're a mind reader because i've already made a script based on that. 

i'll post in the WSH script thread when it's complete.

  • mire777
  • [*][*][*][*][*]
[Not my release] Biography view
Reply #678
perhaps you're a mind reader because i've already made a script based on that. 

i'll post in the WSH script thread when it's complete.


oh, great then, we are saved!

  • wcs13
  • [*][*][*]
[Not my release] Biography view
Reply #679
Hi everybody,

Sorry if this has been said before. I was trying to install the biography script from Marc2003 via WSH Panel Mod.
So I installed the latest version of WSH Panel Mod (1.5.6).
Then I read the instructions from Marc2003's scripts.
Then I extracted the folders to what I believed was the right location.
Then I got an initialization error, so I checked the console. and I got this :

Parsing file "C:\Program Files\foobar2000 (test 2)\scripts\marc2003\v2\common.js": Failed to load
Parsing file "C:\Program Files\foobar2000 (test 2)\scripts\marc2003\v2\tooltip_buttons.js": Failed to load

What disturbs me is that WSH Panel Mod seems to be looking for a common.js file, when Marc2003's files provide a common7.js file.
It also seems to be looking for a v2 directory that I don't have.
FYI currently I have a C:\Program Files\foobar2000 (test 2)\scripts" directory, where I extracted the marc2003 folder and the samples folder.

Thanks in advance.

  • marc2003
  • [*][*][*][*][*]
[Not my release] Biography view
Reply #680
the script inside your panel is ancient. you need to import whichever script you'd like to use from the samples folder into the panel. also, the marc2003 folder needs to be extracted into your foobar profile. if running portable mode then it needs to be a subfolder of the main foobar folder. examples...

C:\Users\marc\AppData\Roaming\foobar2000\marc2003
D:\Portable Apps\foobar2000\marc2003

all this is explained in the readme. 

make sure you're using the latest from here: https://dl.dropboxusercontent.com/u/22801321/wsh/samples.zip

  • wcs13
  • [*][*][*]
[Not my release] Biography view
Reply #681
Thanks marc. It works now.

One error report though : I tried to remap the artist field to my custom titleformating script, and I got this error : "Your entry was too long and will be truncated".
However, my custom script works well with the original Biography component.
So, would it be possible to increase the allowed entry size ?

Thanks.

  • marc2003
  • [*][*][*][*][*]
[Not my release] Biography view
Reply #682
hold shift and then right click the panel>properties. you should be able to paste your code into the artist_tf bit.
  • Last Edit: 20 October, 2013, 11:19:15 AM by marc2003

  • wcs13
  • [*][*][*]
[Not my release] Biography view
Reply #683
Worked again !  Many thanks Marc.

Last question I guess : does one of your scripts provide online artist images fetching, just like the Biography component does ?

  • marc2003
  • [*][*][*][*][*]
[Not my release] Biography view
Reply #684
thumbs & now playing.

  • wcs13
  • [*][*][*]
[Not my release] Biography view
Reply #685
Awesome.  It all runs smoothly now ! Sorry to have yet more questions ^^ :

1. Can I change the default containing folder where images & co. are stored ? (right now it's %foobar folder%/wsh_lastfm)

2. Can I re-use my existing (and already 20 GB !!!) bio images folder (created by the Biography component), which is as follows ?
    X:/PRIVATE/BIOS/%artist%/Biography/ [all the artist images, with up to 12 images per artist (*) apparently]
    (*) the 12 images seem to be labeled artist.jpg / artist_01.jpg / ... / artist_05.jpg (6 images) + artist.png / artist_01.png / ... / artist_05.png (6 more images which are NOT necessarily the same)
    X:/PRIVATE/BIOS/%artist%/Discography/ [all the album images, named (%date%) %title%][/li][/list](and of course to make things even more complicated, by %artist%, %date% and %title% I don't mean the standard fields but my own titleformating scripts for each of these fields...  )

    I can start again from scratch, but I think it's a pity to simply erase a 20 GB cache folder with lots of useful images & stuff...

    • Last Edit: 20 October, 2013, 11:56:53 AM by wcs13

    • marc2003
    • [*][*][*][*][*]
    [Not my release] Biography view
    Reply #686
    right click>image source>custom folder. then right click>Set custom folder. you can use standard foobar title formatting.

    note that you can only specify folders. it does not understand filenames. it simply displays all images in a given folder.

    • wcs13
    • [*][*][*]
    [Not my release] Biography view
    Reply #687
    I have tried.  It... sort of works... or not... 

    What is weird is that both scripts seem to work... sometimes :
    - The lastfm&wiki script sometimes displays artist info, but sometimes it displays nothing (when the standard Biography component ALwAYS manages to display something)
    - The thumbnails script sometimes displays images (the images within my custom folder => good !), but sometimes it displays nothing, even if the folder with the images exists (when the standard Biography component ALWAYS manages to display images)

    I'm puzzled at this :
    - For example I have tried two different artists (among others) : for one of them both scripts work, and for the other images won't display, even though the directory exists and is formatted exactly in the same way. To be more specific, X:\PRIVATE\BIOS\Justin Timberlake\Biography will work, but X:\PRIVATE\BIOS\Epica\Biography won't work.
    - Another example (not related to your scripts) is that the Biography component finds an image, but it won't save it apparently (I can't find the corresponding directory, e.g. X:\PRIVATE\BIOS\Ciara). And since there is no "Open source directory" option like in your script, I can't know if it has saved it somewhere or not.

    Another problem is that I haven't found a way to specify a custom folder for the lastfm&wiki script, so it keeps using the wsh_lastfm directory, which is an unwanted behaviour for me.

    Oh, and one last thing : why does all the info in your WSH panels disappear as soon as we hit the "stop" button, when all the info remains on the standard Biography component ?
    • Last Edit: 20 October, 2013, 01:03:15 PM by wcs13

    • marc2003
    • [*][*][*][*][*]
    [Not my release] Biography view
    Reply #688
    - The lastfm&wiki script sometimes displays artist info, but sometimes it displays nothing (when the standard Biography component ALwAYS manages to display something)


    this script uses another website called the,echonest.com to get bios. it could be they just don't have data for that artist. can you give an example of one and the last.fm page just so i can double check.

    Quote
    The thumbnails script sometimes displays images (the images within my custom folder => good !), but sometimes it displays nothing, even if the folder with the images exists (when the standard Biography component ALWAYS manages to display images)


    perhaps your artist tags contain characters that are illegal for windows folder names and the folder isn't really an exact match to the tag? perhaps bio panel did some kind of internal replacement? my script doesn't do anything like that. you can of course use the $replace title formatting function.

    Quote
    Another problem is that I haven't found a way to specify a custom folder for the lastfm&wiki script, so it keeps using the wsh_lastfm directory, which is an unwanted behaviour for me.


    don't use it then.  the files can't be used by anything else so there isn't much point in saving them elsewhere.

    Quote
    Oh, and one last thing : why does all the info in your WSH panels disappear as soon as we hit the "stop" button, when all the info remains on the standard Biography component ?


    right click>selection mode and change it to one of the other options.

    • wcs13
    • [*][*][*]
    [Not my release] Biography view
    Reply #689
    1. Lastfm&wiki script : I can't help right now, because for mysterious reasons it now seems to work !    But the times it didn't work this afternoon it was for very known bands (e.g. it wouldn't display the bio for Epica - and now it does !). And I promise I haven't changed anything (maybe just restarted foobar, and I'm not even sure, lol).

    2. Thumbnails script : I had checked the names, and I did on purpose pick very simple names : Justin Timberlake, Epica, Ciara (of course I checked the names via "Properties" juste to make sure there wasn't any unwanted character, space, etc... it's all normal). Right now the Epica images won't display, even though the directory with images exists : X:\PRIVATE\BIOS\Epica\Biography . But with Justin Timberlake it works perfectly ( X:\PRIVATE\BIOS\Justin Timberlake\Biography ). I just don't get it !!!

    3. Custom folder : sure, I understand.  I could live with it. It's just that :
    - It's not "clean" IMHO,
    - I don't like the idea of my foobar2000 folder's size constantly growing. That's why I would like to keep all bio related stuff in another folder.

    4. Selection mode : I had tried the other options already, and it didn't appear to work... and now, mysteriously too, every option seems to work, including the default one that didn't work before !

    Bottom line : right now I need to understand why point 2 doesn't work. And maybe one day you can find a solution for point 3.
    Othe than that I'm quite happy.  But until point 2 works I won't be able to replace my standard Biography component...

    Thumbnails script suggestion : an option to permanently delete one of the images, by right-clicking on the corresponding thumbnail (or image) and selecting the appropriate option ?
    • Last Edit: 20 October, 2013, 01:53:10 PM by wcs13

    • wcs13
    • [*][*][*]

    • marc2003
    • [*][*][*][*][*]
    [Not my release] Biography view
    Reply #691
    1) it might be worth checking the console. it does report problems if there are network/server errors.

    2) add this function to your panel

    Code: [Select]
    function on_mouse_mbtn_up() {
        p.MsgBox("Folder exists: " + p.fso.FolderExists(im.folders[0]) + "\nFiles found: " + im.files.length, 0, p.name);
    }


    now middle click the panel and see what it says. also what file extension is it? my script checks for jpg/jpeg/png/gif.

    3) open the panel, after the first line of code that begins var p = new panel.... add this new line of code

    Code: [Select]
    p.data_folder = "e:\\path\\to\\folder\\"


    you can already delete files by right clicking the main image. it doesn't work on the thumbnail strip.
    • Last Edit: 20 October, 2013, 02:15:21 PM by marc2003

    • wcs13
    • [*][*][*]
    [Not my release] Biography view
    Reply #692
    1. Here is an excerpt from my console log (only the errors) :

    Code: [Select]
    WSH Panel Mod (Last.fm & Wikipedia Biography by marc2003): Parsing file "C:\Program Files\foobar2000 (test 2)\marc2003\common7.js"
    WSH Panel Mod (Last.fm & Wikipedia Biography by marc2003): initialized in 27 ms
    WSH Panel Mod (Last.fm & Wikipedia Biography by marc2003): Parsing file "C:\Program Files\foobar2000 (test 2)\marc2003\common7.js"
    WSH Panel Mod (Last.fm & Wikipedia Biography by marc2003): initialized in 26 ms

    the specified file is not available : X:\PRIVATE\BIOS\Justin Timberlake\Biography\Justin Timberlake.png
    the specified file is not available : X:\PRIVATE\BIOS\Justin Timberlake\Discography\(2013) The 20/20 Experience 2 of 2.png

    the specified file is not available : X:\PRIVATE\BIOS\Justin Timberlake\Biography\Justin Timberlake.png
    the specified file is not available : X:\PRIVATE\BIOS\Justin Timberlake\Discography\(2013) The 20/20 Experience 2 of 2.png

    the specified file is not available : X:\PRIVATE\BIOS\Ciara\Biography\Ciara Biography.txt.lfml
    the specified file is not available : X:\PRIVATE\BIOS\Ciara\Biography\Ciara.png

    the specified file is not available : X:\PRIVATE\BIOS\Jay Sean\Biography\Jay Sean.png

    the specified file is not available : X:\PRIVATE\BIOS\John Legend\Biography\John Legend.png

    the specified file is not available : X:\PRIVATE\BIOS\Xavier Naidoo\Biography\Xavier Naidoo Biography.txt.lfml
    the specified file is not available : X:\PRIVATE\BIOS\Xavier Naidoo\Biography\Xavier Naidoo.jpg
    the specified file is not available : X:\PRIVATE\BIOS\Xavier Naidoo\Discography\(2013) Bei Meiner Seele.jpg

    the specified file is not available : X:\PRIVATE\BIOS\Yuri Lane\Biography\Yuri Lane Biography.txt.lfml
    the specified file is not available : X:\PRIVATE\BIOS\Yuri Lane\Biography\Yuri Lane.jpg

    the specified file is not available : X:\PRIVATE\BIOS\Xavier Naidoo\Biography\Xavier Naidoo Biography.txt.lfml
    the specified file is not available : X:\PRIVATE\BIOS\Xavier Naidoo\Biography\Xavier Naidoo.jpg
    the specified file is not available : X:\PRIVATE\BIOS\Xavier Naidoo\Discography\(2013) Bei Meiner Seele.jpg

    the specified file is not available : X:\PRIVATE\BIOS\Ciara\Biography\Ciara Biography.txt.lfml
    the specified file is not available : X:\PRIVATE\BIOS\Ciara\Biography\Ciara.png

    the specified file is not available : X:\PRIVATE\BIOS\The Civil Wars\Biography\The Civil Wars Biography.txt.lfml
    the specified file is not available : X:\PRIVATE\BIOS\The Civil Wars\Biography\The Civil Wars.png

    the specified file is not available : X:\PRIVATE\BIOS\Justin Timberlake\Biography\Justin Timberlake.png
    the specified file is not available : X:\PRIVATE\BIOS\Justin Timberlake\Discography\(2013) The 20/20 Experience 2 of 2.png

    the specified file is not available : X:\PRIVATE\BIOS\Ciara\Biography\Ciara Biography.txt.lfml
    the specified file is not available : X:\PRIVATE\BIOS\Ciara\Biography\Ciara.png

    the specified file is not available : X:\PRIVATE\BIOS\Justin Timberlake\Biography\Justin Timberlake.png

    the specified file is not available : X:\PRIVATE\BIOS\Justin Timberlake\Discography\(2013) The 20/20 Experience 2 of 2.png

    the specified file is not available : X:\PRIVATE\BIOS\Justin Timberlake\Biography\Justin Timberlake.png
    the specified file is not available : X:\PRIVATE\BIOS\Justin Timberlake\Discography\(2013) The 20/20 Experience 2 of 2.png
    However :
    - I don't know if these errors are generated by your script, or by the standard Biography component
    - I don't see any error related to Epica, and that's weird because your script currently doesn't seem to find my Epica images 

    2. Here's what the debug pop-up says when it comes to Epica :
    Folder exists : True
    Files found : 0
    The problem is that the files DO exist, and they look like standard jpg and png files : http://img15.hostingpics.net/pics/780289epica3.jpg

    3. Thanks ! I'll look into it as soon as I have solved point 2.

    4. About the thumbnail strip, could you improve it so that when there are too many thumbnails it uses 2 strips instead of one ? Look at my Justin Timberlake image in my previous posts : there are 12 thumbnails so I need them to be really small in order to fit... Another solution would be to add some horizontal scrolling ability, but I don't know if that's feasible. Up to you.
    • Last Edit: 20 October, 2013, 06:14:13 PM by wcs13

    • marc2003
    • [*][*][*][*][*]
    [Not my release] Biography view
    Reply #693
    that's not my script reporting those errors.

    i've got nothing else to suggest really. i was thinking if it was at least counting the images but not loading them it might be a problem with the images themselves. but the fact it's not even finding them based on file extensions is just plain odd. you're the first one to ever report anything like this.

    thumbnails already scroll - it just depends where your mouse is. if you scroll over the main image, it cycles through them all. if your mouse is over the strip then it scrolls side to side - or up/down if you change the orientation. you can try grid mode as well if you have lots of images per artist.

    edit: forgot to clarify, when i say scroll, i mean use your mouse wheel. it is in the readme.
    • Last Edit: 20 October, 2013, 06:34:20 PM by marc2003

    • wcs13
    • [*][*][*]
    [Not my release] Biography view
    Reply #694
    FWIW, here's a different example :
    http://img15.hostingpics.net/pics/357430miley1.jpg
    http://img15.hostingpics.net/pics/160206miley2.jpg

    The 1st problem is that the standard Biography component, although finding a bio and an image, doesn't create any folders for this (no X:\PRIVATE\BIOS\Miley Cyrus folder). I don't understand why.
    EDIT - I get it !  It doesn't create any folders because the album was a compilation (%album artist% = compilation). I can work through this and solve it.

    The 2nd problem is that your script, seeing that there is no folder, doesn't choose to create one and go online find some images... WHY ?
    Same 2nd problem could be applied to Epica : even if your script can't find the existing images, why doesn't it go and fetch them online ?
    I suppose that when we specify a custom folder, the logical order of actions is "1 = check if images are present in the custom folder / 2 = if not, go fetch them online". Right ?

    I think these examples are good ones, since for widely known artists like Miley Cirus or Epica, it's obvious that images can be found easily. So I guess your script should be able to find them. Am I wrong ?
    • Last Edit: 20 October, 2013, 06:38:53 PM by wcs13

    • marc2003
    • [*][*][*][*][*]
    [Not my release] Biography view
    Reply #695
    there are 2 distinct modes. last.fm mode downloads images. custom folder mode does not. the fact all download options aren't there in custom folder mode should be a clue. again, it's in the readme. i give up.

    • wcs13
    • [*][*][*]
    [Not my release] Biography view
    Reply #696
    Well, sorry for bothering you then. It was never my intention.

    I have read the readme file :
    Quote
    There are 2 possible sources for the images. First of all, it can download artist art from Last.fm. The
    script can do this automatically or you can turn this off and download manually just for artists you
    like. If you already have folders full of images , you can direct the script to display those instead. You
    can configure folder paths using full foobar2000 title formatting syntax. You can even use multiple
    folders when using | as a separator.

    Still, I don't understand why you couldn't provide an option to download online info IF that info isn't contained in the custom folder. The Biography component does that.
    So that means that I would have to keep BOTH components installed and up-to-date :
    - Biography component, for fetching online info and writing it to the custom folder every time,
    - WSH Panel Mod + your scripts, only for displaying it in a fancy way.

    • Last Edit: 20 October, 2013, 06:50:21 PM by wcs13

    • marc2003
    • [*][*][*][*][*]
    [Not my release] Biography view
    Reply #697
    this biography component can't get images any more. the feed it uses has been turned off by last.fm.

    edit: my mistake - it can download one image. it grabs it from the same feed that provides the bio text.
    • Last Edit: 20 October, 2013, 07:07:52 PM by marc2003

    • wcs13
    • [*][*][*]
    [Not my release] Biography view
    Reply #698
    That's right, I recall having read about it in this thread.
    So I wonder... where does this image come from then ? http://img15.hostingpics.net/pics/357430miley1.jpg
    - The "Miley Cyrus" folder doesn't exist,  and the "Compilation" folder is empty
    - A Windows file search on the whole BIOS folder and all its subfolders doesn't show any file containing the "Miley" string
    - Biography Server preferences specify last.fm only
    - Tag info : %artist% = Miley Cyrus / %album artist% = Compilation / no other relevant tags are filled
    - Last but not least, the image turns out to be exactly the same as the one from last.fm webpage. That's weird, if we really can't fetch such images anymore...
    It's funny, because the Console gives this error "the specified file is not available : X:\PRIVATE\BIOS\Miley Cyrus\Biography\Miley Cyrus.png"... yet the component still displays the image !!! 

    And I'm sorry if you have given up on the Epica "bug" (I assume it may eventually be a bug, since the folder exists, the images are within it, but your script can't display them while the Bio component can).
    I am willing to conduct further testing when you are ready for it.
    • Last Edit: 20 October, 2013, 07:16:46 PM by wcs13

    • wcs13
    • [*][*][*]
    [Not my release] Biography view
    Reply #699
    Another funny test : if I cut down my Internet access, the Bio component can't display anymore the Miley Cyrus bio and image. If I resume my Internet access, the bio and image show again.
    So it looks like the Bio component (v4.2.4 BTW) is fetching them online every time BUT not writing them to the custom folder. How bizarre.
    The "Create folder when cache paths specify non-existent folder" checked is CHECKED.
    The "Disable saving downloaded data" checkbox is NOT CHECKED, for both Artist and Album.
    • Last Edit: 20 October, 2013, 07:40:30 PM by wcs13