Latest WACUP public preview for x86 & x64 is build #20202 (September 28th 2024) (x86 & x64 changelogs)
Latest restricted WACUP beta release is build #20686 (December 23rd 2024) (x86 & x64 changelogs)


NOTE: Beta testers are added in a limited & subjective manner as I can only support so many people as part of the beta test program to keep it useful for my needs.

Unless I think you're going to be helpful, not all requests will be accepted but might still be later on. Remember that beta testing is to help me & the limitations currently works for my needs for this project.

Author Topic: Queuing with JTFE from media library  (Read 12938 times)

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 4824
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: Queuing with JTFE from media library
« Reply #15 on: April 30, 2020, 02:40:25 PM »
All I've done is implement the request that was asked for but I'd assumed it wouldn't be fit for purpose so it might be better I remove that hack. So if anything, all of the requests for command-line options aren't going to be fit for purpose (as per my next comment).

Though whatever solution is going to be used is going to have poll for the most part unless it's done with a fully native plug-in (tbh I can't remember what the solution that's been out together is using to do things).

I don't keep the inter-session queue file around & updated when it's running normally as that causes a performance impact on normal running to be re-saving it that I wanted to avoid.

-dro
« Last Edit: April 30, 2020, 02:42:23 PM by dro »

etsaman

  • Beta Tester
  • Hero Member
  • *****
  • Posts: 67
    • View Profile
Re: Queuing with JTFE from media library
« Reply #16 on: May 01, 2020, 04:00:31 AM »
Thanks for the feedback Darren,

In order to limit the impact on performance, would there be a way to replicate the queue in gen_jumpex.m3u8 and only update when there is a change to the queue?
The rest could be done easily for the plugin, as it would be similar to the playlist file which is monitored for file changes.
Could be set as a config option (enabled/disabled) if performance could still be affected.

Let us know what you think,
hope this could be a reasonable solution.

Thx for your help!


« Last Edit: May 01, 2020, 04:09:13 AM by etsaman »

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 4824
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: Queuing with JTFE from media library
« Reply #17 on: May 06, 2020, 04:48:05 AM »
I'll make a change in the next build.

-dro

etsaman

  • Beta Tester
  • Hero Member
  • *****
  • Posts: 67
    • View Profile
Re: Queuing with JTFE from media library
« Reply #18 on: May 06, 2020, 05:34:04 AM »
Thanks Darren. Really appreciate it;

Hopefully, Jon's work on the Homeseer plugin will contribute to WACUP project's visibility.

Lots of people love the WACUP interface but also need a way to interface with it in home automation environments;  including access to all the great features like JTFE ;)

Will continue Beta testing and keep you updated once your next build is out.

Cheers,

jon00

  • Full Member
  • ***
  • Posts: 12
    • View Profile
Re: Queuing with JTFE from media library
« Reply #19 on: May 06, 2020, 12:01:12 PM »
For the window handling you should be able to use the following with the next build:
Code: [Select]
#define IPC_GETWND 260
/* (requires Winamp 2.9+)
** HWND h=SendMessage(hwnd_winamp,WM_WA_IPC,IPC_GETWND_xxx,IPC_GETWND);
** returns the HWND of the window specified.
** Note: this does not support the WACUP message addition
**       of IPC_GETWND_MAIN since you have to use a valid
**       main window HWND to start with, need I say more?
*/

#define IPC_GETWND_MAIN -1 // use one of these for the param
#define IPC_GETWND_EQ 0    // see api notes on what is valid
#define IPC_GETWND_PE 1    // (IPC_GETWND_MAIN new to WACUP)

//#define IPC_GETWND_MB 2  // deprecated from 5.22+ when the
                           // minibrowser support was killed

#define IPC_GETWND_VIDEO 3
#define IPC_GETWND_ML 4    // added WACUP 1.0.11+ but may not
                           // be applicable based on install!

#define IPC_ISWNDVISIBLE 261 // same param as IPC_GETWND
/* (requires Winamp 2.9+)
** This returns the current visible state of the window.
** Under WACUP using IPC_GETWND_MAIN as the param is
** supported & will return the main window state.
*/

#define IPC_SHOWWND 262 // same param as IPC_GETWND
/* (added WACUP 1.0.11+)
** This will show the specified window if its closed
** and it will return non-zero on success. If the
** window is already visible then nothing is done
** though the return is zero for you state usage.
*/

#define IPC_HIDEWND 263 // same param as IPC_GETWND
/* (added WACUP 1.0.11+)
** This will hide the specified window if its open
** and it will return non-zero on success. If the
** window is already hidden then nothing is done
** though the return is zero for you state usage.
*/

IPC_SHOWWND & IPC_HIDEWND are the main WACUP additions (the other change being some ML & main window specific stuff on the older APIs). That should allow you to hopefully open / close those windows as needed along with using the returned state & IPC_ISWNDVISIBLE if needed beforehand to deal with state persistence as needed.

Will provide the JTFE queue saving details once that's been finished.

-dro

Just to confirm:

All Hwnds and other methods work fine.
'What's playing' settings patch working.

Looking forward to the next beta with the JTFE queue manager modification!

Many thanks again.

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 4824
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: Queuing with JTFE from media library
« Reply #20 on: May 06, 2020, 04:57:48 PM »
That's good to know the new / clarified messages are working.



I've removed the temp polling commandline option & instead you'll need to call /ETSAMAN_ON or /ETSAMAN_OFF depending on your needs to enable/disable the mode when WACUP isn't running.

It'll then update / remove the queue playlist file depending on the state of the queue (no queue = no file still).

There will be a small delay between an item being added / removed from the queue but that's in-line with how other aspects of the plug-in update. You may also get some changes even if nothing has changed but for speed I'm piggy backing on the UI updating code so I know it'll update when there's a change even if it might do it a few times in quick succession - you can probably self filter that out depending on how you're monitoring file changes & the interval between such changes being noticed.

That should hopefully be ok as a starting point now.

-dro

jon00

  • Full Member
  • ***
  • Posts: 12
    • View Profile
Re: Queuing with JTFE from media library
« Reply #21 on: May 06, 2020, 06:56:25 PM »
That's fine. I already have it working with the m3u8 file being watched for changes but currently using a timer to poll the command line so that the file updates. With your change, I will just need to remove the timer as the file watcher raised event does the work.

Is the new CL switch permanent (remembered) or need to be done before each WACUP session?

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 4824
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: Queuing with JTFE from media library
« Reply #22 on: May 06, 2020, 10:35:35 PM »
Is the new CL switch permanent (remembered) or need to be done before each WACUP session?

It'll be remembered between sessions once set as long as the config isn't corrupted / removed.
Also build 5500 is now available with the changes.

-dro
« Last Edit: May 06, 2020, 11:21:36 PM by dro »

jon00

  • Full Member
  • ***
  • Posts: 12
    • View Profile
Re: Queuing with JTFE from media library
« Reply #23 on: May 07, 2020, 11:58:37 AM »
Is the new CL switch permanent (remembered) or need to be done before each WACUP session?

It'll be remembered between sessions once set as long as the config isn't corrupted / removed.
Also build 5500 is now available with the changes.

-dro

Perfect! Works a treat.

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 4824
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: Queuing with JTFE from media library
« Reply #24 on: May 07, 2020, 12:58:35 PM »
Glad to hear it 👍


-dro