Plugin: MP2Extended (1 Viewer)

FreakyJ

Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    new version in first post :)
    MediaPortal.Common needs to be replaced because I extended the IResourceProvider to support HttpAuth Modules.
     

    pünktchen

    Portal Pro
    October 26, 2010
    537
    201
    Home Country
    Germany Germany
    Can you also give me pointers of what files to copy from the MPExt tv plugin?
    Just for your information: It looks like the server part just extends the Fanartprovider and enables you to get Tv Logos :)

    You have made huge progress the last couple of weeks. How much will you be able to work on this when school starts?
    Good questions and hard to answer.
    TAS is almost completely implemented. Some Recording functions are missing and most important Schedules :)

    Don't know what you miss in the MAS? Most of it is bug finxing right now^^ WSS is also in pretty good shape.
    WifiRemote needs some more love^^

    Hi FreakyJ,
    i really really appreciate your work!
    These are the things i'm missing right now to get this working with the MediaPortal plugin for Emby:
    GetCards

    ReadSettingFromDatabase

    SearchProgramsDetailed

    GetRecordingById
    DeleteRecording

    GetScheduleById
    AddScheduleDetailed
    EditSchedule
    CancelSchedule
    DeleteSchedule

    GetTranscoderProfiles
    GetTranscoderProfileByName

    FinishStream
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    I makrked these functions as bold in my list, so they have higher priority :)

    But these functions are not documented:
    DeleteRecording
    EditSchedule

    Or do I miss simehting?
     

    pünktchen

    Portal Pro
    October 26, 2010
    537
    201
    Home Country
    Germany Germany
    I makrked these functions as bold in my list, so they have higher priority :)

    But these functions are not documented:
    DeleteRecording
    EditSchedule

    Or do I miss simehting?
    You are right. DeleteRecording is only in the 0.6.0-beta branch of MPExtended.
    EditSchedule is missing in the wiki but uses the nearly same parameters as AddScheduleDetailed (scheduleId instead of programId)
     

    johanj

    MP Donator
  • Premium Supporter
  • January 31, 2009
    781
    398
    47
    Home Country
    Sweden Sweden
    Delete recording was added by Oxan when I asked him, maybe he didnt added to the docs since it was for the 0.6 version and only 0.54 has docs. This function actually deletes the recording, i.e. file and database, and not just a schedule. I hope I talk about right function, not at computer now.

    Not sure about edit schedule, I have never used it.

    I can post the parameters for the delete request.
     

    pünktchen

    Portal Pro
    October 26, 2010
    537
    201
    Home Country
    Germany Germany
    EditSchedule
    https://github.com//MPExtended/blob...VAccessService.Interfaces/ITVAccessService.cs
    Code:
    [OperationContract]
    [WebGet(ResponseFormat = WebMessageFormat.Json)]
    WebBoolResult EditSchedule(int scheduleId, int? channelId = null, string title = null, DateTime? startTime = null, DateTime? endTime = null, WebScheduleType? scheduleType = null, int? preRecordInterval = null, int? postRecordInterval = null, string directory = null, int? priority = null);

    https://github.com//MPExtended/blob...d.Services.TVAccessService/TVAccessService.cs
    Code:
    public WebBoolResult EditSchedule(int scheduleId, int? channelId = null, string title = null, DateTime? startTime = null, DateTime? endTime = null, WebScheduleType? scheduleType = null, int? preRecordInterval = null, int? postRecordInterval = null, string directory = null, int? priority = null)
    {
    try
    {
    Log.Debug("Editing schedule {0} on channel {1} for {2}, {3} till {4}, type {5}", scheduleId, channelId, title, startTime, endTime, scheduleType);
    Schedule schedule = Schedule.Retrieve(scheduleId);
    if (channelId != null && channelId.HasValue)
    {
    schedule.IdChannel = channelId.Value;
    }
    if (title != null)
    {
    schedule.ProgramName = title;
    }
    if (startTime != null && startTime.HasValue)
    {
    schedule.StartTime = startTime.Value;
    }
    if (endTime != null && endTime.HasValue)
    {
    schedule.EndTime = endTime.Value;
    }
    if (scheduleType != null && scheduleType.HasValue)
    {
    ScheduleRecordingType scheduleRecType = (ScheduleRecordingType)scheduleType.Value;
    schedule.ScheduleType = (int)scheduleRecType;
    }
    if (preRecordInterval != null && preRecordInterval.HasValue)
    {
    schedule.PreRecordInterval = preRecordInterval.Value;
    }
    if (postRecordInterval != null && postRecordInterval.HasValue)
    {
    schedule.PostRecordInterval = postRecordInterval.Value;
    }
    if (directory != null)
    {
    schedule.Directory = directory;
    }
    if (priority != null && priority.HasValue)
    {
    schedule.Priority = priority.Value;
    }
    schedule.Persist();
    _tvControl.OnNewSchedule(); // I don't think this is needed, but doesn't hurt either
    return true;
    }
    catch (Exception ex)
    {
    Log.Warn(String.Format("Failed to edit schedule {0}", scheduleId), ex);
    return false;
    }
    }
    [DOUBLEPOST=1445193197][/DOUBLEPOST]Btw. CancelSchedule in MPExtended doesn't work:
    Code:
    public WebBoolResult CancelSchedule(int programId)
    {
    try
    {
    Log.Debug("Canceling schedule for programId {0}", programId);
    var program = Program.Retrieve(programId);
    foreach (Schedule schedule in Schedule.ListAll().Where(schedule => schedule.IsRecordingProgram(program, true)))
    {
    switch (schedule.ScheduleType)
    {
    case (int)ScheduleRecordingType.Once:
    schedule.Delete();
    _tvControl.OnNewSchedule();
    break;
    default:
    CanceledSchedule canceledSchedule = new CanceledSchedule(schedule.IdSchedule, schedule.IdChannel, schedule.StartTime);
    canceledSchedule.Persist();
    _tvControl.OnNewSchedule();
    break;
    }
    }
    return true;
    }
    catch (Exception ex)
    {
    Log.Warn(String.Format("Failed to cancel schedule for programId {0}", programId), ex);
    return false;
    }
    }

    It schould be:
    Code:
    CanceledSchedule canceledSchedule = new CanceledSchedule(schedule.IdSchedule, schedule.IdChannel, program.StartTime);
     
    Last edited:

    henso

    Development Group
  • Team MediaPortal
  • February 16, 2012
    2,341
    832
    Home Country
    Denmark Denmark
    @FreakyJ
    I made a lot of changes in the TranscodingService (not pushed jet) and wanted to test them with MP2E. How do I do this? I tried a VM with aMProid 1.1.3 but I don't seem to get any stream request from it when I try to play a movie. I also tried an emulation in android studio with the latest source but seems to be an old version that is not using MPE.
     

    breese

    Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    67
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    I went back and Installed using the installer in Post #1 and copied the new MP2Extension folder over onto both my server (wv-server) and client only (Sylvester).
    When I went into TV on my client, all was blank and the server registered error

    [2015-10-19 06:01:11,765] [131391 ] [48 ] [ERROR] - Warn.: DvArgument: Error serializing argument value
     

    Users who are viewing this thread

    Top Bottom