MP2 - Source code for TvEngine3? (currently only available as package) (1 Viewer)

netexplorer

MP Donator
  • Premium Supporter
  • January 21, 2009
    736
    104
    Home Country
    Germany Germany
    There was a plug-in called TVWishlist for that purposes, but the developer left MediaPortal.
     

    bilkusg

    Portal Member
    March 12, 2011
    19
    2
    Home Country
    United Kingdom United Kingdom
    I'm still working on this - I can rebuild the TVServer and use it no problem on my live system. But the SetupTV GUI doesn't work - it crashes as soon as I start it. According to the event log: BadImageFormatException. If I try to run the TVServer in debug mode it complains about TvBusinessLayer.dll which is strange because it was just rebuilt at the same time....

    So I'm obviously building this bit wrongly somehow. Any ideas?
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    BadImageFormatException
    That usually happens due to different CPU platforms.

    You should set all SetupTV project (as start project) in build config to "x86". Other libraries might remain AnyCPU, but if you want to be sure use x86 there as well.

    Some more details:
    If the main executable is targeting AnyCPU, it will take the 64 bit .NET framework on 64 bit systems. Then it will fail to load x86 targeted assemblies.
     

    bilkusg

    Portal Member
    March 12, 2011
    19
    2
    Home Country
    United Kingdom United Kingdom
    I've now confirmed that the problem with SetupTV was as you suggested and changing the project to build x86 fixed the problem. I have the functionality I want more or less working, but haven't yet found a way of turning it into a separate plugin for MP2. That's the next stage.....

    Incidentally, quite a lot of the dlls expected by the TVLibrary nuget package as references aren't built by the instructions above so you either need to retain the distributed copies of those files or struggle with building lots more of MP1......
    Or have I missed something silly ( again? )
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Incidentally, quite a lot of the dlls expected by the TVLibrary nuget package as references aren't built by the instructions above so you either need to retain the distributed copies of those files or struggle with building lots more of MP1......
    Or have I missed something silly ( again? )
    I can think about the native filters (like TsReader.ax and TsWriter.ax), they need to be build from the DirectShowFilters solution. But they require C++ and SDKs to be available. I usually try to avoid C++ compilation ;)

    Depending on what you plan to code, it would be possible to develop just a TvEngine pluign without the need to change or compile any TvEngine core code itself. There are some examples floating around yet, they only have the TvEngine binaries as references and build a single plugin dll. This dll can then be placed into the plugin folder and will be loaded at startup.
     

    bilkusg

    Portal Member
    March 12, 2011
    19
    2
    Home Country
    United Kingdom United Kingdom
    OK. So I've done some work on this, and I'm not quite sure where to take it in order to contribute back to the community. Essentially, there turn out to be three issues with fixing the OTA EPG for Freeview in the UK so that it handles schedules nicely.
    1. Various inconsistencies in the data - adding New to program titles, changing the description of the same program by adding flags for sign-language on repeats
    2. Series and episode information either missing, or in one of about 20 possible formats embedded in the program description. I've produced a series of pattern matches wh so far have managed to extract whatever it can from the current program descriptions, and populate the episode and series info on the database, as well as updating the description text to be consistent.
    In principle, I can see how to write a plugin which would scan all existing EPG program data and fix it up. I can't see how to write a plugin which would intercept the original download and get it right first time, although patching the source to do this is easy ( and that's what I've done so far )
    3. There are currently only two algorithms available to try and avoid multiple recordings of the same program. One uses just the title, and won't work for most programs in the UK where the title doesn't change between episodes. The other only works if the season and episode information is present, and even with the changes in 1 and 2 above, quite a few programs don't seem to provide this. So what I really want is the following:
    - If season and episode are present in the recorded program and the potential recording, use those to decide if this is a duplicate
    - If not, compare the description text after cleaning it to remove flags and making any episode information consistent in format.
    The trouble is that this would require adding a new option to the scheduler code, and I can't see any way to do that without a patch to the source - there's no obvious plugin hook to use instead.
    Now I'm quite happy to submit a patch once I've tested it all a bit more, but should this be a patch to the morpheus_xx fork, or should I try and get the upstream MP1 code patched first ( which would retain consistency with MP1, but probably take a long time to filter back to MP2 via the fork.
    Or should I just post my diffs here and let anyone who wants to incorporate them do their own thing?
     

    azzuro

    Test Group
  • Team MediaPortal
  • May 10, 2007
    9,948
    5,617
    France - IDF
    Home Country
    France France
    hello @bilkusg

    about your patch, if your work is done on official MP1 release branch, the best is to fork it and share your own branch with us, need to know if this change can have an issue on MP1 client / server, maybe @Owlsroost can help / look.
    if your change is done on the morpheus fork, so your change will be applied to his fork only.
    but, thank you for your contribution.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    Now I'm quite happy to submit a patch once I've tested it all a bit more, but should this be a patch to the morpheus_xx fork, or should I try and get the upstream MP1 code patched first ( which would retain consistency with MP1, but probably take a long time to filter back to MP2 via the fork.
    Or should I just post my diffs here and let anyone who wants to incorporate them do their own thing?
    comment from @morpheus_xx would be better
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I think the better way is to submit the patch to the main MP1 repository. I merge changes from there before every MP2 release, so I will get them in time.
     

    Users who are viewing this thread

    Top Bottom