Ok, I see the problem now. Maybe Dale has a similar problem. First off, I attached an updated MPChannelUpdater.dll file to this email. Could you try it out to verify that it doesn't crash for you. If it works, tomorrow I will update source code to 0.0.0.2 and release.
There were a few problems. By default, I was trying to parse the channel number from the name. I've changed to just use the channel number in the database as default when sorting channels.
By parsing channel number, I mean if the channel name was "512 MAX", I was trying to parse "512" from it using a regular expression. It works for that case. However, in your database, there was one channel named "KCSMMHZ" in which the channel number would parse to "". When I tried to convert that to an integer, it would crash. I've updated the code to have a default channel 0 and a try/catch statement, so if it cannot parse a channel number it defaults to 0.
Now, another problem will occur for your digital channels. My regular expression for parsing channels is setup to only parse integers basically. So "11-1 KNTVDT" parses to "1" the way I have it setup now. I will have to think about how to handle that case. I can parse the channel number part with a different regular expression, but I don't know how I will sort it quite yet. For now, it is only using the channel number that is already populated in the database when you hit sort.
Sorry for long winded explaination. Hope it works.
I'm running some system CPU and memory stress tests (my system crashes A LOT) so I will test this sometime during the weekend.
I'm wondering how this plugin will differ from doing a basic sort when clicking on the Channel column in the TV Channel listing in the configuration.exe
Just curious. I hope your plugin enhances or beats out this built in "feature"
Eventually I will integrate my plugin with the MP source code. There were a couple of issues that this plugin was to address. As you pointed out you can sort channels by the channel column, BUT the channel number has to be populated in the database.
If you're not using the Zap2It plugin, that isn't automatically done. In fact, it didn't automatically happen for me for some reason, maybe I didn't wait long enough after it downloded. If you want to set all of your channels to external channels, its not so easy right now with default MP setup.
The other thing is that it will automatically sort the channels in groups as well. I don't think that can be done easily now, but is easily added to the source code as soon as I get some time to do that. For now, its in the plugin.
I have found that you have to wait at least 20-30 minutes in order for the Zap2it plugin to work it's full magic of populating the TV Channel database. I have observed it several times and one must be patient.
I will be nice when MP can do this for any country and in any configuration
error tying to config: System.MethodAccessException: MediaPortal.Util.Config.Get(Dir)
Installed into the >plugin>process folder, opened mpsetup config app to config it and the plugin crashed when launched. don't know how much of the crash file is needed so I'll put a couple of pages:
I'm a newbie and am still trying to get MP working/functional, not yet though.
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.MethodAccessException: MediaPortal.Util.Config.Get(Dir)
at MediaPortal.Util.MPChannelUpdater.Open()
at MediaPortal.Util.MPChannelUpdaterSettings..ctor()
at MediaPortal.Util.MPChannelUpdaterConfiguration..ctor()
at MediaPortal.Util.MPChannelUpdaterPlugin.ShowPlugin()
at MediaPortal.Configuration.Sections.PluginsNew.itemConfigure_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
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)