-fixed issue with unix pypo user not being assigned to groups
-fixed issue with time being incorrect if server was in different timezone
This commit is contained in:
parent
7751ad7ac7
commit
755c5a8469
|
@ -472,10 +472,11 @@ class Schedule {
|
|||
}
|
||||
|
||||
$timeNow = Schedule::GetSchedulerTime();
|
||||
return array("schedulerTime"=>$timeNow,"previous"=>Schedule::GetPreviousItems($timeNow),
|
||||
return array("schedulerTime"=>gmdate("Y-m-d H:i:s"),"previous"=>Schedule::GetPreviousItems($timeNow),
|
||||
"current"=>Schedule::GetCurrentlyPlaying($timeNow),
|
||||
"next"=>Schedule::GetNextItems($timeNow),
|
||||
"timezone"=> date("T"));
|
||||
"timezone"=> date("T"),
|
||||
"timezoneOffset"=> date("Z"));
|
||||
}
|
||||
|
||||
public static function GetPreviousItems($timeNow, $prevCount = 1){
|
||||
|
|
|
@ -72,9 +72,6 @@ function convertDateToHHMMSS(epochTime){
|
|||
var hours = d.getUTCHours().toString();
|
||||
var minutes = d.getUTCMinutes().toString();
|
||||
var seconds = d.getUTCSeconds().toString();
|
||||
|
||||
//if (hours == "NaN")
|
||||
//alert("epochTime: " + epochTime);
|
||||
|
||||
if (hours.length == 1)
|
||||
hours = "0" + hours;
|
||||
|
|
|
@ -43,8 +43,6 @@ function getTrackInfo(song){
|
|||
str += song.track_title;
|
||||
if (song.artist_name != null)
|
||||
str += " - " + song.artist_name;
|
||||
//if (song.album_title != null)
|
||||
//str += " - " + song.album_title;
|
||||
|
||||
str += ","
|
||||
|
||||
|
@ -188,6 +186,7 @@ function calcAdditionalData(currentItem, bUpdateGlobalValues){
|
|||
|
||||
function parseItems(obj){
|
||||
var schedulePosixTime = convertDateToPosixTime(obj.schedulerTime);
|
||||
schedulePosixTime += parseInt(obj.timezoneOffset)*1000;
|
||||
|
||||
$('#time-zone').text(obj.timezone);
|
||||
|
||||
|
|
|
@ -35,9 +35,6 @@ def create_user(username):
|
|||
print "Creating user "+username
|
||||
os.system("adduser --system --quiet --group --shell /bin/bash "+username)
|
||||
|
||||
#add pypo to audio group
|
||||
os.system("adduser " + username + " audio")
|
||||
|
||||
#set pypo password
|
||||
p = os.popen('/usr/bin/passwd pypo', 'w')
|
||||
p.write('pypo\n')
|
||||
|
@ -45,6 +42,8 @@ def create_user(username):
|
|||
p.close()
|
||||
else:
|
||||
print "User already exists."
|
||||
#add pypo to audio group
|
||||
os.system("adduser " + username + " pulse-access 2>&1 1>/dev/null")
|
||||
|
||||
def copy_dir(src_dir, dest_dir):
|
||||
if (os.path.exists(dest_dir)) and (dest_dir != "/"):
|
||||
|
|
Loading…
Reference in New Issue