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
    I was planing to store everything (besides the actual logos) in a DB and have a WCF service deliver the info you need at the client.
    https://forum.team-mediaportal.com/...-mp2-server-plugin.123231/page-2#post-1058675
    That's why we first need to agree on a Entity Model that has all objects and their relations. Then we need to define what method calls are needed in the WCF Service. If we transfer json or xml is just a technology question and how you talk with the Service.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #42
    Where should this WCF service run?
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    Same place the logos will be stored and the DB is running. I have a windows server with traffic flatrate for business purposes with free capacity (it already runs the OnlineVideos Webservice). But for Logos, we might even be possible use one of the Team MediaPortal Server if we can get asp.net and mssql on it (as this is my preferred technology I'll implement it with).
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #44
    Ok, this opens a wider range of possibilities. My current view was that we work with an online filestore only...
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    I would like to come back to the model with the discussion.
    It's still unclear what the best Layout would be now that we can model everything as a Database and don't have to think of restrictions of a online file only repository.
    From my point of view, historically we have LogoPacks, because users would then simply download a big zip with all logos that could possibly be relevant to their set of channels. the current LogoManager plugin had to be a client only plugin and deal with the problem of being only able to access the online location of the existing sets. Therefore you currently select a Pack and the logos that are in their and match your local channels names are downloaded.

    Now if we can store all logos in one place and maintain mappings of channels to their aliases (with optional info which provider and country) - I'd say we do no longer need a "Pack"?
    The only other questions then would be, do we need more than on image for a channel? To me a channel can only have one logo. What scenario would exist where a channel needs two different logos? If you now want to say that there are channels like RTL German and RTL Austria, then I'd say those are two different channels!
     

    Edalex

    Community Plugin Dev
  • Premium Supporter
  • January 3, 2008
    2,955
    1,264
    Saratov
    Home Country
    Russian Federation Russian Federation
    Yeah, I was going to ask the same question who will be dealing with matching channel name to logo file? Now it could be done on server side or remain at client side. As for second question, I think if channels has the same logos then server/plugin should think of them as the same.
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    There is no need to "map" a channel to a logo file on the server. The server will store all logos by the channel ID that is in the database. And the webservice will return the correct logo when asked for a specific channel name by an alias.

    You are still talking about "logo names". This is not important. This is automatically managed by the server, because a channel in the DB will have an ID -> which can act as filename for the logo on the server.
     

    Edalex

    Community Plugin Dev
  • Premium Supporter
  • January 3, 2008
    2,955
    1,264
    Saratov
    Home Country
    Russian Federation Russian Federation
    You are still talking about "logo names". This is not important. This is automatically managed by the server, because a channel in the DB will have an ID -> which can act as filename for the logo on the server.
    I'm talking about "logo names" to differ them from actual channels and to underline that in my opinion RTL Austria=RTL Germany.
    Maybe it not the right term. But how to name virtual aggregate item which will store RTL German, RTL Austria and other aliases for single logo?
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    Ok, RTL was a bad example to show that two names can refer to two channels, because RTL Austria and German have 100% equal program. So in this case it is one Channel named "RTL Television" which has at least 2 aliases "RTL" and "RTL Austria" that we know of. And here I propose that the logo file has the same name as the channel Id (so it is attached to Channel).

    A different example is Sky I would say. We have Sky in Germany and Sky in UK and I don't even know what many more countries. As I don't know how those channels are called I am asking around here:
    What are your Sky Channels called in Country xyz?

    I guess we come into situation where: A channel has the same name but a different programm. Example:
    Sky Sport 1 - in Germany and in Italy. Now in our new DB model I'd say we have to put them like this:
    We need one Channel object for each, but give it a clever name so when I look at a list of channels on the server management portal I know which one to choose. Meaning I create two Channels: Sky Sport 1 Germany, and Sky Sport 1 Italy and each of them get's its own Alias: "Sky Sport 1". And now comes the question where we "attach" the logo file.
    If we put them on the Channel, and give it the same Id as the channel, this means we have to physically create to png files (even if they might be the same). If you want to "share" a single png for more than one channel, we'd have to add a new Object to the DB model for the logo. BUT, then I don't know how to "identify" that png, because it its name is ambigeous. I'd say we keep it simply and have one png per Channel that has a unique programm. And each channel has at least one Alias, but can have more.

    Phew long post - but I hope we get clearer?
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #50
    Yes, I think it's mandatory to give each channel an unique ID, a name and a country code (or "neutral"). It should have exactly one logo. Logos should not be shared among channels.

    Then a request for logo contains parameters: country code, channel name/alias, style.

    As we now are working on a service architecture, all processing of raw -> styled logo can be done inside service.

    One more thing to think about: how should we deal with caching?
    • I think the channel should have a "modified date" if the logo has been updated.
    • The client should cache retrieved logos locally and check for updated logos either regulary by job or when requesting the logo
    • more?
     
    Status
    Not open for further replies.

    Users who are viewing this thread

    Top Bottom