Plugin: TvWishList for MP2 (1 Viewer)

huha

Extension Developer
January 3, 2008
890
556
Germany Germany
  • Thread starter
  • Moderator
  • #21
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.
 

morpheus_xx

Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,390
    6,966
    Germany Germany
    Country flag
    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.
     

    huha

    Extension Developer
    January 3, 2008
    890
    556
    Germany Germany
    • Thread starter
    • Moderator
    • #24
    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:

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    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.
     

    huha

    Extension Developer
    January 3, 2008
    890
    556
    Germany Germany
    • Thread starter
    • Moderator
    • #27
    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
     

    huha

    Extension Developer
    January 3, 2008
    890
    556
    Germany Germany
    • Thread starter
    • Moderator
    • #28
    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
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,390
    6,966
    Germany Germany
    Country flag
    @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.
     

    huha

    Extension Developer
    January 3, 2008
    890
    556
    Germany Germany
    • Thread starter
    • Moderator
    • #30
    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.
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    joecrow 1.25.0 Radio Time plugin fails after Resume from Sleep with MP 1.25 Bugreports 3
    P MP2: US user, OTA - can NOT get SchedulesDirect plugin to work on MP1 or MP2 --> how do I get OTA schedule? General 5
    E aktuelle englische Forums Webseite von - Showtime Plugin v3 Plugins & Erweiterungen 4
    mrmojo666 [Tv Server Plugin ]Direct Show Video Control Plugin 0.0.0.1 for Hauppauge PVR cards MediaPortal 1 Plugins 0
    joecrow MultiShortcut Plugin (Uavailable) in DWHD skin General Support 58
    vapourEyes Building TV Plugin General Development (no feature request here!) 49
    Golf4 Nach Windows-Updates läuft TV-Plugin nicht mehr Allgemeines Support- und Diskussionsforum 0
    joecrow How about a Launcher plugin for MP1? MediaPortal 1 6
    D [solved] TVServer Plugin must be missing something. General Development (no feature request here!) 1
    framug Nouveau plugin XmlTvFR pour récupérer le guide télé français Kazer / ZguideTv (WebEPGfr) 11
    emphatic Allow remote control mapping of all plugins Improvement Suggestions 0
    D Where should plugins be located on hard drive? General Support 0
    D how to disengage from one version of a plugin to use another Newcomers Forum 0
    cbr954rr How to disable a pre-configured plugin? General 2
    mrmojo666 [Plugin]Marantz Control Plugin 0.0.0.2 MediaPortal 1 Plugins 2
    mrmojo666 beginner: trying to write a plugin, need help to catch event General Development (no feature request here!) 3
    framug [Rejected] Fix PowerScheduler plugin for MP2 single seat Submit: Code Patches 9
    doskabouter [Question] Stale plugins Developer Discussions 9
    M MP1 stops responding after Starting Plugins General Support 14
    Terra LAVFilter Plugin cannot be updated (MP1.23) MediaPortal 1 Plugins 10
    L Mediaportal 1.21 and Windows 10: user schedules de-activated when powerscheduler plugin is selected General Support 1
    C Can the XmlTv Plugin handle 600+ channels? General 3
    M Online Video Plugin V.2.32 keine Installtion unter MediaPortal 1.22 ? TV / Streaming 3
    emphatic Pictures in the cloud - would a plugin be possible for services like Google Photos MediaPortal 1 Plugins 1
    C where is the Online Videos plugin General Support 1
    Similar threads

























    Top Bottom