@ -223,8 +223,8 @@ namespace MediaBrowser.Server.Implementations.Photos
protected virtual List < BaseItem > GetFinalItems ( List < BaseItem > items , int limit )
{
// Rotate the images no more than once per week
var random = new Random ( GetWeekOfYear ( ) ) . Next ( ) ;
// Rotate the images once every 7 days
var random = DateTime . Now . DayOfYear % 7 ;
return items
. OrderBy ( i = > ( random + "" + items . IndexOf ( i ) ) . GetMD5 ( ) )
@ -233,18 +233,6 @@ namespace MediaBrowser.Server.Implementations.Photos
. ToList ( ) ;
}
private int GetWeekOfYear ( )
{
return DateTime . Now . Second ;
var usCulture = new CultureInfo ( "en-US" ) ;
var weekNo = usCulture . Calendar . GetWeekOfYear (
DateTime . Now ,
usCulture . DateTimeFormat . CalendarWeekRule ,
usCulture . DateTimeFormat . FirstDayOfWeek ) ;
return weekNo ;
}
public int Order
{
get