mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	Trying fix for vote/add on mobile-client
This commit is contained in:
		| @@ -192,6 +192,7 @@ function addPlaylist(arr, guid, offline, socket) { | ||||
|                                             if(!this_element.hasOwnProperty("end")) this_element.end = this_element.duration; | ||||
|                                             this_element.start = parseInt(this_element.start); | ||||
|                                             this_element.end = parseInt(this_element.end); | ||||
|                                             this_element.type = "video"; | ||||
|                                             this_element.duration = parseInt(this_element.duration); | ||||
|                                             if(this_element.start > this_element.end) { | ||||
|                                                 this_element.start = 0; | ||||
|   | ||||
| @@ -31,6 +31,7 @@ var player_ready 	   	  		= false; | ||||
| var viewers 			  		= 1; | ||||
| var temp_user_pass 				= ""; | ||||
| var zoff_api_token = "DwpnKVkaMH2HdcpJT2YPy783SY33byF5/32rbs0+xdU="; | ||||
| //var zoff_api_token = "AhmC4Yg2BhaWPZBXeoWK96DAiAVfbou8TUG2IXtD3ZQ="; | ||||
| var retry_frontpage; | ||||
| var chromecast_specs_sent = false; | ||||
| var dragging 					= false; | ||||
|   | ||||
| @@ -421,7 +421,7 @@ router.route('/api/list/:channel_name/:video_id').put(function(req,res) { | ||||
|     res.header("Access-Control-Allow-Origin", "*"); | ||||
|     res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); | ||||
|     res.header({"Content-Type": "application/json"}); | ||||
|  | ||||
|     console.log("here"); | ||||
|     try { | ||||
|         if(!req.body.hasOwnProperty('adminpass') || !req.body.hasOwnProperty('userpass') || | ||||
|             !req.params.hasOwnProperty('channel_name') || !req.params.hasOwnProperty('video_id')) { | ||||
| @@ -487,8 +487,8 @@ router.route('/api/list/:channel_name/:video_id').put(function(req,res) { | ||||
|                                 res.status(404).send(JSON.stringify(error.not_found.list)); | ||||
|                                 return; | ||||
|                             } | ||||
|                             db.collection(channel_name).find({id: video_id, now_playing: false, type:"video"}, function(err, song) { | ||||
|                                 if(song.length == 0) { | ||||
|                             db.collection(channel_name).find({id: video_id, now_playing: false}, function(err, song) { | ||||
|                                 if(song.length == 0 || (song.hasOwnProperty("type") && song.type == "suggested")) { | ||||
|                                     res.status(404).send(JSON.stringify(error.not_found.local)); | ||||
|                                     return; | ||||
|                                 } else if(song[0].guids.indexOf(guid) > -1) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user