Plugin: TvWishList for MP2 | Page 3

Discussion in 'TvWishList' started by huha, July 25, 2012.

  1. huha
    • Premium Supporter

    huha Extension Developer

    Joined:
    January 3, 2008
    Messages:
    890
    Likes Received:
    550
    Gender:
    Male
    Ratings:
    +622 / 0
    Home Country:
    Germany Germany
    Show System Specs
    I am getting close to releasing my first native Tvserver plugin for TvWishlist (thanks again for your help on tha native sql queries, which works great now), but still do have a couple of questions left:
    (I am still using the official release of MP2alfa3 with one single DVB-S card)

    1) Problem in GetConflictingSchedules in ScheduleManagement.cs
    I do not understand how this function should work
    The line
    IEnumerable<Card> cards = CardManagement.ListAllCards(CardIncludeRelationEnum.None); //SEB
    in private static bool AssignSchedulesToCard causes that every schedule cannot be assigned to a card.
    If i replace it (what i did in my plugin) by
    IList<Card> cards = CardManagement.ListAllCards(); //huha
    everything works fine.
    With the original line i had always a false return from the method CanViewTvChannel(Card card, int channelId) in CardManagement.
    The card.ChannelMaps were always null.
    When i replaced it with
    IList<Card> cards = CardManagement.ListAllCards();
    the method returned the correct value and everything is working as expected.

    2) Titan Skin
    The titan skin is ignoring my TvWishList picture in TvWishListMP2\Skin\default\images\55b7087f-58c4-419a-bdc7-119753aa8bfc.png
    this works with fine with the Reflexion skin and the Rising Skin. Is there anything else needeed to overcome this?

    3) Hostname/IPaddress for multiseat configuration
    Is there an easy way to get the ipaddress of the MP2 server computer from the client plugin?
    In the first release i will use for the native TV provider my named pipes to communicate between plugin and server. I could force the user to give the ip address in a setting, but it would be much more user friendly if this address would be provided. Once i understand more of the UPnP service I plan to change.

    4) Communication Concept between native tv server plugin and a client
    I studied the example of the SlimTv client and how the communication with the MP2 server is done here via UPnP to the client. If I need now an extension for my tvserver plugin, do i need to write my own own service like SlimTv.Service and use UPnP? For simple communication could I use the MP2 message concept between the tvserver plugin and the client plugin? What would be the recommended concept?
    I plan to study more thew UPnP concept described by morpheus_xxx in:

    All access to settings is done via the ISettingsManager service. It can be used to serialize any class as XML, applying default values, store it per-machine or per-user base.
    An UPnP-service (ServerSettingsService) exposes "Get/Set" of settings in a generic way (https://github.com/MediaPortal/Medi...ttings.Service/UPnP/ServerSettingsImpl.cs#L36, so simple but powerful)
    The Client loads settings from this service (using https://github.com/MediaPortal/Medi...ttings.Client/UPnP/ServerSettingsProxy.cs#L33)
    An example configuration class for server-importer-settings is here: https://github.com/MediaPortal/Medi...els/ServerImporterWorkerSetupModel.cs#L47-L80
    When settings are changed, they are sent back to server where they are applied (can be done immediately, because there is a message based "SettingsChangeWatcher" that notifies you about changes)



    Is there a recommended way to send messages between a native tvserver plugin and the tv server setup? Should I use the Mp2 messaging service here?

    5) Performance of native tvserver and sql data base
    i realized that the performance of my plugin with the native tvserver is a lot slower than the MP1 plugin and i saw some posts about a new SQLite database. Is it a correct understanding that the SlimTv client will be adopted to the new SQLite database? I guess a major part of the perforamnce problem is due to my wrapper class and using named pipes instead of the UPnP service which I plan to change next in near future.
     
    • Like Like x 3
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    11,017
    Likes Received:
    4,749
    Ratings:
    +6,795 / 11
    Home Country:
    Germany Germany
    Show System Specs
    Great work huha!

    @gibman, @Sebastiii, maybe you can check the 1st issue?

    2) I've not checked it, but I think I used .jpg as extension. Try to simply rename your hover image to .jpg (will be decoded as well).

    3) I also need to find the server's address for using the Fanart service. Please check this code part for an example:
    https://github.com/MediaPortal/Medi...Service.Client/FanArtImageSource.cs#L181-L212
    It uses the adress of the attached server.

    4) Good question, I need to think more about it. The ServerSettingsService is very powerful already, but a new generic "MessagingService" to pass any message over different systems would be even better.

    5) @MJGraf puts a lot of work into SQLite adoption. It will be the default DB engine for new releases. How do you access the DB? Are you using own connections?
    Can you please share some SQL statements that are slow? Maybe we can tweak the DB model with more indexes etc.
    I don't expect the net.pipe/UPnP layer to be the bottleneck here.
     
    • Thank You! Thank You! x 1
  4. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,256
    Likes Received:
    6,211
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,214 / 9
    Home Country:
    France France
    Show System Specs
    Hi :)

    I wiil try to look but right now -> no idea and i can't really debug TVE35 on my win8.1 for now :(
     
    • Thank You! Thank You! x 1
  5. huha
    • Premium Supporter

    huha Extension Developer

    Joined:
    January 3, 2008
    Messages:
    890
    Likes Received:
    550
    Gender:
    Male
    Ratings:
    +622 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Morpheus_xx, Sebastii, thanks!
    2) The .jpg picture works now fine with Titan
    3) I tried yesterday and can with your method get the last hostname and the ipv6 ip address. I found a bug for single client in my program, but with this I believe i can fix it. So this should be closed, too.
    4), 5) I believe the slow performance of TvWishList with the native tv service comes from my implementation. I have used a wrapper class for channels, schedules,... to reuse the code from the MP1 server. In addition I use self made named pipes for communication for the native tv server. I plan to change that and use the UPnP service for the settings in the future. I have a good example to study from your previous posts.
    A general messaging concept from Tv plugin to client plugin would be great and in my mind needed also for future plugins. Maybe a simple test plugin showing this concept would be great for reusing the code.
    Update: Maybe the MP2 messaging concept could be used for TV plugins, too. This is easy to use and very powerful.

    Sebastii, i was planning to migrate to Win 8.1 this week end, but stopped after your post. Guess this will be fixed with the next release.

    One more question:
    I am having on Win8 sometimes problems to stop the Server service with my installer (using net stop TvService, or net stop MP2-Server). I was thinking about killing the service using process.kill, if it cannot be stopped . This worked fine for me, but I am afraid that this could cause in specific user configurations data loss or corrupted data bases. I assume that´s why the MP1 team has not done that before. Anny comments if this is a good or bad idea?
     
    Last edited: November 24, 2013
  6. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,256
    Likes Received:
    6,211
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,214 / 9
    Home Country:
    France France
    Show System Specs
    Hi,
    I think TVE35 does not work with win8 too for me but i'm on win8.1, i need to retry :)
    MP1 works for sure.
     
  7. huha
    • Premium Supporter

    huha Extension Developer

    Joined:
    January 3, 2008
    Messages:
    890
    Likes Received:
    550
    Gender:
    Male
    Ratings:
    +622 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Sebastiii, it works for me on Win8 (64bit)
     
    • Thank You! Thank You! x 1
  8. huha
    • Premium Supporter

    huha Extension Developer

    Joined:
    January 3, 2008
    Messages:
    890
    Likes Received:
    550
    Gender:
    Male
    Ratings:
    +622 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Sebastii,
    one correction, I learned the hard way yesterday that the SlimTv plugins in the public plugin section do not work with Win8.
    I had from the development forum a special version, which i have linked at the first page.
    - MP2 Alfa3 with latest SlimTv plugin
     
    • Thank You! Thank You! x 1
  9. huha
    • Premium Supporter

    huha Extension Developer

    Joined:
    January 3, 2008
    Messages:
    890
    Likes Received:
    550
    Gender:
    Male
    Ratings:
    +622 / 0
    Home Country:
    Germany Germany
    Show System Specs
    I have released TvWishList 1.4.0.0 (download at the first post) which contains my first native Tv server plugin (alfa version).
    As stated before, performance is slower compared to the Mp1 tv server, but this will be worked on in the next versions.
    It should be fully functional like the MP1 version.

    Thanks again for your help and patience to answer my questions.

    Detailed Version History:
    V1.4.0. 0:
    - new TvWishList Logo from Pog used for MP1, MP2 skins and installer
    - save parsing of integers and dates
    - new: native Tvserver plugin for MP2
    - installer updates
     
  10. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    11,017
    Likes Received:
    4,749
    Ratings:
    +6,795 / 11
    Home Country:
    Germany Germany
    Show System Specs
    @huha, I just tried to run the 1.4 version with MP2 NativeTV (and MPExtended) plugin. I experienced a few issues:
    • MP2 Client will hang if the plugins is present, but the Wishlist plugin inside NativeTV is not enabled yet (reading settings from pipe hangs)
    MPExtended plugin:
    • TvWishlist seems not to use the MPExtended settings for defining Server, user name and password. My one was configured to use instance on remote PC, but TvWhislist got an error requesting local pipe (which is not present)
    I also have a few more comments about integration into MP2/TVE35, architecture and code style, but we should discuss it later in detail.
     
  11. huha
    • Premium Supporter

    huha Extension Developer

    Joined:
    January 3, 2008
    Messages:
    890
    Likes Received:
    550
    Gender:
    Male
    Ratings:
    +622 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Hi morpheus_xx,
    i am not ready to support MP2alfa4 yet, i am still on alfa3. Unfortunately I have no time for programming right now, and this will continue over the next couple of weeks. I would very much appreciate a discussion on integration into MP2/TVE35, architecture and code style at a later point and will ping you once I am ready to continue with the plugin.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!