Page 2 of 2

Re: Zoom Player plug-in

Posted: Tue Jul 11, 2017 9:33 pm
by igvk
topix wrote:I'm not the author but i made the changes regarding socket. Please try the attached version.
Sorry, I made a small error. In fact, you should change function to "StreamSelectNav", the opposite of what I wrote.
You have a misspell there in the source ("ionNav").

Re: Zoom Player plug-in

Posted: Tue Jul 11, 2017 9:40 pm
by igvk
topix wrote:can you show me your code changes and how you generate the volume event?

I will include the new version in the next release.
Here's what I changed (a little hacky):

Code: Select all

        self.PlayState = -1
        self.PlayVolume = 0
in class ZoomPlayer.__init__()

Code: Select all

        elif header == "2300":
            state = int(state)
            self.PlayVolume = state
            self.TriggerEvent("Volume", state)
in ValueUpdate()

This way, PlayVolume has the value of the last requested volume.
Probably, it would be better to also update it when it's modified via plugin.

It would actually be much better to define new function AdjustVolume that would take volume delta (positive or negative).

Re: Zoom Player plug-in

Posted: Tue Jul 11, 2017 10:03 pm
by topix
Why store the Volume inside the plugin when it's not used? Any reason for this? I personally wouldn't store the volume because there can be chance that the value will be outdated. Instead always query the actual value.

I would skip this, because as you said the value has also to be changed on setting the volume what makes the changes to the plugin bigger.
If you wanna do it, i'll appreciate it.

Re: Zoom Player plug-in

Posted: Tue Jul 11, 2017 10:16 pm
by igvk
topix wrote:hmm, i'm blind. I can't find "StreamSelectNav" nor "StreamSelectionNav" :shock:
You made a typo, search for "ionNav" in your modified code.
Why store the Volume inside the plugin when it's not used? Any reason for this?
I would skip this, because as you said the value has also to be changed on setting the volume what makes the changes to the plugin bigger.
If you wanna do it, i'll appreciate it.
Volume is stored to use it in EG actions.
Example:

Code: Select all

eg.plugins.ZoomPlayer.plugin.DoCommand("2300"); vol = eg.plugins.ZoomPlayer.plugin.PlayVolume; eg.plugins.ZoomPlayer.exSetVolume(str(vol+int(eg.event.payload)))
Yes, it would be better to implement all this in the plugin itself.
But it's a little less trivial for me, because I don't usually use Python.

Update for v15.6

Posted: Sun Jan 17, 2021 4:41 pm
by Blight
I updated the Zoom Player plug-in to support all the new functions introduced since the last post I've made.

I did not update depreciated functions as not to break backward compatibility.

Re: Zoom Player plug-in

Posted: Sun Jan 23, 2022 6:04 am
by farbox
Thanks for your work Blight!

A couple of questions:

1- How do I know if EG is actually using the latest version of the plugin? I replace the __init__.py file with the latest one from your zip, but in the EG add plugin dialog it always shows as version 1.0, author Bitmonster...
I checked the raw text of the file, and its V 1.0 in there as well of course, perhaps you can include/update your version date and numbering in the plugin text?

2- How can I add a DIRECT action for "playlist sort by duration", for example? I tried the included PLSort function, but that just pops up the little menu for selecting date size etc by mouse ...
I dug a little and i see there is an included extended function in ZP as below:

049 exPLSort Sort playlist New "exPLSort" extended function to sort the current playlist.Possible values are:
0 : Sort by Name
1 : Sort by File Type (file extension)
2 : Sort by File Date
3 : Sort by File Size
4 : Sort by File Path (folder)
5 : Sort by Media Duration (in seconds)
6 : Sort Randomly (random order)

So the functionality seems to be there, how do I make EG access it directly as an EG action?

(PS Just saw that the above function is listed for the newest 16.5 version, which I dont have ;-( )
Thanks!