Latest Media Handler v2.4.X.000 (4 Viewers)

styrsven

Portal Pro
January 6, 2013
115
51
63
Home Country
Sweden Sweden
I looked at the code, and there is code for 4TR and the old API, but the api from 2.3 is different and not backward compatible, so LatestMediaHandler gets no contact.
I actually downloaded the code and had a look.

It seems to me that LatestTVRecordingsHandler.cs, Latest4TRRecordingsHandler.cs and LatestArgusRecordingsHandler.cs are copies of each other with minor changes in each.

My attempt on doing something would be to create a common baseclass that all inherits from and just keep the server-specific code in the inherited classes (that would simplify LatestTVAllRecordingsHandler.cs also), Then creating a new class, LatestArgusPost23RecordingsHandler.cs for the new API.
One issue is that the class for fetching the logo path is not a part of the published api, and only exist in a .NET4.5 dll.

I could make an attempt to doing something like this if it is ok with you. It would probably take some time, though.
 

styrsven

Portal Pro
January 6, 2013
115
51
63
Home Country
Sweden Sweden
I now have a version that works with Argus 2.3 running on my system.
After all, I didn't do all I listed in the previous post (I don't want to change too much code I can't verify).
What I have one is the following:
  • Switched to .NET 4.5
  • Updated argus support to version 2.3
  • With that upgrade disappears the code that supported earlier argus versions. (My limited .NET skills does not yet include managing handling .dll's with the same name but conflicting contents). I don't think that will matter, as I think a strange looking if statement made argus support non-existent anyway.
  • I added ArgusTV.Common.dll to the assembly and updated NLog.dll
  • Some code tweaking until it worked.
So, @ajs, what's next?
 

ajs

Development Group
  • Team MediaPortal
  • February 29, 2008
    16,039
    11,112
    Kyiv
    Home Country
    Ukraine Ukraine
    @styrsven
    Is it a lot of changes during the transition from one system to another? I think I need a library, and a patch. So I looked up how to combine it all.
     

    styrsven

    Portal Pro
    January 6, 2013
    115
    51
    63
    Home Country
    Sweden Sweden
    Argus 2.3 needs 4.5. The old Argus dlls have the same names as the new ones, and as I'm new to c# and .NET I don't know how to fix it.
    The API dll's are available in 4.0 versions, but the class for getting the path to channel logos is in a dll that I had to copy from Argus clients.
    There is a class to get the logo blob in the API though. If there is an alternative way of getting the logos this patch can be much simplified,
    i.e. no .net bump, no inclusion of extra dll in assembly etc.
    Also, unless the previous Argus version registered as "For The Record TV" in mediaportal.xml, I don't think LMH worked for that Argus version.
    Have to ask someone that still uses the old Argus to check if it works.
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    16,039
    11,112
    Kyiv
    Home Country
    Ukraine Ukraine
    Have to ask someone that still uses the old Argus to check if it works.
    This should be clarified. I would not want to break something that works.
     

    Users who are viewing this thread

    Top Bottom