Idea: Port LogoManager into common library and use it inside MP2-Server plugin (1 Viewer)

Status
Not open for further replies.

offbyone

Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    As mentioned earlier, Webservice is SOAP and the byte[] will be base64 encoded and might get almost twice the size it actually needs to be.
    The download via http get is like two lines in c# and will be faster and can be done concurrently for like 10 logos at a time to be even faster.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Ok, I'm fine with it as well. Will push code in next hour.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Ok, changes pushed. I have checked the roundtrip time with fiddler: the actual download is faster than the lookup of logo first.

    I have run it in loop to lookup and download logos one by one. While lookup probably can be done in one request, I wonder if there is room for performance improvements? (it takes half a second to lookup the name). Sorry to directly starting to demand more :p ;) :D
    01_service_query_download.png
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    That is also why I suggested the method signature to ask for multiple logos at once ;-)

    I haven't done any caching or optimizations, so DB connection is always recreated which could be slow.

    But the lookup will always be slower, because the logo retrieval is a simple static file served - nothing can be faster ;) -while the lookup is a DB search query and the some c# code for duplicate finding logic.
     

    Edalex

    Community Plugin Dev
  • Premium Supporter
  • January 3, 2008
    2,955
    1,264
    Saratov
    Home Country
    Russian Federation Russian Federation
    I haven't done any caching or optimizations, so DB connection is always recreated which could be slow.
    Yeah, first time main page loads in 1 minute.
    And to answer on your first question I've just tried to add new logo. Please try to approve :rolleyes: Nvm, approved myself :D
    Some thoughts:
    1) "Origin" should be not for file but for alias. So we could known in which cable network/on which satellite this channels has such name.
    2) Entering name of file is excessive. It could be taken from filename itself.
    3) Info filed is unclear since form already has Description field. I've just copied text from Description to Info.
    UPD. 4) After creating account continue button leads nowhere
     
    Last edited:

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    If you register a user, you can approve your suggestion yourself ;)

    The Origin for the logo is meant to say something like "wikpedia", or "homepage" or "self-created with Photoshop" - se in case we want to know where to get the logo from again for modifications we know where to look or ask.
    A logo should have a name, because one use case is to assign it to different channels. So when I want to do that, I need to search for a Logo, that is what I inteded with the logo name (it is mostly probbaly equal to the channel name). Example name for a logo would be "RTL Germany HD Logo".
    The Info field was meant as a way for the one making the suggestion to write a message to the administartor of the system ;) Something like "Please add" or whatever is on your mind to give more info about the suggestion itself. I guess this need to be made clearer in the Page.
    I huess I haven't set a continue Url ;)

    Edit:
    The fisrt time loads might be really slow, because the Webserver unloads the website after some time ;) And upon first load the Entity Framework does some magic ;) Once it's used more oftnre this won't happen.
     

    Edalex

    Community Plugin Dev
  • Premium Supporter
  • January 3, 2008
    2,955
    1,264
    Saratov
    Home Country
    Russian Federation Russian Federation
    A logo should have a name, because one use case is to assign it to different channels. So when I want to do that, I need to search for a Logo, that is what I inteded with the logo name (it is mostly probbaly equal to the channel name). Example name for a logo would be "RTL Germany HD Logo".
    So we have Channel name, Logo name on this page. If you think it is right then we dissagree here :)
    And I think we should search not by logo names but by aliases. In such case logo name will not be needed.
    I know you want to have different object/classes for channel logo and channel itself. In MP1 LogoManager Logo=Channel. your way is more complex and I'm not sure we can handle such type of db.
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    Maybe we are not understanding each other.

    Usually you DO search for an Alias for a Channel to get the Logo. The LogoManager client plugin at the user's PC does never need to worry about a Logo's name.

    But we as managers of the system, might need an overview and manually want to edit things. In those scenarios it might come in handy to search for a logo by some keywords or have a name for a logo.

    For a client in the end on his local PC, a channel and its logo is one thing. But on the server we can have one logo assigned to different channels, so they share the same file. This is useful lwhen you do not have a speical logo for a subchannel or maybe no extra HD suffix logo and want to simlpy reuse the normal one.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I used the new logos to test more download/processing options:
    I've added "async" methods to download the logo mappings and then process all logos concurrently (1st request and 3 processed logos).
    The last of the 4 logos is a normal synchronous lookup and processing.

    I think this scales quite well: lookup as many channels in one package and them use async download and processing :)
    02_service_query_download_(a)sync.png

    Code pushed to https://github.com/morpheusxx/Media...mmit/c42623144faffad893b1463e88b252a1038eb8d9.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I've created support for "themes": it uses a design as base (background+overlay) and a set of effects (resize, glow, shadow,...)
    Themes can be loaded/saved from file, so user can adjust parameters as they want (Idea: designer to build and test themes? ;))

    So here are examples of "modern-none" (no effects)
    Modern-none_1_plus_1_International.png
    Modern-none_animal planet hd.png
    Modern-none_discovery channel.png
    Modern-none_zdf hd.png

    and this of "modern-max" (all available effects in terrible combination :D)
    Modern-max_1_plus_1_International.png
    Modern-max_animal planet hd.png
    Modern-max_discovery channel.png
    Modern-max_zdf hd.png

    If now more logos would be in repository, my requirements are nearly completed and I can start the MP2 intergration next week!
    This is a big step forward!
     
    Status
    Not open for further replies.

    Users who are viewing this thread

    Top Bottom