- September 1, 2008
- 21,577
- 8,224
- Home Country
- New Zealand
That's it, I'm convinced that Sebastiii's fix is wrong. It completely breaks conflict detection for anybody that has more than one tuner.
To fix this problem I would revert these commits:
https://github.com/MediaPortal/MediaPortal-1/commit/00d04a7f4877aaf405c066f4077b99b9fb0aa2c4
https://github.com/MediaPortal/MediaPortal-1/commit/0c63c005c06678dc7be9d6040d8d519cb5c78a1e
Then to fix the problem reported here that the above commits were designed to fix, I would simply remove this "break;" line:
https://github.com/MediaPortal/Medi...tabase/TvBusinessLayer/BusinessLayer.cs#L2999
While I was looking at that code, I'd also fix another terrible bug.
Remove isSameTransponder() from the Schedule class in the TVDatabase project and replace the references to it with a call to this function, which should be placed in the TvBusinessLayer:
To fix this problem I would revert these commits:
https://github.com/MediaPortal/MediaPortal-1/commit/00d04a7f4877aaf405c066f4077b99b9fb0aa2c4
https://github.com/MediaPortal/MediaPortal-1/commit/0c63c005c06678dc7be9d6040d8d519cb5c78a1e
Then to fix the problem reported here that the above commits were designed to fix, I would simply remove this "break;" line:
https://github.com/MediaPortal/Medi...tabase/TvBusinessLayer/BusinessLayer.cs#L2999
While I was looking at that code, I'd also fix another terrible bug.
Remove isSameTransponder() from the Schedule class in the TVDatabase project and replace the references to it with a call to this function, which should be placed in the TvBusinessLayer:
Code:
/// <summary>
/// checks if 2 schedules have a common Transponder
/// depending on tuningdetails of their respective channels
/// </summary>
/// <param name="schedule"></param>
/// <returns>True if a common transponder exists</returns>
public bool isSameTransponder(Schedule schedule1, Schedule schedule2)
{
IList<TuningDetail> tuningDetailList1 = schedule1.ReferencedChannel().ReferringTuningDetail();
IList<TuningDetail> tuningDetailList2 = schedule2.ReferencedChannel().ReferringTuningDetail();
foreach (TuningDetail td1 in tuningDetailList1)
{
IChannel c1 = GetTuningChannel(td1);
foreach (TuningDetail td2 in tuningDetailList2)
{
if (!c1.IsDifferentTransponder(GetTuningChannel(td2)))
{
return true;
}
}
}
return false;
}