From 73e64de1ffb3637783d5a480a618b0db1708ee98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?=
Date: Fri, 17 Apr 2015 22:32:11 +0200
Subject: [PATCH 1/7] Fixed remove song bug, making the server crash
---
server/server.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/server.js b/server/server.js
index 961d3da6..5668d052 100755
--- a/server/server.js
+++ b/server/server.js
@@ -370,7 +370,7 @@ function hash_pass(adminpass)
function vote(coll, id, guid, socket)
{
db.collection(coll).find({id:id}, function(err, docs){
- if(!contains(docs[0]["guids"], guid))
+ if(docs.length > 0 && !contains(docs[0]["guids"], guid))
{
db.collection(coll).update({id:id}, {$inc:{votes:1}, $set:{added:get_time()}}, function(err, docs)
{
From e904264f688468a3590513b3476551acb20ad5a0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?=
Date: Sat, 18 Apr 2015 13:30:26 +0200
Subject: [PATCH 2/7] Maybe fix for skip issue
---
server/server.js | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/server/server.js b/server/server.js
index 5668d052..220e474a 100755
--- a/server/server.js
+++ b/server/server.js
@@ -401,34 +401,16 @@ function change_song(coll, id, np_id)
})
}else
{
- if(id === undefined){
//console.log("undef");
db.collection(coll).update({now_playing:true},
{$set:{
now_playing:false,
votes:0,
guids:[]
- }}, function(err, docs)
+ },{multi:true}}, function(err, docs)
{
change_song_post(coll);
});
- }else{
- db.collection(coll).find({id:id}, function(err, docs){
- if(startTime+docs[0]["duration"]<=get_time()-1)
- {
- db.collection(coll).update({now_playing:true, id:id},
- {$set:{
- now_playing:false,
- votes:0,
- guids:[]
- }}, function(err, docs)
- {
- change_song_post(coll);
- });
- }
- });
- }
- }
})
}
From b43d9f4ab0d8f8f77a1b88ee38fb28035efb350b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?=
Date: Sat, 18 Apr 2015 13:32:12 +0200
Subject: [PATCH 3/7] Fixing bugfix
---
server/server.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/server.js b/server/server.js
index 220e474a..cff70d3c 100755
--- a/server/server.js
+++ b/server/server.js
@@ -407,10 +407,11 @@ function change_song(coll, id, np_id)
now_playing:false,
votes:0,
guids:[]
- },{multi:true}}, function(err, docs)
+ }},{multi:true}, function(err, docs)
{
change_song_post(coll);
});
+ }
})
}
From 591ec4e028599f8358a611e11f0d590a1414be2f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?=
Date: Sat, 18 Apr 2015 17:19:56 +0200
Subject: [PATCH 4/7] Fixed multiplying viewers from same computer
---
php/nochan.php | 2 +-
server/server.js | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/php/nochan.php b/php/nochan.php
index 00e3b99e..5a74a368 100755
--- a/php/nochan.php
+++ b/php/nochan.php
@@ -47,7 +47,7 @@ if(isset($_GET['chan'])){
Zöff is mainly a webbased service, but an Android app is made by Lasse Drevland, which has been a huge asset for the dev. team.
The website uses NodeJS with Socket.IO, MongoDB and PHP on the backend, with JavaScript, jQuery and Materialize on the frontend. More about the project itself can be found on GitHub
The team consists of Kasper Rynning-Tønnesen and Nicolas Almagro Tonne, and the project has been worked on since late 2014.
- The team can be reached on either kasper@kasperrt.no or me@nixo.no
+ The team can be reached on contact@zoff.no