Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 03, 2016, 03:55:08 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Plugin: AlbumDisplayer (BETA)  (Read 12858 times)

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Plugin: AlbumDisplayer (BETA)
« on: July 05, 2008, 08:57:27 AM »
AlbumDisplayer (BETA) -- please testdrive/pick apart and give feedback! :Thmbsup: If anyone would like to post about this at some other place, please don't until there's been some more feedback confirming that it works for others (it works perfect on my system but you never know...)

-----------------------------------
AlbumDisplayer
by nod5 ( nod5.dcmembers.com )
a plugin for FARR Find and Run Robot; www.donationcoder.com/Software/Mouser/findrun/
using FARR javascript SDK by ecaradec
using tooltip html/javascript code by dynamicdrive.com
using static index, created/updated by script made in autohotkey
-----------------------------------

Setup:
(0) Extract and copy folder "AlbumDisplayer" and all its files to FARR Plugin directory
(1) edit path in AlbumDisplayerIndexer.ini
(2) run AlbumDisplayerIndexer.exe to make index
(3) edit audioplayer path in album.html
(4) type "rplugins" in FARR and click "OK"

Tip: put link to AlbumDisplayerIndexer.exe in autorun folder to re-index at each Windows reboot

Use:
Type "alb searchphrase". Example: "alb beatles yellow sub"

Click on a match to send its folder as a parameter to the specified audio player
(confirmed working in the audioplayer XMPlay)

Note: AlbumDisplayer only works for folders that contain a folder.jpg image file.
Note: requires FARR 2.15.01 or newer

download: -- link removed use newer version below -- (md5 9e11f51b5f31f54951fee0b3b67284b6 )

short flash screencast: http://nod5.dcmembers.com/albumdisplayerbeta.htm
albumdisplayerbeta.jpg
« Last Edit: May 15, 2010, 11:03:04 AM by Nod5 »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #1 on: July 05, 2008, 09:10:26 AM »
Very good work, nod5!! This proves the tremendous power of the html display :D
I just have one request: Is it possible to have it launch the first result when we press enter? :)

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #2 on: July 05, 2008, 09:20:54 AM »
indeed it does! Via the farr:// commands we can mix html and FARR functionality a lot. We could for example make a html menu for each match and from that menu choose from multiple things for FARR to do with the match (pass it to an audioplayer like above, or copy it to clipboard, or pass it to another FARR plugin, or...)

re: launching the first result. I'm not exactly sure how to do it. Do you see a good way?
« Last Edit: July 05, 2008, 09:23:34 AM by Nod5 »

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #3 on: July 05, 2008, 09:26:35 AM »
the problem is this: for search as you type to work, I need to let the FARR inputbox to keep focus. But to launch a match from the html page through enter I need that match (and the page) to have focus. But since the enter key currently has no use in the plugin when the input box has focus, maybe I can modify it so that the enter redoes the search and immediately loads the first match. Let me look into that.

In the meantime, pressing tab + enter is a pretty fast way to launch the first match.

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #4 on: July 05, 2008, 09:28:36 AM »
But since the enter key currently has no use in the plugin when the input box has focus, maybe I can modify it so that the enter redoes the search and immediately loads the first match. Let me look into that.
Yep, that's what i was thinking! :)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,405
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #5 on: July 05, 2008, 10:17:38 AM »
very cool!!

Quote
But since the enter key currently has no use in the plugin when the input box has focus, maybe I can modify it so that the enter redoes the search and immediately loads the first match. Let me look into that.

there is actually an easy way to do this.  the new plugin api and new fscript api pass an additional variable to the OnSearch functions named triggermethod, which is 1 when user has hit enter to complete their search and 0 otherwise.  it's made for exactly the purpose you are talking about here.  we just need ecaradec to give us a sample of how to make the fscript.js use the new feature.

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #6 on: July 05, 2008, 11:40:02 AM »
Mouser, that sounds perfect!

Given a variable in fscript.js that reflects if enter was pressed then I just need to modify the passed parameter (from the current "album.html?phrase1 phrase2 phrase3" to for example "album.html?enter=1&search=phrase1 phrase2 phrase3") and make album.html immediately send the first match to the external player if enter=1 .

BTW, I first thought that the plugin part for this idea could be made redundant once FARR gets a built in way to load a html view mode page without pressing enter (i.e. if "dosearch htmlviewurl..." worked). But for more advanced features like different behaviour for regex match versus pressing enter a plugin seems necessary.

edit: I found a bug with my plugin: If I type "alb abc%" then the percent sign crashes FARR in a barrage of error messages, the first saying "invalid hex digit in URL". I guess I need to block certain characters in the fscript.js...
« Last Edit: July 05, 2008, 11:44:51 AM by Nod5 »

TucknDar

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,104
    • View Profile
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #7 on: July 17, 2008, 04:30:41 AM »
Finally got around to trying this plugin, and I'm really liking it! Is there a way to let me display all albums? like typing "alb *" or something?

Good work!

CWuestefeld

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,001
    • View Profile
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #8 on: July 17, 2008, 08:08:29 AM »
What exactly does this work from? Is it the image files that WMP leaves around, or some source on the web, or what?

Lashiec

  • Member
  • Joined in 2006
  • **
  • Posts: 2,374
    • View Profile
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #9 on: July 17, 2008, 08:22:39 AM »
The JavaScript file included says it shows the "folder.jpg" file contained in the specified path (I guess that also includes subfolders). That's a defacto standard, so it should work with most media players, although it would be nice if a few more frequent naming conventions were included.

EDIT: Rewording
« Last Edit: July 17, 2008, 04:52:59 PM by Lashiec »

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #10 on: July 17, 2008, 04:11:52 PM »
Is there a way to let me display all albums? like typing "alb *" or something?
Good suggestion! I'll look into making * a catch all search term. One problem though: the plugin currently only displays up to 100 matches (the 100 first matches). I added that because when testing on more files FARR seemed to slow down/freeze while loading the images. I'll see if that can be avoided.

re: folder.jpg, yes that's some sort of standard naming scheme. Used by Windows Explorer and other programs to display album art. You can add the folder.jpg files manually or through some program/script.

Lashiec, what other naming conventions do you have in mind?

TucknDar

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,104
    • View Profile
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #11 on: July 17, 2008, 04:17:01 PM »
a few common names I can think of are front.jpg and cover.jpg. I've seen both used several times.

Lashiec

  • Member
  • Joined in 2006
  • **
  • Posts: 2,374
    • View Profile
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #12 on: July 17, 2008, 04:51:39 PM »
Lashiec, what other naming conventions do you have in mind?

What TucknDar said. There are others, but practically of them are personal conventions, instead of something extended, except for those which use the same name as the folder or the album to which the cover belongs.

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #13 on: July 19, 2008, 04:30:44 AM »
ok, I've got the * search working. To avoid freezing, I set the plugin to display the 100 first images and then inject 100 more each time the user scrolls to the end of the page. I can't upload the new version from where I am now but I will do that later.

When using just folder.jpg I only had to index the folder names. I can easily make an option to let the user change that from folder.jpg to whatever and leave the rest of the code intact. But supporting mixed image names on one system (some folder.jpg and some front.jpg) would require some more recoding.

TucknDar

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,104
    • View Profile
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #14 on: July 19, 2008, 05:11:13 AM »
for the .jpg stuff, I normally just rename to folder.jpg anyway, since that's supported by more players, so not a big deal (for me, and let's face it, I'm at the centre of the universe!!!).

Looking forward to the 'alb *' release :Thmbsup:

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #15 on: August 01, 2008, 05:20:30 PM »
the alb * feature has been delayed by awesome weather, plenty of swimming in lakes and other distracting outdoor activities. Sorry about that.  ;D

I've tested it some more though. I'm unsure what the best design would be. If I let it first load 50 covers and then load 50 more each time the user scrolls to the bottom then there's a noticeable freeze for a second or more with each additional 50 cover load. This happens the first time for each cover during a session. The covers seems to be cached after that.

I tried decreasing the number of albums to display at each bottomscroll to 20. That shortened the freeze but on the other hand gave a larger number of freezes.

I think the best thing would be to incrementally inject more covers at a pace that does not cause the freezes but still does not feel slow. I'm unsure how to do that in javascript however.

Another idea is to initially let alb * display 50 covers plus empty image frames for all the rest of the albums. FARR would then incrementally keep loading the rest of the images into those frames until the user does some other FARR action.

Any thoughts?

TucknDar

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,104
    • View Profile
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #16 on: August 05, 2008, 08:24:56 AM »
the alb * feature has been delayed by awesome weather, plenty of swimming in lakes and other distracting outdoor activities. Sorry about that. 
How dare you!?!?!? 8)

I can see what you mean about the freezes, not really ideal. Does it make any difference if the album images are smaller? Or maybe let user type how many albums to display, so that the user can decide how much "freezing" is acceptable or how many albums at the time alb * should display.

I'd be happy to test any work in progress!

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #17 on: August 12, 2008, 06:14:35 PM »
AlbumDisplayer v080813 v080814
-- link removed, use newer version below -- (md5 ebb905356dd7aa7e3a27ece19302de1e)
changelog:
v080814
- folders with ' in path now works
v080813
- now trims all % in input to avoid FARR crash (example: "alb abc%" previously caused crash)
- special search phrase "alb *" displays all albums (first 100 then 50 more at each scroll to page bottom)
- ctrl+click album to open its folder

Let me hear your impressions on "alb *" - does it freeze FARR too long/too often?
« Last Edit: May 15, 2010, 11:02:02 AM by Nod5 »

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #18 on: July 15, 2009, 03:58:12 AM »
One year later...  

I'm trying to update this plugin to use a non-static index via Everything.exe !
I have done this:
- changed Fscript to call new autohotkeyscript getindex.exe
- set getindex.exe to search Everything.exe via command line through es.exe (re-using code from Skrollster's InEverything script - thanks!) and generate albumindex.txt index file on the fly
- changed FScript to thereafter load album.html
- changed album.html to not filter anything and instead display all in albumindex.txt

This works roughly but is not optimal. I need to reliably wait with the html loading until the indexing is completed.
As of now I do this:

Quote
FARR.setStrValue("launch", currentDirectory + "\\getindex.exe " + albtemp);
FARR.setstrvalue("launch", "sleep " + 200);
FARR.setStrValue("launch","htmlviewurl " + currentDirectory + "\\album.html");

But regardless of what sleep time I put in FARR often displays a blank html (with no thumbnails). Clicking in the FARR window and pressing F5 (refresh) displays the thumbnails correctly.

In general I'd like to re-work the plugin like this: (1) f(sub)script calls everything es.exe directly, (2) gets matches back IN MEMORY, (3) generates HTML output IN MEMORY and (4) pushes it to FARR. That would rid the need for an extra autohotkey, an index txt, a html file.

But I don't have the F(sub)script skills that it takes ATM - that's why I'm taking the detour through autohotkey. Does the above seem doable? Any pointers on commands needed? Especially on (2), (3) & (4). edit: and possibly on doing (1) by FARR internal calls to the TinyEv plugin instead.

edit: I would also like some way to let FARR keep the html output displayed even when new text is typed in the inputbox AS LONG AS that text stays within the plugin alias. I.e. if the user has typed "alb beatl" and now enters "alb beatle" then FARR first offloads the html, goes through the other plugin steps and then reloads the html. I want it to not offload the html if possible.
« Last Edit: July 15, 2009, 04:12:43 AM by Nod5 »

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #19 on: July 31, 2009, 06:16:02 PM »
I never got this sorted  :( Tried both to solve it through changes in the .html (javascript to reload once after some time) and in the .js but without success. So I'm reverting to the previous alb version, at least for the moment. I'll just mod it so that the static index is generated via Everything since that is so much faster compared to a autohotkey file loop. That would be some progress, though not as much as I had aimed for.

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: Plugin: AlbumDisplayer (BETA)
« Reply #20 on: May 15, 2010, 10:59:38 AM »
AlbumDisplayer  
v100515  by nod5 ( nod5.dcmembers.com )
http://nod5.dcmember...s/AlbumDisplayer.zip (md5  ff1dba199cceed79c851bb54e4ef86dd )

a plugin for FARR, Find and Run Robot
www.donationcoder.com/Software/Mouser/findrun/

AlbumDisplayer indexes folder.jpg files in album folders
and display them as thumbnails for easy browsing/searching

made in AHK (www.autohotkey.com)
using FARR javascript SDK by ecaradec
using tooltip html/javascript code by dynamicdrive.com
option: use ramdisk as cache for much faster image display
(requires ramdisk and 7za.exe; 7zip command line)
http://downloads.sou.../sevenzip/7za465.zip

setup:
1. unzip files to a folder named AlbumDisplayer in the FARR plugins directory
2. enter paths in ini file
3. run AlbumDisplayerIndexer.exe to index
4. type "rplugins" in FARR
(optional: 5. get and unzip 7za.exe to AlbumDisplayer folder)

use:
Type "alb searchphrase". Example: "alb beatles yellow"
Type "alb *" to display first 100 albums (+50 on each bottom scroll)
album image actions:
click = send album to audioplayer
ctrl+click = open album folder

run AlbumDisplayerIndexer.exe to re-index

tip:
put AlbumDisplayerIndexer.exe link in Windows autorun to re-index on boot
put AlbumDisplayerIndexer_CacheToRamdisk.exe link in Windows autorun to unzip cache to ramdisk on boot (see ini file for details)

changelog:
100515:
- all settings now in ini
- various code trims/cleanups
- ramdisk cache option

080813:
- trims % in input to prevent FARR crash
- "alb *" now displays first 100 albums (+ 50 for each bottom scroll)
- ctrl+click opens album folder
- folders with ' in path works

http://nod5.dcmembers.com/albumdisplayerbeta.htm (ignore end part with old settings)
albumdisplayerbeta.jpg
« Last Edit: May 15, 2010, 11:07:02 AM by Nod5 »