Plugin: MySQL database provider - better performance and no size limit for your MP2-MediaLibrary (1 Viewer)

Valk

Portal Pro
February 25, 2006
302
108
Australia Australia
Definitely a nice speed improvement on imports.

Sadly having an issue when trying to view videos in the client (only tried video so far).

It seems to work all the way up until you try and view the episodes of a show (movie or series).

Attached are the server and client logs (the interesting part is in the server log).

Code:
[2012-12-01 20:39:55,145] [391038 ] [23       ] [WARN ] - SOAPHandler: Error invoking UPnP action 'Search'
System.ArgumentException: The datatype 'Byte[]' is not supported as a DB datatype
   at MediaPortal.Backend.Services.Database.DBUtils.ReadSimpleDBValue(Type type, IDataReader reader, Int32 colIndex)
   at MediaPortal.Database.MySQL.MySQLDatabase.ReadDBValue(Type type, IDataReader reader, Int32 colIndex)
   at MediaPortal.Backend.Services.MediaLibrary.QueryEngine.CompiledMediaItemQuery.QueryList()
   at MediaPortal.Backend.Services.MediaLibrary.MediaLibrary.Search(MediaItemQuery query, Boolean filterOnlyOnline)
   at MediaPortal.Backend.Services.ClientCommunication.UPnPContentDirectoryServiceImpl.OnSearch(DvAction action, IList`1 inParams, IList`1& outParams, CallContext context)
   at UPnP.Infrastructure.Dv.DeviceTree.DvAction.FireActionInvoked(IList`1 inParams, IList`1& outParams, CallContext context)
   at UPnP.Infrastructure.Dv.DeviceTree.DvAction.InvokeAction(IList`1 inParameters, IList`1& outParameters, Boolean checkSignature, CallContext context)
   at UPnP.Infrastructure.Dv.SOAP.SOAPHandler.HandleRequest(DvService service, Stream messageStream, Encoding streamEncoding, Boolean subscriberSupportsUPnP11, CallContext context, String& result)
The server is run on my NAS running win2k12 std x64 and the shares are local (not that any of that should matter based on the error).

Oh and I just installed the latest stable MySQL 5.5 x64 binary.

Very stock setup, just installed the NAS and media portal 2 (with latest locally compiled dlna plugin) and the MySQL provider changes applied.
 

morpheus_xx

Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,749
    7,112
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #12
    Thanks, this issue needs to be fixes, it's only a "3 line" change. Will take care for it this weekend :)
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,749
    7,112
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #13
    Bug is fixed already (and it were only 2 lines :D). New DB plugin attached in first post (_v02). Thanks for reporting!
     

    Valk

    Portal Pro
    February 25, 2006
    302
    108
    Australia Australia
    Thanks works much better now. Still got a few general issues with mp2 but I'll try to identify the causes for those and submit bug reports when I have time.
     

    MaxMan23

    MP Donator
  • Premium Supporter
  • September 8, 2007
    380
    48
    Germany Germany
    Does it work with the NativeTVTest? I got an Error.

    System.TypeInitializationException: Der Typeninitialisierer für "Mediaportal.TV.Server.TVDatabase.EntityModel.ObjContext.ObjectContextManager" hat eine Ausnahme verursacht. ---> System.Configuration.ConfigurationErrorsException: Der registrierte .Net Framework-Datenprovider kann nicht gefunden bzw. geladen werden.
    bei System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow)
    bei System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
    bei System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
    bei System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
    bei System.Data.EntityClient.EntityConnection..ctor(String connectionString)
    bei System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString)
    bei System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName)
    bei Mediaportal.TV.Server.TVDatabase.Entities.Model..ctor()
    bei Mediaportal.TV.Server.TVDatabase.EntityModel.ObjContext.ObjectContextManager..cctor()
    --- Ende der internen Ausnahmestapelüberwachung ---
    bei Mediaportal.TV.Server.TVLibrary.TvController.Init()
    bei Mediaportal.TV.Server.TVLibrary.TvServiceThread.DoStart()
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,749
    7,112
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #16
    You can get this to work, but you need to make small modifications. I've added instructions to the 1st post!

    The problem with NativeTv is, that it uses the EntityFramework in parallel to MP2-Servers DB-connection. For this issue we still try to find a common solution.
     

    MaxMan23

    MP Donator
  • Premium Supporter
  • September 8, 2007
    380
    48
    Germany Germany
    I changed all, but i got another error:

    [2012-12-04 16:48:21,070] [1759 ] [Main ] [ERROR] - PluginManager: Error building plugin item 'MySQLDatabase' at location '/Services'
    System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> System.IO.FileLoadException: Die Datei oder Assembly "MySql.Data, Version=6.6.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" oder eine Abhängigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assembly stimmt nicht mit dem Assemblyverweis überein. (Ausnahme von HRESULT: 0x80131040)
    bei MediaPortal.Database.MySQL.MySQLDatabase.ExecuteScalar(String command)
    bei MediaPortal.Database.MySQL.MySQLDatabase.CheckOrCreateDatabase(String databaseName)
    bei MediaPortal.Database.MySQL.MySQLDatabase..ctor()
    --- Ende der internen Ausnahmestapelüberwachung ---
    bei System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
    bei System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
    bei System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
    bei System.Activator.CreateInstance(Type type, Boolean nonPublic)
    bei System.Activator.CreateInstance(Type type)
    bei MediaPortal.Common.PluginManager.PluginRuntime.InstantiatePluginObject(String typeName)
    bei MediaPortal.Common.Services.PluginManager.Builders.ServiceBuilder.BuildItem(PluginItemMetadata itemData, PluginRuntime plugin)
    bei MediaPortal.Common.Services.PluginManager.PluginManager.RequestItem(PluginItemRegistration itemRegistration, Type type, IPluginItemStateTracker stateTracker)
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,749
    7,112
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #18
    First post got updated with a version for MP2 Alpha 1 Winter Release!

    To use it follow the instructions from first post, in principle it is enough to delete SQLCE and place this plugin into server folder. This version also works for new "MP2 NativeTv" test builds.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,316
    3,781
    Lehmden
    Germany Germany
    Country flag
    Hi.
    Tried MySQL Plugin with Alpha 2 Pre-Release. It did not work, server crashes. Crash- Logs attached.
    I wanted to try MySQL instead of SQLite to get not that much trouble when testing TVE3.5. Now I've switched back to SQLite again...
     

    Attachments

    Users who are viewing this thread

    Similar threads
    OP Title Forum Replies Date
    C Schedules Direct plugin - simple questions Electronic Program Guide 2
    Z EPG-Buddy / xmltv-plugin - zwei Quellen, selber Sender Elektronischer Programmführer (EPG) 2
    joecrow Moving Pictures/TV Series Plugins Broken??? General Support 2
    ajs MQTT Plugin MediaPortal 1 Plugins 15
    C Issue with plugin initialisation My TVSeries 7
    morpheus_xx [Finished] "What's New" plugin for MP2 upgrades MediaPortal 2 20
    da3dsoul [Request] An MVP Plugin example for custom settings in MP2 Plugin Development 2
    da3dsoul MP2 Plugin - Getting Started (Directory Tree and Player) Plugin Development 27
    M Installing Plugins Newcomers Forum 2
    joecrow 1.25.0 Radio Time plugin fails after Resume from Sleep with MP 1.25 Bugreports 10
    P MP2: US user, OTA - can NOT get SchedulesDirect plugin to work on MP1 or MP2 --> how do I get OTA schedule? General 6
    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) 31
    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 4
    mrmojo666 beginner: trying to write a plugin, need help to catch event General Development (no feature request here!) 3

    Similar threads

    Top Bottom