Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: WSH Panel Mod script discussion/help (Read 1394398 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

WSH Panel Mod script discussion/help

Reply #1550
Hey, Falstaff.

I find bug  in WSH Playlist Viewer v. 2 beta 8:

Select autoplaylist created with option "Force-sorted". In this case the order of sorting is determined in the stage of the creation of playlist and cannot be changed.
That is right for "Playlist view", "ESplaylist", "Simplaylist" panels. But when I use WSH Playlist Viewer, sorting playlist is available. That is wrong.

WSH Panel Mod script discussion/help

Reply #1551
@ pIv, It's not a bug, it's a feature?

I think Falstaff has put a lot of effort in making it possible.  BTW forcesorted autoplaylist can also be re-arranged by the ES-playlist aside from the default foobar fixed order. (It doesn't affect the actual order of the playlist contents, but reorders the "display order".) Don't how Falstaffs pulls this trick but to me it's really an enhancement of default foobar behavior.


WSH Panel Mod script discussion/help

Reply #1553
@ pIv, It's not a bug, it's a feature?

I think Falstaff has put a lot of effort in making it possible.  BTW forcesorted autoplaylist can also be re-arranged by the ES-playlist aside from the default foobar fixed order. (It doesn't affect the actual order of the playlist contents, but reorders the "display order".) Don't how Falstaffs pulls this trick but to me it's really an enhancement of default foobar behavior.


This is very bad feature!
Usually I create random selection from my library.  When any song played it removed from playlist. Then I use second autoplaylist "Last 3 days". In it I can see all song played in revers order from the beginning to the end of this period.
I do not want even so that this autoplaylist would sorted out as a result negligent use by menu of sorting.

It is possible whether to hide the points of sort menu in this case, or at least ask me about this?

WSH Panel Mod script discussion/help

Reply #1554
Aha, you got a little point there.
Not that it is a bad feature, it's a great feature, but it would be greater if you could exlude some playlist that needs a fixed order.
Would indeed be better for historical stuff like:
Played during last Day
More than a Year Ago

WSH Panel Mod script discussion/help

Reply #1555
i think it's a limitation of the WSH panel mod component that you can't detect whether an autoplaylist is force sorted or not. it would need to be added as a new feature.

WSH Panel Mod script discussion/help

Reply #1556
I'd like to be able to create a button that disables/enables the audioscrobbler component (foo_audioscrobbler I think), however the component doesn't have any main menu commands, the only way to disable/enable it is from its preferences page.

Would it be possible for disable/enable methods (and ideally a flag for retrieving the current state) to be added to WSH panel mod, or would this require modification of the audioscrobbler component beforehand/instead?

WSH Panel Mod script discussion/help

Reply #1557
@ rawny
Maybe it is possible to directly popup Preferences>Tools\Audioscrobbler with a button or shortcut. But i know nothing of the developper side of this. The only popupscreens that do this have a normal main menu command (like: Library/Configure)
It should be possible to button everything you can find under "Preferences>Keyboard Shortcuts>Action" Aside from main menu commands there are also a lot of context commands to discover in that section. But as you stated yourself there are none for audioscrobbler.

Isn't it more logical for Florian Heidenreich (foo_audioscrobbler dev) to provide them?..
And if it really should be done trough WSH-mod you could ask T.P. Wang himself in the component thread? But i think it isn't his task to solve other components shortcomings...

/edit, quick spellcheck

WSH Panel Mod script discussion/help

Reply #1558
@ falstaff

As i declared in last PM i had no crashes with WSH Playlist v2 beta 8. I presume thas was because you disabled the queueplaylist like you told.
I am now running the last (not yet released here, but online) version and, If you re-implemented the disabled part Then i can confirm the bug is gone (can not reproduce).

But it's not really clear to me. What do you mean with "playlist for the queue" ?
I don't see any new playlist show up in my standard playlist switcher panel,
so if you mean the green queueindex indicator that appears instead of the tracknumber, i still had those in v2b8  Working perfectly

No errors for me since v2b8. I almost can't wait for a final so i can start tweaking it for my insane UI.
Great work, once again.

/edit: semantics

WSH Panel Mod script discussion/help

Reply #1559
@Mod-Ular

green queue index wasn't the only feature around queue adds in my script! there was an entry in the settings menu (from the toolbar) to create or show a special playlist named 'queue content ' that contained only the queued tracks, that's what i've removed

WSH Panel Mod script discussion/help

Reply #1560
@mod-ular: Yeah it is possible to open the preferences page for audioscrobbler via button/keyboard shortcut etc. which is a little quicker for enabling/disabling it.

I agree that it would be logical for Florian to provide main menu commands for audioscrobbler as opposed to T.P. providing them, yes, (and if they existed then I could create the button I want  ) but that wasn't what I was trying to say. My question was really whether Florian would need to add anything to the foo_audioscrobbler component before T.P. can expose it's enabled/disabled state as an interface property, e.g. fb.AudioscrobblerEnabled. I believe that each property has to be exposed manually by T.P. as otherwise fb.StopAfterCurrent would have been part of the interface from the beginning.

WSH Panel Mod script discussion/help

Reply #1561
given that foo_audioscrobbler hasn't been updated for nearly 2 years, i wouldn't hold your breath. simply adding a menu command wouldn't be enough either. you'd need a callback to detect when the setting has changed. this would mean an SDK for foo_audioscrobbler would have to be released AND it would then have to be implemented in WSH panel mod. in short, not very likely.

there are various ways you get foo_audioscrobbler not to scrobble your music. i personally have it set to scrobble only music in my library. for most people this is enough as they can rip/download music, listen to it without scrobbling before deciding whether it's good enough to become part of their main library.

also, you can use the field-remapping options in the preferences. through title formatting, you could set the artist to be blank for tracks with a rating of 1. eg

Code: [Select]
$ifequal(%rating%,1,,[%artist%])


tracks with a rating of 1 won't get submitted because there is no artist specified. you can adapt this with any title formatting you like.


WSH Panel Mod script discussion/help

Reply #1563
@marc2003: Ah, I hadn't thought about the callback (although I suppose it would be possible to make a non-intelligent toggle button without it).

Yeah I already have it set to only scrobble music in my library but my library contains some stuff that shouldn't really be in my library  It's in there mostly because it's easier to manage as it's making its way into the library (i.e. I'm tagging it). I guess I could make it do some %path% matching to determine whether to scrobble, which might alleviate my need to enable/disable audioscrobbler in most cases. Cheers for the fresh angle

WSH Panel Mod script discussion/help

Reply #1564
@rawny I didn't know you could popup audioscrobblers preferences, but i knew it should be possible and only one mouseclick away from what you want.
I gotta check it out soon because i also use lastFM and love making buttons myself  (Two mouseclicks is acceptable within my personal 'user-ergonomic' rules ^^)

@marc2003, nice trick, once again..  I just delete misscrobbled track on lastfm. (This has the advantage you can flipflop bad decisions by undeleting.

@falstaff, upgraded to v2b8.2, still no errors,
but as mentioned before, still some broken features in the toolbars rightside menu.
- Sorting doesn't work for me (it did work when i checked it in v2b7-something).
- I see no blue indicator-dot that pre-b8 showed-up in the goup/order menu.
- Another strange thing is that i started losing mousescroll capabilities in all my panels. (Happened 2 times).
Not reproduceable but also occurs since v2b7.3+. I am not saying its your script that blocks mousescrolling, it's just something i thought was worth reporting.

WSH Panel Mod script discussion/help

Reply #1565
- Sorting doesn't work for me (it did work when i checked it in v2b7-something).


could you give details? sort or group/sort or both ? are you sure of that, just tested all, and they works, try to randomize playlist before to be sure that nothing is sorted, and could you tell wich preset seems broken and what does it do really?

- I see no blue indicator-dot that pre-b8 showed-up in the goup/order menu.


normal i've removed this indicator which has no sense because it wasn't binded to a playlist but was just a general indicator, so if you sort a group a playlist with a group present, then if you switch to another playlist with another group preset, it keeps with the last used, so that wasn't logic to display it.

- Another strange thing is that i started losing mousescroll capabilities in all my panels. (Happened 2 times).


this looks like a timer overflow in another wsh panel that freeze all other timers used in all others wsh panels. You must have a wsh panel that doesn't handle correctly timer objects (issue already encourtered for me with my wsh seekbar in my config slate. e.g. timers was never cleared on track chang ...)
so, that's not the playlist script in cause.

WSH Panel Mod script discussion/help

Reply #1566
1. Sort doesn't re-order the playlist. Yes i tried Randomize and Reverse first. None of the presets reorder the list. Group/Sort doesn't reorder either, but it does give the different groupheaders.

CORRECTION: But only on FORCE-SORTED autoplaylists. This got me confused  If i disable the force-sorted checkbox for the active autoplaylist it DOES work perfectly.
But what were pIv and marc2003 talkin' about then?

2. Okee, that makes sense.

3. Okee, i'll try to get that fixed if i can find the cause. Clean code is euhm.. clean?  But it's not a big problem as it does not happen often & refreshing solves it.

WSH Panel Mod script discussion/help

Reply #1567
1. sure!! force sorted feature on autoplaylist, as naled, force the sort order, so no other can be applied if it's enabled, logic. so all is ok.

3. hard to find where is the bug (which other panel), but if you use timers in your wsh seekbar panels, i'd start from here

WSH Panel Mod script discussion/help

Reply #1568
WSH Playlist Viewer v2 beta 9: http://pastebin.com/u/Br3tt

What's new in beta9:
- columns options added (play icon, tracknumber)
- CTRL+C and CTRL+V now supported to copy/paste tracks from a playlist to another (e.g.)
- come back of the Queue Playlist feature!
- little bug fixed for the display of the year when tag %date% is not to the format YYYY-MM-DD but YYYY/MM/DD or YYYY.MM.DD
- tweaks


WSH Panel Mod script discussion/help

Reply #1569
While editing in a 'WSH Panel Mod Configuration' window, how do I activate the auto-dropdown list of functions when a trigger key is pressed
such as the "F" key, which should cause the fb.xxxxxxx functions drop-down list to activate next to the cursor.

In my latest foobar2000 layout, the drop-down feature is not activating !!
I started an archived foobar2000 installation on my hard drive (with WSH Panel Mod 1.4.2) and the drop-down feature works.

WSH Panel Mod script discussion/help

Reply #1570
looks like the interface.api and jscript.api files are missing from your component folder.

if you installed the component via the proper methods, this wouldn't happen.

WSH Panel Mod script discussion/help

Reply #1571
marc, thanks for answering.

In my current foobar2000, I have WSH Panel Mod files placed like so:

       ...\foobar2000\user-components\foo_uie_wsh_panel_mod\foo_uie_wsh_panel_mod.dll
       ...\foobar2000\user-components\foo_uie_wsh_panel_mod\interface.api
       ...\foobar2000\user-components\foo_uie_wsh_panel_mod\jscript.api

As I far as I know, my file placement is correct.

Does anybody here have more answers ?

WSH Panel Mod script discussion/help

Reply #1572
file>preferences>tools>wsh panel mod>editor properties

check the value of 

api.jscript
Code: [Select]
$(dir.component)jscript.api;$(dir.component)interface.api


edit: i assume your files were in the correct place before i mentioned it. if you put them there manually, you'll probably need to restart.

WSH Panel Mod script discussion/help

Reply #1573
Preferences are exactly like yours marc; so no problem there.

Any more answers?

WSH Panel Mod script discussion/help

Reply #1574
Hi again,

I'm trying to display the bitrate for the now playing track and would like it to change dynamically for VBR tracks. I'm trying to use the following code, but for some reason it doesn't update as the track plays. I'm not sure why it's not working - I thought that on_playback_dynamic_info() should cover the updating of the display when the bitrate changes. Anyone got any pointers?

Code: [Select]
function RGB(r, g, b) {
    return (0xff000000 | (r << 16) | (g << 8) | (b));
}

var bitrateTF = fb.TitleFormat("%bitrate%' kbit/s'");

var textFont = gdi.Font("Tahoma", 10, 1);
var textColour = RGB(255, 255, 255);

if (fb.IsPlaying){
        update();
}

function on_size() {
    ww = window.Width;
    wh = window.Height;
}

function update() {
    g_metadb = fb.GetNowPlaying();
    if (!g_metadb) return;
    bitrate = bitrateTF.EvalWithMetadb(g_metadb);
    window.Repaint();
}

function on_paint(gr) {
    gr.FillSolidRect(0, 0, ww, wh, RGB(0,0,0));
        gr.GdiDrawText(bitrate, textFont, textColour, 0, 0, ww, wh);
}

function on_playback_dynamic_info() {
        update();
}
function on_playback_dynamic_info_track() {
        update();
}