Plugin: MP2Extended (2 Viewers)

MrTechno

Retired Team Member
  • Premium Supporter
  • February 27, 2011
    1,256
    511
    London
    Home Country
    United Kingdom United Kingdom
    Okay, what is the next step? Sorry I am bit off track^^
    I think the next step is for me to install it on my dev machine and make sure I've not broken anything during the merge.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Hehe, okay once you came to the conclusion that everything is okay I will create a backup branch of mine and than you can push your work to my branch. How does that sound?
     

    pünktchen

    Portal Pro
    October 26, 2010
    537
    201
    Home Country
    Germany Germany
    This: http://tinyurl.com/obe2jh2 should also fix the other issue :) I hope so^^
    AddScheduleDetailed -> Fixed!

    But here's another one i think i have already mentioned earlier:
    Program calls like "GetProgramDetailedById" or "GetProgramsDetailedForChannel" deliver "Genre":null[DOUBLEPOST=1447633177][/DOUBLEPOST]Also it would be nice if you return 'false' instead of a stacktrace error for function calls like
    CancelSchedule or DeleteSchedule if the id doesn't match a database entry.
     
    Last edited:

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Sure:
    Here you will find all already downloaded channel logos: C:\Users\All Users\Team MediaPortal\MP2-Server\Logos\Tv-Modern-StreamedMP 16x9-max

    Please remember what I've written above:
    Regarding the TV logos: when you use the fanart service URL, the service should download and process them automatically. This is not depending on the MP2 Client.

    Another note: the cache folder quoted above depends on the logo theme. We currently use only one, but they can be extended.

    A correctly build url should automatically download and process channel logos from Server side and return it via the HTTP response. At least all german channels do have logos in the repository.
    For the url take a look at https://github.com/MediaPortal/Medi...Service.Client/FanArtImageSource.cs#L212-L219.
     

    breese

    Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    66
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    But i have another request. For whatever reason MP2 doesn't download channel logos for me.
    My server has the channel logos and accepts the request from the client
    [2015-11-16 04:34:13,948] [161034814] [174 ] [INFO ] - MainRequestHandler: Received request http://[fe80::e1f7:ab0c:b8fa:c251]:54386/FanartService?mediatype=ChannelTv&fanarttype=Banner&name=Antenna&width=0&height=0

    The client does not get them...
    [2015-11-16 04:34:12,014] [155129167] [105 ] [WARN ] - AsyncWebLoadOperation: Failed to download http://[fe80::e1f7:ab0c:b8fa:c251]:54386/FanartService?mediatype=ChannelTv&fanarttype=Banner&name=Antenna&width=0&height=0 - The remote server returned an error: (404) Not Found.
     

    MrTechno

    Retired Team Member
  • Premium Supporter
  • February 27, 2011
    1,256
    511
    London
    Home Country
    United Kingdom United Kingdom
    once you came to the conclusion that everything is okay
    Well it's not a very promising start. Importer gets stuck on the first video. Audio seems OK. Need to increase the debug levels and have another go.
     
    Last edited:

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    AddScheduleDetailed -> Fixed!
    Nice!

    But here's another one i think i have already mentioned earlier:
    Program calls like "GetProgramDetailedById" or "GetProgramsDetailedForChannel" deliver "Genre":null
    My fault, forgot to request the information from the DB :whistle: Thought I already fixed it :D


    Also it would be nice if you return 'false' instead of a stacktrace error for function calls like
    CancelSchedule or DeleteSchedule if the id doesn't match a database entry.
    I do:
    Code:
    public dynamic Process(IHttpRequest request)
        {
          HttpParam httpParam = request.Param;
          string programId = httpParam["programId"].Value;
    
          if (programId == null)
            throw new BadRequestException("CancelSchedule: programId is null");
    
          int programIdInt;
          if (!int.TryParse(programId, out programIdInt))
            throw new BadRequestException(string.Format("CancelSchedule: Couldn't parse programId to int: {0}", programId));
    
          if (!ServiceRegistration.IsRegistered<ITvProvider>())
            throw new BadRequestException("CancelSchedule: ITvProvider not found");
    
          IProgramInfo programInfo = ServiceRegistration.Get<ITvProvider>() as IProgramInfo;
          IScheduleControl scheduleControl = ServiceRegistration.Get<ITvProvider>() as IScheduleControl;
    
          IProgram program;
          programInfo.GetProgram(programIdInt, out program);
    
          bool result = scheduleControl.RemoveScheduleForProgram(program, ScheduleRecordingType.Once);  // TODO: not sure if ScheduleRecordingType is right
    
    
          return new WebBoolResult { Result = result };
        }
    I only throw the error if the id is null or couldn't be parsed. I will create a new build with the Genre fix :)
     

    pünktchen

    Portal Pro
    October 26, 2010
    537
    201
    Home Country
    Germany Germany
    Nice!


    My fault, forgot to request the information from the DB :whistle: Thought I already fixed it :D



    I do:
    Code:
    public dynamic Process(IHttpRequest request)
        {
          HttpParam httpParam = request.Param;
          string programId = httpParam["programId"].Value;
    
          if (programId == null)
            throw new BadRequestException("CancelSchedule: programId is null");
    
          int programIdInt;
          if (!int.TryParse(programId, out programIdInt))
            throw new BadRequestException(string.Format("CancelSchedule: Couldn't parse programId to int: {0}", programId));
    
          if (!ServiceRegistration.IsRegistered<ITvProvider>())
            throw new BadRequestException("CancelSchedule: ITvProvider not found");
    
          IProgramInfo programInfo = ServiceRegistration.Get<ITvProvider>() as IProgramInfo;
          IScheduleControl scheduleControl = ServiceRegistration.Get<ITvProvider>() as IScheduleControl;
    
          IProgram program;
          programInfo.GetProgram(programIdInt, out program);
    
          bool result = scheduleControl.RemoveScheduleForProgram(program, ScheduleRecordingType.Once);  // TODO: not sure if ScheduleRecordingType is right
    
    
          return new WebBoolResult { Result = result };
        }
    I only throw the error if the id is null or couldn't be parsed. I will create a new build with the Genre fix :)
    I guess the problem is programInfo.GetProgram. With a unknown id it cannot return anything and throws an error.
     

    pünktchen

    Portal Pro
    October 26, 2010
    537
    201
    Home Country
    Germany Germany
    Please remember what I've written above:


    A correctly build url should automatically download and process channel logos from Server side and return it via the HTTP response. At least all german channels do have logos in the repository.
    For the url take a look at https://github.com/MediaPortal/Medi...Service.Client/FanArtImageSource.cs#L212-L219.
    I've put the logos manually in the respective folder, but still cannot see them in the MP2 client. Any suggestions?
     

    Users who are viewing this thread

    Top Bottom