Merge branch 'bpm1992-cart_sched1' into stable

This commit is contained in:
Fred Gleason 2016-04-26 17:00:29 -04:00
commit 20101e168c
2 changed files with 5 additions and 1 deletions

View File

@ -15098,3 +15098,6 @@
saving and updating logs. (from albanpeigner pull request #42) saving and updating logs. (from albanpeigner pull request #42)
* Created modification pointer in voicetracker for better performance * Created modification pointer in voicetracker for better performance
over WAN networks over WAN networks
2016-04-26 Brian McGlynn <brian.mcglynn@geneseemedia.net>
* Updated Cart Scheduler to favor weighted playback for cuts expiring
first following the number of plays

View File

@ -129,7 +129,8 @@ bool RDCart::selectCut(QString *cut,const QTime &time) const
QString().sprintf("(CART_NUMBER=%u)&&(EVERGREEN=\"N\")&&",cart_number)+ QString().sprintf("(CART_NUMBER=%u)&&(EVERGREEN=\"N\")&&",cart_number)+
"(LENGTH>0)"; "(LENGTH>0)";
if(useWeighting()) { if(useWeighting()) {
sql+=" order by LOCAL_COUNTER"; sql+=" order by LOCAL_COUNTER ASC, ISNULL(END_DATETIME), END_DATETIME ASC, \
LAST_PLAY_DATETIME ASC";
} }
else { else {
sql+=" order by LAST_PLAY_DATETIME desc"; sql+=" order by LAST_PLAY_DATETIME desc";