Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Pako

Pages: 1 2 3 45 6 ... 8
46
MusicBee API / Re: MoveFile(s)
« on: November 09, 2013, 06:54:46 PM »
I thank you for the quick reply.
I'm sorry, it was my fault.
I understood it wrong.
I thought that int[] fromIndices it is a block of tracks where a arguments are start and length of the block.
I was confused by the term Indices, I did not know that it is the plural of index.
I knew only indexes.
Now I understand it correctly and it works as expected.

Thanks, Pako

47
MusicBee API / MoveFile(s)
« on: November 09, 2013, 05:42:40 PM »
One user of EventGhost plugin requested about the integration of function
(I quote his words) move a particular track in the actual playlist up or down.
I am looking for a suitable function in MusicBee API and I found mbApiInterface.NowPlayingList_MoveFiles.
I try to use it, but I have big problems. It does not work as expected.
Can you please explain what should be the function arguments?
I tried this way: mbApiInterface.NowPlayingList_MoveFiles(new int[2]{oldIndex, 1}, newIndex-1), but it does not work.
Can you please verify that this is not a bug?

Thanks, Pako

48
Plugins / Re: EventGhost (remote control and event listener)
« on: November 05, 2013, 07:44:04 AM »
Just for future reference. Where would I be able to change the maxJsonLength value to allow longer Recently Played lists?
I do not know. This is probably some settings in MS Visual Studio.
I will try to find out more about it.
Now the only thing that bugs me is the artist image not showing on the Play button on the phone. Is there another way of pulling that from MB?
I do not know how I can help:
I have only PC and Android smartphone available.
In all browsers album cover normally visible.
And even in MS IE too (but there are other shortcomings).
I recommend experimenting with the script.js file (keywords #thumbnail and  #playbutton).

Pako

49
Plugins / Re: EventGhost (remote control and event listener)
« on: November 04, 2013, 10:39:27 AM »
I thank you for your interest in the plugin and also for your patience during installation.
It would be very difficult to help you remotely.

Also, the phone gets really hot when on the page. Could it be that the constant polling of the song position is the reason for that?
Yes, probably yes.
But it's not just a matter of position. The script is regularly asked whether "anything new?". If yes, do update page. At the same time it asking for a position.
Now there is a timeout 500 ms. You can try to extend this interval.
It is on line 137 in file script.js.

so after I got everything working (except the artist image), now I have a different problem. Whenever I launch the webpage on the phone the PC running MB throws an error. Looks like something with the EG plugin.

Eg2MbMessages
unhandled exception has occured in your application.
Error during serialization or deserialization using JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at MusicBeeEgPlugin.MessageWindow.IsLocalPath(String pth)
   at MusicBeeEgPlugin.MessageWindow.WndProc(Message& message)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I reinitialized everything (uninstalled, removed setting files, reinstalled) still there.
Note that I can just ignore this message or continue and everything is working. It only happens on the first initialization and then is silent.


I would like removed this inconvenience, but I have a little information and in my case this does not happen.
It might help to attach here the corresponding parts of files ErrorLog.dat (MusicBee debug log) and <USER>\AppData\Roaming\MusicBee\EventGhost\DebugLog.txt (mb_EgPlugin debug log).

Pako

50
Plugins / Re: EventGhost (remote control and event listener)
« on: November 03, 2013, 07:06:55 AM »
...
copied webserver folder (www-musicbee) into mb plugins folder
...
1) I think that the  mb plugins folder is not a suitable location for these files (there should really be only MusicBee plugins). However, it does not seem to cause problems.
2) You write, that you are opening a website on a smartphone. I do not know what it is and what kind of browser you are using. This can be a problem. Therefore it would be helpful to first open a webpage directly on the computer that is running EventGhost and MusicBee (as I described it in my previous post). Your browser must support HTML5.
3) Please test HTML5 support on your smartphone here: http://html5test.com/
4) Please write here, what were the results of the tests referred to in points 2) and 3)

Pako

51
Localization / Re: Czech Translation
« on: October 13, 2013, 08:25:24 AM »
Thanks, but:
On the About ... dialog
there is:
Localisation by MusicBee forum members:
   Czech (Pako)
   ...
But there should be:
   Czech (Pako and GVG)
We must not forget that much of the translation work done also GVG.

Pako

52
Plugins / Re: EventGhost (remote control and event listener)
« on: September 17, 2013, 12:53:35 PM »
I did a web GUI for this plugin.
Here you can see how the control panel looks in a web browser:
Playing:

Paused:

Plugin mb_EventGhostPlugin_Setup.exe download here.
Everything else (what you'll need) download here.
After unpacking (I assume you have installed EventGhost and MusicBee)
- Run mb_EventGhostPlugin_Setup.exe (follow the instructions listed there)
- The folder www-musicbee place the anywhere it suits you
- File musicbee-webserver.xml you must open in EventGhost and set the necessary parameters of both plugins.
In particular, you have to (probably) change the path to the folder www-musicbee.

Now you can open the page in a web browser http://localhost:8080/index.html (use the same port as the Webserver plugin settings).
Note: If you open a page from another computer (or smartphone for example),
then you (obviously) need to replace "localhost" corresponding IP address.

Pako

53
Localization / Re: Translator Q&A
« on: September 01, 2013, 09:13:22 AM »
The introduction of new conventions for plurals is great.
But it could be even better.
I found a few strings (IDs), for which should also be introduced similar conventions:
Code
#TM.msg.hbaitl3d#
#TM.msg.hbaitlw#
#TM.msg.hbaitlm#
#TM.msg.mtcf#
#TM.msg.hbat#
#Sys.ctl.DCEF14B7#
#tTag.msg.  genres#
#Dup.col.352FB09C#
#AutoSD.msg.0in1mins#
#AutoSD.ctl.493A25AE#
#Main.msg.mins#
#Main.msg.hours#
#Main.msg.days#
#Scan.msg.Frac-a#
I suppose that this list is not exhaustive (and it is possible that something does not belong there).

Pako

54
MusicBee API / Re: MessageBox as an event
« on: August 12, 2013, 12:19:24 PM »
try-catch in plugin may help to avoid such message boxes
It seems that I wrote it incomprehensible.
Imagine this scenario:
1) You have a PC with a running MusicBee. Monitor is switched off.
2) Do you have a smartphone, with which you control MusicBee.
3) You will choose an internet radio station, but it is currently unavailable.
4) MusicBee displays MessageBox (on the monitor, which is turned off).
I would like to see the same message on smartphone.
I think that without the introduction of a new type of event that can not be done.

Pako

55
MusicBee API / MessageBox as an event
« on: August 12, 2013, 06:23:18 AM »
I have another feature request on the API.
I created a Web UI that uses EventGhost plugin.
I'm playing with it now (actually doing tests).
And I ran into one small problem. I am using this "remote" chosen one radio station and waited to begin play.
But unfortunately it did not happen. And I did not know why.
I had to go to the PC (which runs MusicBee) and then I saw this:

I think it is necessary to introduce a new event. It should carry (as an argument) the message content.
I have, of course, mean all similar MessageBoxes like the one above.

Thanks, Pako

56
Plugins / Re: EventGhost (remote control and event listener)
« on: August 09, 2013, 01:55:11 PM »
I just released a new version (0.0.4).
It contains many new features. For example:
1) Added action "Get static playlists"
2) Added actions "Add song to playlist" and "Add Currently playing song to playlist"
3) Added actions "Toggle mute", "Toggle shuffle" and "Toggle repeat"
4) Added actions "Increase / Decrease volume" and "Get track info"
5) Added actions "Get thumbnail" (Now Playing and Library groups)

Now I am preparing a sample to create a relatively comfortable web interface for this plugin.

It is possible that some minor changes are not backward compatible. I apologize to people who encounter it.

Pako

57
MusicBee API / Re: List of static playlists
« on: August 08, 2013, 11:50:46 AM »
Yes it seems that ".Auto"  is auto-playlist
I thank you very much, you saved me. Everything is therefore as I assumed ....
After all - this works as expected:
Code
        internal string pQueryPlaylists(bool stat)
        {
            if (mbApiInterface.Playlist_QueryPlaylists())
            {
                string f = "dummy";
                Dictionary<string, string> dict = new Dictionary<string, string>();
                string name = String.Empty;
                while (f != null)
                {
                    f = mbApiInterface.Playlist_QueryGetNextPlaylist();
                    if (f != null)
                    {
                        if (stat) {
                            Plugin.PlaylistFormat pf = mbApiInterface.Playlist_GetType(f);
                            if (pf == Plugin.PlaylistFormat.Auto || pf == Plugin.PlaylistFormat.Radio) { continue; }
                        }
                        name = mbApiInterface.Playlist_GetName(f);
                        if (!dict.ContainsKey(name)) dict.Add(name, f);
                    }
                }
                return Dict2Json(dict);
            }
            return String.Empty;
        }

Thanks again, Pako

58
MusicBee API / Re: List of static playlists
« on: August 08, 2013, 06:21:20 AM »
all of the functions have been in the API for a long time so you should already have access to them.
if you want static playlists only then you need to exclude Radio and Smart
It seems that I am in this case "slow on the uptake," or we "talk at cross Purposes".
I understand practically everything.
Just my "Microsoft Visual C# 2010 Express" will not let me write the expression "PlaylistFormat.Smart".
This is not possible because the "Smart" does not exist in the enumerator "PlaylistFormat".
So I can add it there?
What integer I have to assign it?
Or should I replace the "Auto" item?

I'm very sorry and thank you.
Pako

59
MusicBee API / Re: List of static playlists
« on: August 07, 2013, 07:52:19 PM »
I thank you (boroda74 and Steven) very much for your explanation and patience.
Now I'm completely clear.
Only the "smart" I really can not use:
Code
        public enum PlaylistFormat
        {
            Unknown = 0,
            M3u = 1,
            Xspf = 2,
            Asx = 3,
            Wpl = 4,
            Pls = 5,
            Auto = 7,
            M3uAscii = 8,
            AsxFile = 9,
            Radio = 10,
            M3uExtended = 11,
            Mbp = 12
        }
Somewhere I can download a new version of the API?

Pako

60
MusicBee API / Re: List of static playlists
« on: August 07, 2013, 06:11:40 PM »
Anything that is not:
PlaylistFormat.Smart
PlaylistFormat.Radio

is a static playlist

I'm very sorry, but I did not understand your response.  :(
This is certainly due to my poor English.
In addition - I do not know the "smart playlist".
In my version of the API does not exist.
Can someone please clarify?

Pako

Pages: 1 2 3 45 6 ... 8