MP2 Plugin - Getting Started (Directory Tree and Player) (2 Viewers)

morpheus_xx

Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,777
    7,127
    Home Country
    Germany Germany
    Country flag
    Ok, this is in principle the same as our "Media" plugin does, but the backend is different. I'd recommend you to take a look into this plugin first. But on the other hand it's also one of the most complex ones, because of it's generic approach and extensibility.

    As a simpler start for your own plugin I'd point to the "Skin Test" plugin (enabled in DEBUG builds only). It shows how to create the basic plugin structure (skin, workflow, language files, code).

    Then the "MediaItem" will be important, it refers to any video, image, audio item that can be played back. Also non-playable items exists, like "Series", "Episodes", "Movie Collections" and so on.

    The MediaItem then contain so called MetadataAspects, for example the Series/Season information of a series (see "EsisodeAspect").

    Finally all players in the system get a MediaItem passed to initialize and start playback.
     

    da3dsoul

    Development Group
  • Team MediaPortal
  • August 29, 2020
    86
    45
    Home Country
    United States of America United States of America
    Country flag
    Where are these plugins?
    I got MediaPortal2 to build. Here's a note for everyone: it doesn't build with .Net 5.0 tools. That took longer to realize than I would have hoped. If we upgrade the projects to the new format, it should theoretically work. UPnP didn't work with 5.0, so I can try converting that one to verify. It's not a priority, but eventually, it'll be a pain to get pre-5.0 tools, and the newer project format is much more pleasant in general.

    EDIT: I got UPnP to compile using net5 build tools, though I did disable a bunch of AssemblyInfo stuff, as I didn't understand what in the build chain was breaking it. So theoretically, the whole solution could be converted to the new 2017 csproj format. I attached a patch for anyone interested. I'm not going to PR it or anything, as it's not finished.

    EDIT2: If you want a legitimate reason to convert to the new format, other than because people should stop using EOL products, the build times are significantly faster.
     

    Attachments

    • Convert_UPnP_csproj_to_2017_csproj_format.patch
      10.4 KB
    Last edited:

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,777
    7,127
    Home Country
    Germany Germany
    Country flag
    Thanks for reporting back :) I think until now no one has tried .Net 5.0 tools yet. I can explain the current process and build architecture:

    Once you have cloned the MP2 git repo, you have folders:
    • MediaPortal
      • Source --> Here are the main solutions to open (MP2-Client.sln, MP2-Server.sln)
      • Build --> Here you can use the "MSBUILD_Create_Release_Full_Installer.bat", which compiles all required projects, updates language resources from transifex and then assembles a .msi installer

        All build scripts call for initialization "MSBUILD_Rebuild_Base.bat". There is tried to find the best possible MSBUILD version. FEAT_WIP2.3 branch prefers VS2019 community version:
        Code:
        set MB="%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe"
        . If you like to use other MSBUILD path, add it to top of the list.

        This set of batch files also create the Assembly VersionInfo based on Date, Git branch/tag/hash and commit count

        If transifex is not setup correctly, you could try "MSBUILD_Create_Release_Full_Installer_NoTransifex.bat", this skips language update and uses the cached ones (faster, no transifex account needed).

      • Bin --> Once build is done, you find there the compiled version, including all files and also the created setup
    Where are these plugins?
    The source you find here (both included in MP2-Client.sln):
    • Media: (git root)\MediaPortal-2\MediaPortal\Source\UI\UiComponents\Media
    • GUITestPlugin: MediaPortal-2\MediaPortal\Resources\GUITestPlugin\
    • HelloWorld
    Inside MP2-Client solution you will find the testers under Incubator/UiComponents
    1598946516897.png
     
    Last edited:

    da3dsoul

    Development Group
  • Team MediaPortal
  • August 29, 2020
    86
    45
    Home Country
    United States of America United States of America
    Country flag
    Ok, thanks. I found out it was net5 problems because Rider threw a bunch of errors but the batch scripts worked. The msbuild in my PATH is an earlier version.
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,777
    7,127
    Home Country
    Germany Germany
    Country flag
    Ok, thanks. I found out it was net5 problems because Rider threw a bunch of errors but the batch scripts worked. The msbuild in my PATH is an earlier version.
    Did you get further? Are there any questions I can answer?

    Gesendet von meinem SM-G930F mit Tapatalk
     

    da3dsoul

    Development Group
  • Team MediaPortal
  • August 29, 2020
    86
    45
    Home Country
    United States of America United States of America
    Country flag
    Not worked on it much over the weekend. I found the stuff in the client solution. I have not yet gotten the client to run from a build. Currently, it complains about win not being in the runtime identifiers, but I think there's a way to tell MSBuild to STFU and use a default. Normally, I'd just add win to the runtime identifiers, but there's so many projects that I expect it'll just be a rabbit hole.
     

    da3dsoul

    Development Group
  • Team MediaPortal
  • August 29, 2020
    86
    45
    Home Country
    United States of America United States of America
    Country flag
    I've gotten some stuff to work. I've done a decent bit of work adding the small modifications to allow newer MSBuild releases to work with the projects. I'm still working on getting the rest. I didn't have the right C++ stuff for Online Videos's native libs and I didn't have WiX installed, so I'm figuring those out.

    Update: Got all of that. Now it's not building the x64 from the MSBUILD_Create_Full_Installer_NoTransifex.bat.
    Code:
           "C:\Users\da3ds\Documents\GitHub\MediaPortal-2\MediaPortal\Build\Build.proj" (default target) (1) ->
           "C:\Users\da3ds\Documents\GitHub\MediaPortal-2\MediaPortal\Setup\MP2-Setup.sln" (Rebuild target) (137) ->
           "C:\Users\da3ds\Documents\GitHub\MediaPortal-2\MediaPortal\Setup\MP2-Setup\MP2-Setup.wixproj.metaproj" (Rebuild
           target) (138) ->
           "C:\Users\da3ds\Documents\GitHub\MediaPortal-2\MediaPortal\Setup\MP2-Setup\MP2-Setup.wixproj" (Rebuild target) (
           141) ->
           (Link target) ->
             C:\Users\da3ds\Documents\GitHub\MediaPortal-2\MediaPortal\Setup\MP2-Setup\Features\Client.wxs(76): error LGHT0
           103: The system cannot find the file 'C:\Users\da3ds\Documents\GitHub\MediaPortal-2\MediaPortal\Bin\MP2-Client\b
           in\Release\MP2-Client (x64).exe'. [C:\Users\da3ds\Documents\GitHub\MediaPortal-2\MediaPortal\Setup\MP2-Setup\MP2
           -Setup.wixproj]
    
        729 Warning(s)
        1 Error(s)
     
    Last edited:

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,777
    7,127
    Home Country
    Germany Germany
    Country flag
    I had such issue before, that the x64 build is not executed sometimes. Until now I could not figure out the cause for this. On our Team City continous integration system all builds fine.

    The related project section is: MediaPortal/MediaPortal-2. There are only 2 projects included in the "ProjectsToBuildX64" group. Do you see any issue with this?
     

    da3dsoul

    Development Group
  • Team MediaPortal
  • August 29, 2020
    86
    45
    Home Country
    United States of America United States of America
    Country flag
    It's a known issue? I am now stopping the installation of another 10GB of EOL SDK packages. Aaand that was 24.3GB of temporary installation files from VS build tools.... Good riddance. I'm not generally stingy with space, but that's an entire game's worth of storage for something that should be 5GB at the most.

    I don't know what you mean by "Do you see any issue with this?" I didn't change it.
     

    Users who are viewing this thread

    Similar threads

    • Locked
    Hi guys, While I encountered the very same problem as @Fesnor last night, after successfully tuning the DVB-T2 channels I then tuned the DVB-S2 channels and at some point after doing some organising of the channels I encountered the issue. I was, however able to resolve it by simply repairing the install, that is re-running the...
    Hi guys, While I encountered the very same problem as @Fesnor last night, after successfully tuning the DVB-T2 channels I then...
    MediaPortal 2 Version: 2.1.3 Description Hi guys, This actually applies to all MP2 attempts at installation. As the topic says...
    Replies
    3
    Views
    3K
    Sorry for the long wait, with a baby in the house one is happy to get some sleep at all or to form a coherent tought for more than 15minutes. :) recording from 2 tuners at once is stable so far. With zapping I have BSOD after about 10-15 channel changes. Obviously I havent recorded that much. Channel change is slow at 5-6 seconds...
    Sorry for the long wait, with a baby in the house one is happy to get some sleep at all or to form a coherent tought for more than...
    Hi, I am a bit pressed for time now, but I have prepared the text below while my forum registration was pending. My apologies...
    Replies
    23
    Views
    3K
    You probably don't need to do that unless you're using the CI slot.
    You probably don't need to do that unless you're using the CI slot.
    Hello folks. I've been a long time user of Mediaportal 1.x. It has been a struggle getting my TBS 5881 card to work reliably...
    Replies
    3
    Views
    1K
    Nolos, Since you mentioned Plex and you own the SiliconDust HD Homerun, I would recommend that you instead take a serious look at Emby rather than Plex. Emby is basically a competitor to Plex. And, they just added native support for the HD HomeRun for Live TV. Their big thing is that they want the TV guide to be "stunning". It would...
    Nolos, Since you mentioned Plex and you own the SiliconDust HD Homerun, I would recommend that you instead take a serious look at...
    Just wanted to give you a heads up on my recent and very first install of your software. I have Plex and I use PlayOn and I just...
    Replies
    1
    Views
    816
    • Locked
    Thread moved to public forum. Please note that the status of this thread is "Not open for further replies", which actually means team-members and plugin devs can reply, but others can not, hence it is "read only".
    Thread moved to public forum. Please note that the status of this thread is "Not open for further replies", which actually means...
    Dear community, I started this thread some time ago in the internal team forums, but we think it is time to share it with you. It...
    Replies
    82
    Views
    12K
    Top Bottom