SQLiteDatabase Plugin for MP2 (2 Viewers)

breese

Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    65
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    @MJGraf I dont know what you did to the DB but while the scan is going on the DB file is not growing but the Wal is....
    DB-Wal.jpg
    I will upload the logs once the scan is done.

    Done in record time but it is not my complete music library
     
    Last edited:

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    That's expected behavior until the WAL-file reaches exactly 128MB. Give it a little more time and you will see what I mean...
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Logs are looking good from a DB perspective.
    But there are again a lot of exceptions in the Server.log regarding the MovieTheMovieDbMatcher:
    Code:
    [2013-11-03 10:25:12,883] [257174 ] [FanArt Downloader 0] [DEBUG] - MovieTheMovieDbMatcher: Exception downloading FanArt for ID 49948
    System.FormatException: Input string was not in a correct format.
      at Newtonsoft.Json.Utilities.ConvertUtils.Int32Parse(Char[] chars, Int32 start, Int32 length)
      at Newtonsoft.Json.JsonTextReader.ParseNumber()
      at Newtonsoft.Json.JsonTextReader.ParseValue()
      at Newtonsoft.Json.JsonTextReader.ReadInternal()
      at Newtonsoft.Json.JsonReader.ReadAsInt32Internal()
      at Newtonsoft.Json.JsonTextReader.ReadAsInt32()
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
      at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
      at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
      at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
      at MediaPortal.Extensions.OnlineLibraries.Libraries.MovieDbV3.MovieDbApiV3.GetImages(Int32 id, String language)
      at MediaPortal.Extensions.OnlineLibraries.TheMovieDB.TheMovieDbWrapper.GetMovieFanArt(Int32 id, ImageCollection& imageCollection)
      at MediaPortal.Extensions.OnlineLibraries.MovieTheMovieDbMatcher.DownloadFanArt(Int32 movieDbId)

    What build of MP2 Server are you using, breese? Is this Alpha 3 or did you make your own build?
    I remember that we updated Newtonsoft.json lately, but as far as I remember this was after Alpha 3. @morpheus_xx Do you have an idea where this comes from?
     

    breese

    Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    65
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    I do not know how to do a build and have been a little afraid to do it and not mess up someones hard work.
    I have always been using the Orig Alpha 3 version.
    Can someone provide a build to me with all the new fixes?
    Sorry but as I stated, I am not a deveolper but I am real good at testing... :)
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I've seen such exceptions before, they are caused by reading the JSON response from TMDB. We have some number field (Integer) defined and they return an invalid content for it :( I had to change some properties to Nullable<int> to work around this issue. Best solution would be that they correct their data. But anyway the processing in MP2-Server should not be interrupted by this error?
    [2013-11-03 10:25:12,883] [257174 ] [FanArt Downloader 0] [DEBUG] - MovieTheMovieDbMatcher: Exception downloading FanArt for ID 49948
    System.FormatException: Input string was not in a correct format.
    at Newtonsoft.Json.Utilities.ConvertUtils.Int32Parse(Char[] chars, Int32 start, Int32 length)
    at Newtonsoft.Json.JsonTextReader.ParseNumber()
    at Newtonsoft.Json.JsonTextReader.ParseValue()
    at Newtonsoft.Json.JsonTextReader.ReadInternal()
    at Newtonsoft.Json.JsonReader.ReadAsInt32Internal()
    at Newtonsoft.Json.JsonTextReader.ReadAsInt32()
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Processig is not interrupted. But Breese has several hundred of these exceptions in his log. That made me suspicious...
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    As to the Json-Exceptions, I can reproduce them. Will open a new thread in the next days.

    I think I also fund the reason why the build-process doesn't work correctly. The hint-path in the SQLiteDatabase.csproj file is wrong. It says:
    Code:
    <Reference Include="System.Data.SQLite, Version=1.0.89.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
    <SpecificVersion>False</SpecificVersion>
    <HintPath>..\..\Source\packages\System.Data.SQLite.x86.1.0.89.0\lib\net40\System.Data.SQLite.dll</HintPath>
    </Reference>
    <Reference Include="System.Data.SQLite.Linq, Version=1.0.89.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">    
    <SpecificVersion>False</SpecificVersion>
    <HintPath>..\..\Source\packages\System.Data.SQLite.x86.1.0.89.0\lib\net40\System.Data.SQLite.Linq.dll</HintPath>
    </Reference>
    The "Source\" part is wrong and should be deleted so that it reads like "..\..\packages\"

    I have no idea how this came into the csproj-file. I found some posts in the nuget-forums that describe similar problems so maybe it is a bug in nuget. Instead of manually correcting this, I will try to remove all traces of nuget in the SQLiteDatabase project and then reinstall the package from scratch. Hopefully this solves it.

    This is by the way also the reason why system.data.sqlite is not shown as installed in the nuget package manager in VS (I mentioned that before, but didn't know where it came from). As a result, it was not possible to "update" the system.data.sqlite package. The funny thing is, when you search for the system.data.sqlite nuget package under "online", it is shown with a green check as if it was installed (although it is not shown under installed packages) and, hence, you cannot install it either. Seems like there is still some work to do for the nuget guys...
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    The reason explained in my last post was correct. Just pushed a corrected SQLiteDatabase.csproj file to GitHub.

    The reason why the wrong path came into the file took me a while longer to realize. I was still using an outdated version of NuGet. Didn't know that I have to do updates separately from the VS updates. Now I'm on the current NuGet version and now I can add a NuGet package in VS and the correct hint path is inserted. While I was at it, I realized that we also don't need the reference to nuget.targets anymore in the project file (Chefkoch already did this for all other project files in our solution - see issue MP2-382) and so I removed this reference also from SQLiteDatabase.csproj.

    Building within VS now works as well as building via script.
     

    Users who are viewing this thread

    Top Bottom