Just for your information: It looks like the server part just extends the Fanartprovider and enables you to get Tv LogosCan you also give me pointers of what files to copy from the MPExt tv plugin?
Good questions and hard to answer.You have made huge progress the last couple of weeks. How much will you be able to work on this when school starts?
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^^
You are right. DeleteRecording is only in the 0.6.0-beta branch of MPExtended.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?
That would be helpfulI can post the parameters for the delete request.
[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);
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;
}
}
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;
}
}
CanceledSchedule canceledSchedule = new CanceledSchedule(schedule.IdSchedule, schedule.IdChannel, program.StartTime);