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: foo_ui_panels (Read 1318302 times) previous topic - next topic
0 Members and 24 Guests are viewing this topic.

foo_ui_panels

Reply #2550
image problem
trying to display an album art stand-in image when no album art is present

this doesn't work, need something effective to it --a way to display an image when folder.jpg is not found in a tracks file path

Code: [Select]
$if2($replace(%path%,%filename_ext%,folder.jpg),/images\no disc.jpg)


problem being the first part always returns true, code suggestions?

foo_ui_panels

Reply #2551
a way to display an image when folder.jpg is not found in a tracks file path

Code: [Select]
$if2($replace(%path%,%filename_ext%,folder.jpg),/images\no disc.jpg)


problem being the first part always returns true, code suggestions?


Try this:

Code: [Select]
$puts(path.cover,$replace(%path%,%filename_ext%,)folder.jpg)
$if($fileexists($get(path.cover)),
      $get(path.cover)
      ,
      /images\no disc.jpg
)

foo_ui_panels

Reply #2552
Of couse it will return true, because the string always exists; you not actually checking if a file is there, you are checking if the string is empty or not.
You need to use the $fileexists() command to actually check if the file exists.

Code: [Select]
$if($fileexists(replace(%path%,%filename_ext%,folder.jpg)),$replace(%path%,%filename_ext%,folder.jpg),/images\no disc.jpg)
elevatorladylevitateme

foo_ui_panels

Reply #2553
$fileexists() ... gosh i dumb 

thanks fbuser, thanks shakey

 

foo_ui_panels

Reply #2554
I have a problem using the beta and PanelsUI - I don't have the group item display. Tested with PanelsUI v0.13.8 beta and v0.14.12 beta.

foo_ui_panels

Reply #2555
I have a problem using the beta and PanelsUI - I don't have the group item display. Tested with PanelsUI v0.13.8 beta and v0.14.12 beta.


My PanelUI layout still work as before. Group item still work fine. no problem here.

foo_ui_panels

Reply #2556
But I have problem and don't know why. :/
Here are two screenshots:


Edit: Fixed now, I didn't modified my fooby for long time, so the problem was with the Sorting the playlist. :/

Edit2: Another problem is the font, using the last beta it doesn't have cleartype I think.

foo_ui_panels

Reply #2557
PanelUI crashes with the new foobar2000 beta...



foo_ui_panels

Reply #2560

PanelUI crashes with the new foobar2000 beta...


Are you sure it is Pamels UI and not Album Art panel?


well I'm using both album art panel v0.2.5.2 and panels ui v0.14.12 beta with dawxxx666's aVa 1.0.3+ config, it could be any of both. I'm not really sure, though, 'cause I back down to foobar2000 v0.9.4.5 once the crashes started taking place.

foo_ui_panels

Reply #2561
Update AA to 0.2.7, older versions crash with fb2k 0.9.5.

foo_ui_panels

Reply #2562
Hmm. On one of my PC's where version 0.14.12 was causing constant crashing of FB2K. Well, that isn't happening anymore since I updated to fb2k 0.9.5 beta. Not to suggest the PUI problems aren't there anymore, just they aren't causing crashes now. Maybe it's merely coincidental and I'll get a crash as soon as I submit this.

foo_ui_panels

Reply #2563
I use panel ui long time, I always have an idea that panel ui can support the circular frame and support the adsorption like the winamp! I think it's wonderful!

foo_ui_panels

Reply #2564
Hello everyone. I'm hoping someone here can help me with this, because this seems to be the place for help with this kind of stuff... I'm not sure though. Anyway:

You know Last.fm? If you don't, it's this site that does a bunch of fun stuff, but ignore that if you want. When a song has played more than half of its length, or 4 minutes (whichever comes first (basically, for all songs longer than 8 minutes, it's after 4 minutes instead of half)), I want a little icon to be displayed. When that hasn't happened, I want another icon to be displayed. I ALSO want a little counter thing, which shows how long it'll be before it changes icon. (for those of you using Last.fm - how long it'll be until it "scrobbles". I say "scrobbles" because it doesn't really mean it has scrobbled it, but that it should have) but I want it to disappear when it has reached 0. I'd also like it if it ignored all this, and displayed the same icon as the one it displays before a song has reached half/4 minutes, when the track doesn't have id3 info on Artist AND Title OR is shorter than 30 seconds.

I don't know if I'm a total noob, or if what I'm trying to do is complicated (probably a combination of both) - but in either case, it should be possible, and hopefully you people here can help me.

What I have so far:

Code: [Select]
$alignrel(left,middle)$ifgreater($div(%length_seconds%,2),240,
$ifgreater(%playback_time_seconds%,240,
$imageabs(4,0,/images\Last_fm_Player-liten.png,-),
$imageabs(4,0,/images\Last_fm_Player-inactive-liten.png,-)),
$ifgreater(%playback_time_seconds%,$div(%length_seconds%,2),
$imageabs(4,0,/images\Last_fm_Player-liten.png,-),
$imageabs(4,0,/images\Last_fm_Player-inactive-liten.png,-)))


$if(%isplaying%,$alignrel(left,middle)$font(Trebuchet MS,6,-,240-0-0)          
$ifgreater($div(%length_seconds%,2),240,
-$sub(240,%playback_time_seconds%),
-$sub($div(%length_seconds%,2),%playback_time_seconds%)))


(please forgive me for not being an uber 1337 h4x0r and writing it up in some super fancy way... feel free to fix that yourself if you want to, but it works, so I don't mind)

What it does:

- displays the icon when half of the song/4 minutes has passed, otherwise displays the other icon
- has a semi-working counter. Only "semi" because when it has passed 0, it becomes "--#".

What I want help with:

- making the counter display MM:SS instead of only seconds.
- making it hide the counter when half the song/4 minutes has passed.
- making it hide the counter if the song's id3 tag doesn't have info on Artist AND Track.
- making it hide the counter if the song's shorter than 30 seconds.
- making it only display the "inactive" icon if the song's id3 tag doesn't have info on Artist and Track.
- making it only display the "inactive" icon if the song's shorter than 30 seconds.


I sort of know which commands I want to use, but that's basically it... so if someone could help me with it (/do it for me ) that would be great. Sex, 1000 internets etc.



(I'm using the latest stable version of foobar, ColumnsUI but with the Track Display thing included with PanelsUI. Shouldn't matter, but I figured it's always best to include that stuff)

foo_ui_panels

Reply #2565
@TheMannen:
ok you have many dependencies, so i would make at first an simple check for these. something like that:
Code: [Select]
// PerSecond 
// Checking...
$if($and($meta(artist),$meta(title),$greater(%length_seconds%,30)),
    $setpvar(enable_scrobble_counter,1)
,
    $setpvar(enable_scrobble_counter,0)
    $setpvar(inactive_scrobble_img,1)
)

$ifgreater(%playback_time_seconds%,$min($div(%length_seconds%,2),240),
    $ifequal($getpvar(inactive_scrobble_img),1,
// Inactive Image

    ,
// Active Image

    )
,
// Inactive Image

// Counter
    $ifequal($getpvar(enable_scrobble_counter),1,
        $ifgreater($div(%length_seconds%,2),240,
            $cwb_hms($sub(240,%playback_time_seconds%))
        ,
            $cwb_hms($sub($div(%length_seconds%,2),%playback_time_seconds%))
        )
    ,)
)

just fill the images in!
the $cwb_hms() function converts from seconds to hh:mm:ss (->here)

hope it works, i didn't tried it...

foo_ui_panels

Reply #2566
Woah thanks, you did a bunch of stuff there, I see...

Anyway, it works, except for one thing: the counter. It's not there, at all. I'm guessing it's some little thing missing somewhere, but I can't figure it out. So if you could take a look at it again maybe.

edit: ok now, what the hell. It worked a second ago and now it doesn't. It doesn't want to display the active image...? Just keeps showing the inactive one. I guess I fucked something up, I'll try again a few times and see if it helps.

edit again: uh, right. I did a little bit of testing but still can't get it to work properly. Basically, all it does is display the inactive image. And now that I think of it, I might have been wrong with the "it worked a second ago" part - I only remember being positively surprised with it only displaying the inactive icon when listening to tracks that were too short/badly tagged. So I guess it never worked. But I'm sure you're on the right track!

foo_ui_panels

Reply #2567
Code: [Select]
$if($and($meta(artist),$meta(title),$greater(%length_seconds%,30)),
    $setpvar(enable_scrobble_counter,1)
,
    $setpvar(enable_scrobble_counter,0)
    $setpvar(inactive_scrobble_img,1)
)

should be:
Code: [Select]
$if($and($meta(artist),$meta(title),$greater(%length_seconds%,30)),
    $setpvar(enable_scrobble_counter,1)
    $setpvar(inactive_scrobble_img,0)
,
    $setpvar(enable_scrobble_counter,0)
    $setpvar(inactive_scrobble_img,1)
)


In fact it would be more appropriate to use normal $puts and $gets instead of pvars for that variable.

foo_ui_panels

Reply #2568
Yup, the icon works perfectly now, thanks!

Now if someone could get the counter to work as well...  I'd take another look at it myself if it wasn't for a) I'm sort of busy with other stuff and b) I'm a fucking noob.

edit: alright, I just looked at it myself and got the counter to display properly when I removed the mm:ss stuff. Now I'll just try and get it to work WITH that stuff...

edit: doh! Never noticed that this was something you actually had to download. That might have been the problem.

Anyway, thanks a lot, both of you!


foo_ui_panels

Reply #2570
Is there somebody that uses Track Info in the dockable panel? My panel is lost every time I restart Foobar.
I've done the searching in this topic and I've seen some people complain about it, but there were more recent posts from people that use that successfully. I've tried 0.14.12 and 0.13.8. Thanks

foo_ui_panels

Reply #2571
So is panels ui still under active development or what? Can't somebody ask the sourcecode of the component at terrestrial if he isn't interested to develop anymore? His component really is/was a revolution for foobar...

It would be cool if the new features got implemented and maybe if there came something like facets to panels ui but with the customization options like say the library filter. so you can see covers and stuff in the different windows.

foo_ui_panels

Reply #2572
It's pretty safe to assume panels development is dead since terrestial hasn't been on these forums since constructive criticism/flaming (depends how you interpret the discussion) of the quality of his panels code. I don't think he has shared the source code either.

foo_ui_panels

Reply #2573
damn that's a shame...

foo_ui_panels

Reply #2574
The status of PUI has been repeated ad infinitum, and it is only a matter of time before an update to foobar2000 breaks PUI altogether.

For everyone that was a fan of PUI, if you know of someone capable of developing a component who also enjoyed PUI, direct them to this thread regarding the feasibility of an HTML/CSS rendering engine component.

As I understand it in that thread, it is possible to implement an HTML/CSS/(JS?) rendering engine panel for ColumnsUI that can host UIE panels within it. I'm pretty sure a component like that could do everything PUI did, and more, and without the titleformatting spaghetti code.