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