Page 1 of 1

MP LatestMediaHandler, different APIs

Posted: Sun Mar 06, 2016 5:08 pm
by styrsven
In an attempt to expand my experience, I decided to do my first ever .NET and VS project.
I decided to try to adopt the MP LatestMediaHandler to Argus2.3.
After some fumbling I managed to make something that works on my machine, but for checking in it is necessary to solve two issues:

1. ArgusTV.DataContracts.dll is incompatible between Argus 2.3 and older versions. Backwards compatibility is absolutely necessary.
At least with my limited C#/VS/Windows knowledge it seems impossible to solve.
Even if I somehow manage to fool the compiler, I still don't see how I could add two incompatible dlls with the same name in the same assembly.
Renaming dll's don't help as other argus dll's refer to the datacontracts dll, each expecting a different version and if I rename then it is not found.

2. Compared to the first issue, the second is minor. The API have no method of accessing the logo path, just the logo itself. Older version of this plugin solved it by copying a dll to the project, but that dll is no longer available in ,NET 4.0.

I would appreciate if anyone have any hints that could help me solve these issues.

Re: MP LatestMediaHandler, different APIs

Posted: Sun Mar 13, 2016 5:35 pm
by styrsven
Seems like I have to answer this myself.

1. Im not so sure I have to maintain backwards compatibility.
I would like to know if anyone can confirn that the MP LatestMediaHandler is capable of displaying info from ANY Argus version or not.
I know it doesn't work with Argus 2.3, the question is if anyone is using an older Argus version and if LatestMediaHandler can or cannot show any recordings info.
Please inform me.

2. I solved this by simply copying the logo path code from the dll that wasn't available in the API. Both files are GPL so I don't think there will be any copyright issues. The only info that was unique to that code was a part of the path to the logos, the rest used the published API.

Re: MP LatestMediaHandler, different APIs

Posted: Sat Mar 19, 2016 10:01 am
by styrsven
Ok, I'll continue my monolog.
If I remember correctly, LMH has never worked with argus, although the source code contained an attempt that was very close to working (if some if-statements had been corrected).
I will try to convince ajs to dump 4TR and old Argus and add my support for Argus 2.3.