margro / xbmc

XBMC PVR Repository for the development of the MediaPortal and ForTheRecord pvr addons
http://www.scintilla.utwente.nl/~marcelg/xbmc/
Other
32 stars 14 forks source link

Order of channels in channel groups #34

Open tih2010 opened 12 years ago

tih2010 commented 12 years ago

Hi!

First of all: Great work!! Please keep it up!!

When importing channels and channel groups from MediaPortal TVServer, the order of the channels in the group it created myself is broken. I tried all combinations of the "import channel options", but the order is always the same (and wrong).

Using

Best,, Wolfram

tih2010 commented 11 years ago

Hi!

Since I am a :NET developer myself I thought I should do some research here, too.

In the TVServer XBMC Server plugin in the method public List GetChannelInfosForGroup(string groupName) you seem to copy values of the requested group:

(the variable names are probably wrong - I just took a little peek using Dotpeek)

GroupMap current2 = enumerator2.Current; ChannelInfo channelInfo = new ChannelInfo(); channelInfo.channelID = current2.ReferencedChannel().get_IdChannel().ToString(); channelInfo.name = current2.ReferencedChannel().get_DisplayName();

That (channel name and channelId) is exactly what is imported to XBMC. Now... taking a look a the source code of the GroupMap-class you also find a member called "SortOrder" which, I guess, reflects the order that a user chose for his/her channels.

So why not add a "SortOrder" to your ChannelInfo-class and do a a list-sort by that member in the end of the method?

Best, Wolfram

margro commented 11 years ago

The problem is that I can't learn XBMC the sortorder field from MediaPortal. I can reorder the channel list based on the sortorder to improve the situation for the main channel list, but this won't work with different sortorders for other channel groups.

Will try your suggestion to sort the default "All channels" group based on the sort order.

tih2010 commented 11 years ago

Hi Marcel! That sounds unfortunate. Why is that? Does XBMC not support different channel orders for groups? Or is there no way to import them by group into XBMC? I don't have any contact to the XBMC-people, but this sound like something we should address there.

XBMC is a great program. From my point of view it is somewhat better than MediaPortal. MP is coool, too, but sooo unstable. We got a new (huge :-) ) TV we run with MP. And my girl-friends keeps picking on me, because MP crashes all the time. I would love to show her XBMC, but without good TV-support she'd kill me :-)

Best, Wolfram