mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	Other channel is the counter and deciding part
This commit is contained in:
		| @@ -200,18 +200,30 @@ function addFromOtherList(arr, guid, offline, socket) { | ||||
|                                                             frontpage: true, | ||||
|                                                             accessed: Functions.get_time() | ||||
|                                                           }; | ||||
|  | ||||
|                                                           db.collection( | ||||
|                                                             new_channel | ||||
|                                                           ).find( | ||||
|                                                             { | ||||
|                                                               now_playing: true | ||||
|                                                             }, | ||||
|                                                             function( | ||||
|                                                               e, | ||||
|                                                               np_docs | ||||
|                                                             ) { | ||||
|                                                               to_change.id = | ||||
|                                                             np[0].id; | ||||
|                                                                 np_docs[0].id; | ||||
|                                                               to_change.title = | ||||
|                                                             np[0].title; | ||||
|                                                                 np_docs[0].title; | ||||
|                                                               db.collection( | ||||
|                                                                 "frontpage_lists" | ||||
|                                                               ).find( | ||||
|                                                                 { | ||||
|                                                                   _id: new_channel | ||||
|                                                                 }, | ||||
|                                                             function(e, doc) { | ||||
|                                                                 function( | ||||
|                                                                   e, | ||||
|                                                                   doc | ||||
|                                                                 ) { | ||||
|                                                                   if ( | ||||
|                                                                     doc.length > | ||||
|                                                                       0 && | ||||
| @@ -226,7 +238,8 @@ function addFromOtherList(arr, guid, offline, socket) { | ||||
|                                                                       ) > -1 || | ||||
|                                                                         doc[0].thumbnail.indexOf( | ||||
|                                                                           "https://w1.sndcdn.com" | ||||
|                                                                     ) > -1)) || | ||||
|                                                                         ) > | ||||
|                                                                           -1)) || | ||||
|                                                                       (doc[0] | ||||
|                                                                         .thumbnail == | ||||
|                                                                         "" || | ||||
| @@ -235,7 +248,7 @@ function addFromOtherList(arr, guid, offline, socket) { | ||||
|                                                                           undefined)) | ||||
|                                                                   ) { | ||||
|                                                                     to_change.thumbnail = | ||||
|                                                                   np[0].thumbnail; | ||||
|                                                                       np_docs[0].thumbnail; | ||||
|                                                                   } | ||||
|  | ||||
|                                                                   db.collection( | ||||
| @@ -247,7 +260,10 @@ function addFromOtherList(arr, guid, offline, socket) { | ||||
|                                                                     { | ||||
|                                                                       $set: to_change | ||||
|                                                                     }, | ||||
|                                                                 function(e, d) { | ||||
|                                                                     function( | ||||
|                                                                       e, | ||||
|                                                                       d | ||||
|                                                                     ) { | ||||
|                                                                       List.send_list( | ||||
|                                                                         channel, | ||||
|                                                                         undefined, | ||||
| @@ -268,6 +284,8 @@ function addFromOtherList(arr, guid, offline, socket) { | ||||
|                                                                   ); | ||||
|                                                                 } | ||||
|                                                               ); | ||||
|                                                             } | ||||
|                                                           ); | ||||
|                                                         } else { | ||||
|                                                           db.collection( | ||||
|                                                             "frontpage_lists" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user