Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2012
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. diff --git a/mythtv/libs/libmythtv/channelbase.cpp b/mythtv/libs/libmythtv/channelbase.cpp
  2. index 8c31420..f90a117 100644
  3. --- a/mythtv/libs/libmythtv/channelbase.cpp
  4. +++ b/mythtv/libs/libmythtv/channelbase.cpp
  5. @@ -549,6 +549,7 @@ vector<InputInfo> ChannelBase::GetFreeInputs(
  6. const vector<uint> &excluded_cardids) const
  7. {
  8. vector<InputInfo> new_list;
  9. + bool anybusy = false;
  10.  
  11. QStringList list = GetConnectedInputs();
  12. if (list.empty())
  13. @@ -592,10 +593,22 @@ vector<InputInfo> ChannelBase::GetFreeInputs(
  14. info.inputid, groupids, excluded_cardids,
  15. busygrp, busyrec, busyin, info.mplexid);
  16.  
  17. + if (is_busy_grp && info.livetvorder)
  18. + anybusy = true;
  19. +
  20. if (!is_busy_grp && info.livetvorder)
  21. new_list.push_back(info);
  22. }
  23.  
  24. + // If any inputs are busy and the user prefers a completely free
  25. + // card for live TV, penalize all inputs to make sure they will
  26. + // come after those on free cards.
  27. + if (anybusy && gCoreContext->GetSetting("PreferFreeCardForLiveTV", 0))
  28. + {
  29. + for (uint i = 0; i < new_list.size(); ++i)
  30. + new_list[i].livetvorder += 100;
  31. + }
  32. +
  33. return new_list;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement