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: CaTRoX (QWR Edition): fb2k theme (Read 64126 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #100
I've changed the font to a different one, but the rendering engine hasn't. Well, I guess the problem may be elsewhere. Thanks anyway. :)
JScriptPanel uses GDI to render fonts. Maybe you're using something else in windows, but unless it replaces GDI the engine somehow, it won't change how fonts render in JScript.

I'm assuming that when you change fonts in the script, they actually do update to the new font. If they aren't you might not be entering the font name correctly (this can be a pain in the ass to figure out), or maybe you don't have the fonts you think you do installed. You can use utils.CheckFont(fontName) to make sure the fonts are actually being loaded correctly.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #101
Found a crash in QueueHandler. If I enqueue something from a filter, and then change filters, the PlaylistItemIndex of the first item is -1 (not found) and cur_queued_row is undefined, and we crash trying to reference it's queue_idx.

Inside queue_contents.forEach first lines should be:
Code: [Select]
            if (queued_item.PlaylistIndex !== cur_playlist_idx || queued_item.PlaylistItemIndex === -1) {
                return;
            }
QueueHandler crashed for me again today: "Unable to set property 'queue_idx' of undefined or null reference". Not sure how it got past those two checks though, and I haven't been able to reproduce since.

I did however run into another issue once where I'm in one playlist, I change playlists using foo_http_control, and then enqueue a song foo_http_control, and it ends up enqueuing songs from the first playlist. I think somewhere cur_playlist_idx may not be being set properly. This is also something I can't reliably reproduce, but I know I've seen it at least once before. (might also be a problem with foo_http_control?)

Re: CaTRoX (QWR Edition): fb2k theme

Reply #102
QueueHandler crashed for me again today: "Unable to set property 'queue_idx' of undefined or null reference". Not sure how it got past those two checks though, and I haven't been able to reproduce since.

I did however run into another issue once where I'm in one playlist, I change playlists using foo_http_control, and then enqueue a song foo_http_control, and it ends up enqueuing songs from the first playlist. I think somewhere cur_playlist_idx may not be being set properly. This is also something I can't reliably reproduce, but I know I've seen it at least once before. (might also be a problem with foo_http_control?)
Hm... Most likely, both of these issues are caused by playlist not being changed (i.e. initialize_list method was not called). Dunno how that happens though. You may try making several playlists of different sizes - e.g. one with a single track, the other with more tracks - and switch between them while selecting the last item in the playlist. Ideally it should trigger the error much more often. If you manage to cause it more or less consistently, then we can move with investigating the logs (which can be turned on by trace_call variable).

Re: CaTRoX (QWR Edition): fb2k theme

Reply #103
I've changed the font to a different one, but the rendering engine hasn't. Well, I guess the problem may be elsewhere. Thanks anyway. :)
JScriptPanel uses GDI to render fonts. Maybe you're using something else in windows, but unless it replaces GDI the engine somehow, it won't change how fonts render in JScript.

I'm assuming that when you change fonts in the script, they actually do update to the new font. If they aren't you might not be entering the font name correctly (this can be a pain in the ass to figure out), or maybe you don't have the fonts you think you do installed. You can use utils.CheckFont(fontName) to make sure the fonts are actually being loaded correctly.

The font itself changed for sure. The thing is that any other program that I use doesn't have this problem. Yeah, it changes the rendering of GDI. What I noticed is that if using elplaylist and the text is displayed using $drawstring the rendering doesn't change. However, if changed to $drawtext it's okay. I don't know whether that has any meaning in that case, though.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #104
What I noticed is that if using elplaylist and the text is displayed using $drawstring the rendering doesn't change. However, if changed to $drawtext it's okay. I don't know whether that has any meaning in that case, though.
It probably has: DrawString uses GDI+ rendering engine, while DrawText uses GDI. So, if your "engine substitution" only affects GDI, it won't affect DrawString.
My theme uses DrawString exclusively (for better ClearType hinting), while Library Tree script uses DrawText, which may explain the discrepancy you are experiencing.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #105
That's exactly it. I've just changed drawstring to gdidrawtext and it renders properly. Unfortunately the text is misaligned now.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #106
That's exactly it. I've just changed drawstring to gdidrawtext and it renders properly. Unfortunately the text is misaligned now.
Yea, since the text width in the theme is measured with MeasureString (GDI+). You'll have to replace it with CalcTextWidth (GDI). Additionaly, you'll have to replace all StringFormat flags with corresponding GDI flags.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #107
Well, since I'm not that knowledgeable and the skin is out of order after changing MeasureString, I'll call it a day and use it day that probably.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #108
Version: 4.3.0
Link: https://github.com/TheQwertiest/CaTRoX_QWR/releases/tag/v4.3.0
Changelog:
    Added
    • Playlist Panel:
      • Added disc sub-headers: see example.
      • Art images are now cached: no more needless image reloading after every little action.
      • Added foo_enhanced_playcount support: `$max(%play_count%, %lastfm_play_count%)` query is used to get track play count.
    Changed
    • Playlist Panel:
      • Increased playlist initialization speed by 30% (thanks to marc2k3)!
      • Swapped rating and duration positions in rows.
      • Corrected query for album sub-title: standard `%subtitle%` instead of non-standard `%albumsubtitle%`.
    • Updated theme.fcl:
      • Added new script files.
      • Changed default Playlist panel properties.
    • Compiled latest foo_jscript_panel with extensions (v2.1.4).
    Fixed
    • Playlist Panel:
      • Fixed bug: art images were loaded even with headers disabled.
      • Fixed bug: changing grouping preset in one player mode was not always affecting grouping preset in other mode.
      • Fixed various display glitches with multiline tags.
    • Art Mode:
      • Fixed right-click menu handling.

Special thanks to @MordredKLB for disc sub-headers and art image cache ideas!

Re: CaTRoX (QWR Edition): fb2k theme

Reply #109
New feature suggestions or suggestions about modifying the existing ones are fine here, I think.

Can I suggest new feature?  ;D  Maybe there is someone else besides me who wants to have a button to fast switch playback output device. It would be very handy for portable version using on multiple machines with different sound hardware. Thanks.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #110
Can I suggest new feature?  ;D  Maybe there is someone else besides me who wants to have a button to fast switch playback output device. It would be very handy for portable version using on multiple machines with different sound hardware. Thanks.
Could you elaborate it a bit, like should it just cycle between all available output devices?

Re: CaTRoX (QWR Edition): fb2k theme

Reply #111
I get the black blocks after the last song has played. Is that how it's supposed to be?

Re: CaTRoX (QWR Edition): fb2k theme

Reply #112
... Is that how it's supposed to be?
Nope =)
I'll try to reproduce it and fix in the next release. Thanks for the report!

PS: For some reason or another I practically never ever reach the end of the playlists >_<

Re: CaTRoX (QWR Edition): fb2k theme

Reply #113
I haven't investigated this at all, but I realized yesterday that in my version of your playlist panel, if I select multiple songs and hit CTRL+Q to enqueue, it won't enqueue them all. Does that work correctly for you? There's a high probability I broke something, but I'm not at home this weekend to check.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #114
I checked today and it's present in your code as well. You completely ignore any en/dequeue of items if more than one row is selected.

To fix it, I added a get_selected_items method to SelectionHandler that just returns selected_items, and then I updated the key_handler code for "VKEY_Q" to be:
Code: [Select]
                if (modifiers.ctrl && modifiers.shift) {
                    queue_handler.flush();
                }
                else if (selection_handler.selected_items_count() >= 1) {
                    var rows = this.cnt.rows;
                    if (modifiers.ctrl) {
                        indexes = selection_handler.get_selected_items();
                        indexes.forEach(function (idx) {
                            queue_handler.add_row(rows[idx]);
                        });
                    }
                    else if (modifiers.shift) {
                        indexes = selection_handler.get_selected_items();
                        indexes.forEach(function (idx) {
                            queue_handler.remove_row(rows[idx]);
                        });
                    }
                }

Re: CaTRoX (QWR Edition): fb2k theme

Reply #115
I haven't investigated this at all, but I realized yesterday that in my version of your playlist panel, if I select multiple songs and hit CTRL+Q to enqueue, it won't enqueue them all. Does that work correctly for you? There's a high probability I broke something, but I'm not at home this weekend to check.

This is not a bug, but actually intentional: queue size is rather small, so it can't always hold all the selected items. So, rather then trying to guess which of those items should be put in queue and which should be discarded, I decided to enforce a sinqle item addition rule to the queue.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #116
Ahhh. Didn't realize there was a queue size limit. I think I'll play around with it and just prevent adding items after reaching the cap.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #117
Looks like playcount statistic doesn't work correctly. The counter increases only when one minute of the song passes. Is it possible to change the behavior of counter to increase it immediately when song starts playing?

Re: CaTRoX (QWR Edition): fb2k theme

Reply #118
Looks like playcount statistic doesn't work correctly. The counter increases only when one minute of the song passes. Is it possible to change the behavior of counter to increase it immediately when song starts playing?
foo_playcount is the component that handles counting plays of songs. It increments the count when 1 minute of the song has elapsed. That time is not user configurable. You'd have to find a different component or use your own custom playcount field that you increment manually when starting a song.


Re: CaTRoX (QWR Edition): fb2k theme

Reply #120
Is it a joke?
I meant "programmatically." It was late and I was thinking it could be done in jscript_panel in an on_playback_new_track callback, but jscript can't actually write tags. It might be doable in foo_customdb using your own playcount field, but outside that or finding another playcount component, you'd have to write your own.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #121
Is it a joke?
I meant "programmatically." It was late and I was thinking it could be done in jscript_panel in an on_playback_new_track callback, but jscript can't actually write tags. It might be doable in foo_customdb using your own playcount field, but outside that or finding another playcount component, you'd have to write your own.

JScript Panel has its own Playback Stats that you could possibly add.
https://github.com/marc2k3/foo_jscript_panel/wiki/Playback-Stats


Re: CaTRoX (QWR Edition): fb2k theme

Reply #123
Drag'n'drop still doesn't work the same as in original Catrox theme???

Re: CaTRoX (QWR Edition): fb2k theme

Reply #124
Hello. I had a problem installing this assembly. Installation made completely according to the instructions. However, when you first start the next assembly, an error occurs.
Quote
Error: JScript Panel v2.1.4 (Top Panel)
Ошибка выполнения JavaScript:
Недопустимый вызов или аргумент процедуры
File: E:\Foobar2000\Someone_else's_assembly\Catrox\\themes\CaTRoX\Scripts\Panel_Top.js
Line: 440, Col: 5
<source text only available at compile time>