mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	Moved SoundCloud api-key out to different config file and fixed some list-naming issues that was caused with filter.clean was performed after list-name was encoded. Closes #362
This commit is contained in:
		
							
								
								
									
										92
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										92
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -171,7 +171,7 @@ | |||||||
|     "arr-flatten": { |     "arr-flatten": { | ||||||
|       "version": "1.1.0", |       "version": "1.1.0", | ||||||
|       "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", |       "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", | ||||||
|       "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=" |       "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" | ||||||
|     }, |     }, | ||||||
|     "arr-union": { |     "arr-union": { | ||||||
|       "version": "3.1.0", |       "version": "3.1.0", | ||||||
| @@ -231,7 +231,7 @@ | |||||||
|     "async": { |     "async": { | ||||||
|       "version": "1.5.2", |       "version": "1.5.2", | ||||||
|       "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", |       "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", | ||||||
|       "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==" |       "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" | ||||||
|     }, |     }, | ||||||
|     "async-limiter": { |     "async-limiter": { | ||||||
|       "version": "1.0.0", |       "version": "1.0.0", | ||||||
| @@ -885,7 +885,7 @@ | |||||||
|     }, |     }, | ||||||
|     "content-type": { |     "content-type": { | ||||||
|       "version": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", |       "version": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", | ||||||
|       "integrity": "sha1-4TjMdeBAxyexlm/l5fjJruJW/js=" |       "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" | ||||||
|     }, |     }, | ||||||
|     "convert-source-map": { |     "convert-source-map": { | ||||||
|       "version": "1.5.1", |       "version": "1.5.1", | ||||||
| @@ -894,7 +894,7 @@ | |||||||
|     }, |     }, | ||||||
|     "cookie": { |     "cookie": { | ||||||
|       "version": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", |       "version": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", | ||||||
|       "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" |       "integrity": "sha512-+IJOX0OqlHCszo2mBUq+SrEbCj6w7Kpffqx60zYbPTFaO4+yYgRjHwcZNpWvaTylDHaV7PPmBHzSecZiMhtPgw==" | ||||||
|     }, |     }, | ||||||
|     "cookie-parser": { |     "cookie-parser": { | ||||||
|       "version": "1.4.3", |       "version": "1.4.3", | ||||||
| @@ -919,7 +919,7 @@ | |||||||
|     }, |     }, | ||||||
|     "cookie-signature": { |     "cookie-signature": { | ||||||
|       "version": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", |       "version": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", | ||||||
|       "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" |       "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" | ||||||
|     }, |     }, | ||||||
|     "copy-descriptor": { |     "copy-descriptor": { | ||||||
|       "version": "0.1.1", |       "version": "0.1.1", | ||||||
| @@ -929,7 +929,7 @@ | |||||||
|     "core-util-is": { |     "core-util-is": { | ||||||
|       "version": "1.0.2", |       "version": "1.0.2", | ||||||
|       "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", |       "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", | ||||||
|       "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" |       "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" | ||||||
|     }, |     }, | ||||||
|     "cors": { |     "cors": { | ||||||
|       "version": "2.8.4", |       "version": "2.8.4", | ||||||
| @@ -1026,7 +1026,7 @@ | |||||||
|     }, |     }, | ||||||
|     "debug": { |     "debug": { | ||||||
|       "version": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", |       "version": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", | ||||||
|       "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", |       "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "ms": "2.0.0" |         "ms": "2.0.0" | ||||||
|       } |       } | ||||||
| @@ -1108,7 +1108,7 @@ | |||||||
|     "delayed-stream": { |     "delayed-stream": { | ||||||
|       "version": "1.0.0", |       "version": "1.0.0", | ||||||
|       "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", |       "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", | ||||||
|       "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" |       "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" | ||||||
|     }, |     }, | ||||||
|     "delegates": { |     "delegates": { | ||||||
|       "version": "1.0.0", |       "version": "1.0.0", | ||||||
| @@ -1117,7 +1117,7 @@ | |||||||
|     }, |     }, | ||||||
|     "depd": { |     "depd": { | ||||||
|       "version": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", |       "version": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", | ||||||
|       "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" |       "integrity": "sha512-Jlk9xvkTDGXwZiIDyoM7+3AsuvJVoyOpRupvEVy9nX3YO3/ieZxhlgh8GpLNZ8AY7HjO6y2YwpMSh1ejhu3uIw==" | ||||||
|     }, |     }, | ||||||
|     "deprecated": { |     "deprecated": { | ||||||
|       "version": "0.0.1", |       "version": "0.0.1", | ||||||
| @@ -1188,7 +1188,7 @@ | |||||||
|     }, |     }, | ||||||
|     "ee-first": { |     "ee-first": { | ||||||
|       "version": "1.1.1", |       "version": "1.1.1", | ||||||
|       "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", |       "resolved": "", | ||||||
|       "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" |       "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" | ||||||
|     }, |     }, | ||||||
|     "encodeurl": { |     "encodeurl": { | ||||||
| @@ -1587,7 +1587,7 @@ | |||||||
|     "express-session": { |     "express-session": { | ||||||
|       "version": "1.15.6", |       "version": "1.15.6", | ||||||
|       "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.15.6.tgz", |       "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.15.6.tgz", | ||||||
|       "integrity": "sha1-R7QWDIj0KrcP6KUI4xy/92dXqwo=", |       "integrity": "sha512-r0nrHTCYtAMrFwZ0kBzZEXa1vtPVrw0dKvGSrKP4dahwBQ1BJpF2/y1Pp4sCD/0kvxV4zZeclyvfmw0B4RMJQA==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "cookie": "0.3.1", |         "cookie": "0.3.1", | ||||||
|         "cookie-signature": "1.0.6", |         "cookie-signature": "1.0.6", | ||||||
| @@ -1662,7 +1662,7 @@ | |||||||
|         "lodash": { |         "lodash": { | ||||||
|           "version": "4.17.5", |           "version": "4.17.5", | ||||||
|           "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", |           "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", | ||||||
|           "integrity": "sha1-maktZcAnLevoyWtgV7yPv6O+1RE=" |           "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" | ||||||
|         }, |         }, | ||||||
|         "mime": { |         "mime": { | ||||||
|           "version": "1.2.4", |           "version": "1.2.4", | ||||||
| @@ -1703,7 +1703,7 @@ | |||||||
|         "mongoose": { |         "mongoose": { | ||||||
|           "version": "4.13.11", |           "version": "4.13.11", | ||||||
|           "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-4.13.11.tgz", |           "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-4.13.11.tgz", | ||||||
|           "integrity": "sha1-2m7fjjmQVOEoNgFjFpmVGaNY20M=", |           "integrity": "sha512-OgXmFc3vzXwq4zWp41XfSBDnKZLqnBc4Kh7mwwGjBE5iWH5tfkixaPK0uFtpEuzDzUvAIg33bgniyTsmc00olA==", | ||||||
|           "requires": { |           "requires": { | ||||||
|             "async": "2.1.4", |             "async": "2.1.4", | ||||||
|             "bson": "~1.0.4", |             "bson": "~1.0.4", | ||||||
| @@ -1723,7 +1723,7 @@ | |||||||
|         "mquery": { |         "mquery": { | ||||||
|           "version": "2.3.3", |           "version": "2.3.3", | ||||||
|           "resolved": "https://registry.npmjs.org/mquery/-/mquery-2.3.3.tgz", |           "resolved": "https://registry.npmjs.org/mquery/-/mquery-2.3.3.tgz", | ||||||
|           "integrity": "sha1-IhQS5dTnKQylWC3RbqjxkKUGtRg=", |           "integrity": "sha512-NC8L14kn+qxJbbJ1gbcEMDxF0sC3sv+1cbRReXXwVvowcwY1y9KoVZFq0ebwARibsadu8lx8nWGvm3V0Pf0ZWQ==", | ||||||
|           "requires": { |           "requires": { | ||||||
|             "bluebird": "3.5.0", |             "bluebird": "3.5.0", | ||||||
|             "debug": "2.6.9", |             "debug": "2.6.9", | ||||||
| @@ -1784,7 +1784,7 @@ | |||||||
|         "string_decoder": { |         "string_decoder": { | ||||||
|           "version": "1.0.3", |           "version": "1.0.3", | ||||||
|           "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", |           "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", | ||||||
|           "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", |           "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", | ||||||
|           "requires": { |           "requires": { | ||||||
|             "safe-buffer": "~5.1.0" |             "safe-buffer": "~5.1.0" | ||||||
|           } |           } | ||||||
| @@ -2071,7 +2071,7 @@ | |||||||
|     "function-bind": { |     "function-bind": { | ||||||
|       "version": "1.1.1", |       "version": "1.1.1", | ||||||
|       "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", |       "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", | ||||||
|       "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=" |       "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" | ||||||
|     }, |     }, | ||||||
|     "gauge": { |     "gauge": { | ||||||
|       "version": "2.7.4", |       "version": "2.7.4", | ||||||
| @@ -2662,7 +2662,7 @@ | |||||||
|     "hooks-fixed": { |     "hooks-fixed": { | ||||||
|       "version": "2.0.2", |       "version": "2.0.2", | ||||||
|       "resolved": "https://registry.npmjs.org/hooks-fixed/-/hooks-fixed-2.0.2.tgz", |       "resolved": "https://registry.npmjs.org/hooks-fixed/-/hooks-fixed-2.0.2.tgz", | ||||||
|       "integrity": "sha1-IAdtqgfnfYphBog84/FyLgURQLA=" |       "integrity": "sha512-YurCM4gQSetcrhwEtpQHhQ4M7Zo7poNGqY4kQGeBS6eZtOcT3tnNs01ThFa0jYBByAiYt1MjMjP/YApG0EnAvQ==" | ||||||
|     }, |     }, | ||||||
|     "hpkp": { |     "hpkp": { | ||||||
|       "version": "2.0.0", |       "version": "2.0.0", | ||||||
| @@ -2676,7 +2676,7 @@ | |||||||
|     }, |     }, | ||||||
|     "http-errors": { |     "http-errors": { | ||||||
|       "version": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", |       "version": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", | ||||||
|       "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", |       "integrity": "sha512-STnYGcKMXL9CGdtpeTFnLmgMSHTTNQJSHxiC4DETHKf934Q160Ht5pljrNeH24S0O9xUN+9vsDJZdZtk5js6Ww==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "depd": "1.1.1", |         "depd": "1.1.1", | ||||||
|         "inherits": "2.0.3", |         "inherits": "2.0.3", | ||||||
| @@ -2743,7 +2743,7 @@ | |||||||
|     "iconv-lite": { |     "iconv-lite": { | ||||||
|       "version": "0.4.19", |       "version": "0.4.19", | ||||||
|       "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", |       "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", | ||||||
|       "integrity": "sha1-90aPYBNfXl2tM5nAqBvpoWA6CCs=" |       "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" | ||||||
|     }, |     }, | ||||||
|     "ienoopen": { |     "ienoopen": { | ||||||
|       "version": "1.0.0", |       "version": "1.0.0", | ||||||
| @@ -2774,7 +2774,7 @@ | |||||||
|     "inherits": { |     "inherits": { | ||||||
|       "version": "2.0.3", |       "version": "2.0.3", | ||||||
|       "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", |       "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", | ||||||
|       "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==" |       "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" | ||||||
|     }, |     }, | ||||||
|     "ini": { |     "ini": { | ||||||
|       "version": "1.3.5", |       "version": "1.3.5", | ||||||
| @@ -2919,7 +2919,7 @@ | |||||||
|     "is-plain-object": { |     "is-plain-object": { | ||||||
|       "version": "2.0.4", |       "version": "2.0.4", | ||||||
|       "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", |       "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", | ||||||
|       "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", |       "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "isobject": "^3.0.1" |         "isobject": "^3.0.1" | ||||||
|       } |       } | ||||||
| @@ -3302,7 +3302,7 @@ | |||||||
|     }, |     }, | ||||||
|     "mime": { |     "mime": { | ||||||
|       "version": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", |       "version": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", | ||||||
|       "integrity": "sha1-Eh+evEnjdm8xGnbh+hyAA8SwOqY=" |       "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" | ||||||
|     }, |     }, | ||||||
|     "mimic-response": { |     "mimic-response": { | ||||||
|       "version": "1.0.0", |       "version": "1.0.0", | ||||||
| @@ -3351,14 +3351,14 @@ | |||||||
|     }, |     }, | ||||||
|     "mkdirp": { |     "mkdirp": { | ||||||
|       "version": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", |       "version": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", | ||||||
|       "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", |       "integrity": "sha512-SknJC52obPfGQPnjIkXbmA6+5H15E+fR+E4iR2oQ3zzCLbd7/ONua69R/Gw7AgkTLsRG+r5fzksYwWe1AgTyWA==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "minimist": "0.0.8" |         "minimist": "0.0.8" | ||||||
|       }, |       }, | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "minimist": { |         "minimist": { | ||||||
|           "version": "0.0.8", |           "version": "0.0.8", | ||||||
|           "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", |           "resolved": "", | ||||||
|           "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" |           "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @@ -3575,7 +3575,7 @@ | |||||||
|     "mongoose-legacy-pluralize": { |     "mongoose-legacy-pluralize": { | ||||||
|       "version": "1.0.2", |       "version": "1.0.2", | ||||||
|       "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", |       "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", | ||||||
|       "integrity": "sha1-O6n5H6UHtRhtOZ+0CFS/8Y+1Y+Q=" |       "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" | ||||||
|     }, |     }, | ||||||
|     "mpath": { |     "mpath": { | ||||||
|       "version": "0.3.0", |       "version": "0.3.0", | ||||||
| @@ -3590,7 +3590,7 @@ | |||||||
|     "mquery": { |     "mquery": { | ||||||
|       "version": "3.0.0", |       "version": "3.0.0", | ||||||
|       "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.0.0.tgz", |       "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.0.0.tgz", | ||||||
|       "integrity": "sha1-5fOH26vAubaYWeVQ6BD6q+DOq7A=", |       "integrity": "sha512-WL1Lk8v4l8VFSSwN3yCzY9TXw+fKVYKn6f+w86TRzOLSE8k1yTgGaLBPUByJQi8VcLbOdnUneFV/y3Kv874pnQ==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "bluebird": "3.5.0", |         "bluebird": "3.5.0", | ||||||
|         "debug": "2.6.9", |         "debug": "2.6.9", | ||||||
| @@ -3607,7 +3607,7 @@ | |||||||
|     }, |     }, | ||||||
|     "ms": { |     "ms": { | ||||||
|       "version": "2.0.0", |       "version": "2.0.0", | ||||||
|       "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", |       "resolved": "", | ||||||
|       "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" |       "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" | ||||||
|     }, |     }, | ||||||
|     "multipipe": { |     "multipipe": { | ||||||
| @@ -3621,7 +3621,7 @@ | |||||||
|     "muri": { |     "muri": { | ||||||
|       "version": "1.3.0", |       "version": "1.3.0", | ||||||
|       "resolved": "https://registry.npmjs.org/muri/-/muri-1.3.0.tgz", |       "resolved": "https://registry.npmjs.org/muri/-/muri-1.3.0.tgz", | ||||||
|       "integrity": "sha1-rszz22TFaqfFs04A+Vt4eFJ6RyE=" |       "integrity": "sha512-FiaFwKl864onHFFUV/a2szAl7X0fxVlSKNdhTf+BM8i8goEgYut8u5P9MqQqIYwvaMxjzVESsoEm/2kfkFH1rg==" | ||||||
|     }, |     }, | ||||||
|     "nan": { |     "nan": { | ||||||
|       "version": "2.10.0", |       "version": "2.10.0", | ||||||
| @@ -3661,7 +3661,7 @@ | |||||||
|     }, |     }, | ||||||
|     "negotiator": { |     "negotiator": { | ||||||
|       "version": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", |       "version": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", | ||||||
|       "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" |       "integrity": "sha512-qTxkr1RoLw5Pz+1+PTJ/66hWuyi2LEOeOuIDJDlx6JF8x75bmD5C7qXTg2UlX5W9rLfkqKP+r8q6Vy6NWdWrbw==" | ||||||
|     }, |     }, | ||||||
|     "next-tick": { |     "next-tick": { | ||||||
|       "version": "1.0.0", |       "version": "1.0.0", | ||||||
| @@ -3844,7 +3844,7 @@ | |||||||
|     }, |     }, | ||||||
|     "on-finished": { |     "on-finished": { | ||||||
|       "version": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", |       "version": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", | ||||||
|       "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", |       "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "ee-first": "1.1.1" |         "ee-first": "1.1.1" | ||||||
|       } |       } | ||||||
| @@ -3964,7 +3964,7 @@ | |||||||
|     }, |     }, | ||||||
|     "parseurl": { |     "parseurl": { | ||||||
|       "version": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", |       "version": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", | ||||||
|       "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" |       "integrity": "sha512-DjIMrEiCuzD/Xsr69WhcPCTeb6iZP5JgL/DZ3cYz0zMnyiXiscoqC6LLV2dYwQHfy9O+twCDVVPiFWb7xZhaOw==" | ||||||
|     }, |     }, | ||||||
|     "pascalcase": { |     "pascalcase": { | ||||||
|       "version": "0.1.1", |       "version": "0.1.1", | ||||||
| @@ -4101,7 +4101,7 @@ | |||||||
|     "promise": { |     "promise": { | ||||||
|       "version": "7.3.1", |       "version": "7.3.1", | ||||||
|       "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", |       "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", | ||||||
|       "integrity": "sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=", |       "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "asap": "~2.0.3" |         "asap": "~2.0.3" | ||||||
|       } |       } | ||||||
| @@ -4141,7 +4141,7 @@ | |||||||
|     }, |     }, | ||||||
|     "qs": { |     "qs": { | ||||||
|       "version": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", |       "version": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", | ||||||
|       "integrity": "sha1-NJzfbu+J7EXBLX1es/wMhwNDptg=" |       "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" | ||||||
|     }, |     }, | ||||||
|     "random-bytes": { |     "random-bytes": { | ||||||
|       "version": "1.0.0", |       "version": "1.0.0", | ||||||
| @@ -4259,7 +4259,7 @@ | |||||||
|     "redis": { |     "redis": { | ||||||
|       "version": "2.8.0", |       "version": "2.8.0", | ||||||
|       "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz", |       "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz", | ||||||
|       "integrity": "sha1-ICKI4/WMSfYHnZevehDhMDrhSwI=", |       "integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "double-ended-queue": "^2.1.0-0", |         "double-ended-queue": "^2.1.0-0", | ||||||
|         "redis-commands": "^1.2.0", |         "redis-commands": "^1.2.0", | ||||||
| @@ -4423,7 +4423,7 @@ | |||||||
|     "require_optional": { |     "require_optional": { | ||||||
|       "version": "1.0.1", |       "version": "1.0.1", | ||||||
|       "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", |       "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", | ||||||
|       "integrity": "sha1-TPNaQkf2TKPfjC7yCMxJSxyo/C4=", |       "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "resolve-from": "^2.0.0", |         "resolve-from": "^2.0.0", | ||||||
|         "semver": "^5.1.0" |         "semver": "^5.1.0" | ||||||
| @@ -4455,7 +4455,7 @@ | |||||||
|     }, |     }, | ||||||
|     "resolve-from": { |     "resolve-from": { | ||||||
|       "version": "2.0.0", |       "version": "2.0.0", | ||||||
|       "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", |       "resolved": "", | ||||||
|       "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" |       "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" | ||||||
|     }, |     }, | ||||||
|     "resolve-url": { |     "resolve-url": { | ||||||
| @@ -4478,7 +4478,7 @@ | |||||||
|     }, |     }, | ||||||
|     "safe-buffer": { |     "safe-buffer": { | ||||||
|       "version": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", |       "version": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", | ||||||
|       "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=" |       "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" | ||||||
|     }, |     }, | ||||||
|     "safe-regex": { |     "safe-regex": { | ||||||
|       "version": "1.1.0", |       "version": "1.1.0", | ||||||
| @@ -4579,7 +4579,7 @@ | |||||||
|     }, |     }, | ||||||
|     "setprototypeof": { |     "setprototypeof": { | ||||||
|       "version": "1.0.3", |       "version": "1.0.3", | ||||||
|       "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", |       "resolved": "", | ||||||
|       "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" |       "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" | ||||||
|     }, |     }, | ||||||
|     "sigmund": { |     "sigmund": { | ||||||
| @@ -4797,7 +4797,7 @@ | |||||||
|     }, |     }, | ||||||
|     "socket.io-adapter": { |     "socket.io-adapter": { | ||||||
|       "version": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", |       "version": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", | ||||||
|       "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=" |       "integrity": "sha512-a8zS9B5yaggPHh4odsSZJmMmHsVi4eOym5zIjTALl6GQCkOCghorCGQjBCke3WKbY14lgHh7L1E7ZBZy8/sYrQ==" | ||||||
|     }, |     }, | ||||||
|     "socket.io-client": { |     "socket.io-client": { | ||||||
|       "version": "2.1.0", |       "version": "2.1.0", | ||||||
| @@ -5357,7 +5357,7 @@ | |||||||
|     "uid-safe": { |     "uid-safe": { | ||||||
|       "version": "2.1.5", |       "version": "2.1.5", | ||||||
|       "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", |       "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", | ||||||
|       "integrity": "sha1-Kz1cckDo/C5Y+Komnl7knAhXvTo=", |       "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "random-bytes": "~1.0.0" |         "random-bytes": "~1.0.0" | ||||||
|       } |       } | ||||||
| @@ -5424,7 +5424,7 @@ | |||||||
|     }, |     }, | ||||||
|     "unpipe": { |     "unpipe": { | ||||||
|       "version": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", |       "version": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", | ||||||
|       "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" |       "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" | ||||||
|     }, |     }, | ||||||
|     "unset-value": { |     "unset-value": { | ||||||
|       "version": "1.0.0", |       "version": "1.0.0", | ||||||
| @@ -5503,11 +5503,11 @@ | |||||||
|     "util-deprecate": { |     "util-deprecate": { | ||||||
|       "version": "1.0.2", |       "version": "1.0.2", | ||||||
|       "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", |       "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", | ||||||
|       "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" |       "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" | ||||||
|     }, |     }, | ||||||
|     "utils-merge": { |     "utils-merge": { | ||||||
|       "version": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", |       "version": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", | ||||||
|       "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" |       "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" | ||||||
|     }, |     }, | ||||||
|     "v8flags": { |     "v8flags": { | ||||||
|       "version": "2.1.1", |       "version": "2.1.1", | ||||||
| @@ -5519,7 +5519,7 @@ | |||||||
|     }, |     }, | ||||||
|     "vary": { |     "vary": { | ||||||
|       "version": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", |       "version": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", | ||||||
|       "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" |       "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==" | ||||||
|     }, |     }, | ||||||
|     "verror": { |     "verror": { | ||||||
|       "version": "1.10.0", |       "version": "1.10.0", | ||||||
| @@ -5658,7 +5658,7 @@ | |||||||
|     "which": { |     "which": { | ||||||
|       "version": "1.3.0", |       "version": "1.3.0", | ||||||
|       "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", |       "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", | ||||||
|       "integrity": "sha1-/wS9/AEO5UfXgL7DjhrBwnd9JTo=", |       "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "isexe": "^2.0.0" |         "isexe": "^2.0.0" | ||||||
|       } |       } | ||||||
| @@ -5743,7 +5743,7 @@ | |||||||
|     }, |     }, | ||||||
|     "xtend": { |     "xtend": { | ||||||
|       "version": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", |       "version": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", | ||||||
|       "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" |       "integrity": "sha512-iTwvhNBRetXWe81+VcIw5YeadVSWyze7uA7nVnpP13ulrpnJ3UfQm5ApGnrkmxDJFdrblRdZs0EvaTCIfei5oQ==" | ||||||
|     }, |     }, | ||||||
|     "yargs": { |     "yargs": { | ||||||
|       "version": "3.10.0", |       "version": "3.10.0", | ||||||
|   | |||||||
| @@ -86,11 +86,11 @@ app.use(function (req, res, next) { | |||||||
| 		} else { | 		} else { | ||||||
| 			if (cookie === undefined) { | 			if (cookie === undefined) { | ||||||
| 	            try { | 	            try { | ||||||
| 					console.error((new Date), "originalUrl", req.originalUrl); | 					//console.error((new Date), "originalUrl", req.originalUrl); | ||||||
| 		            console.error((new Date), "couldn't fetch cookie for some reason, maybe no cookie exists?", req.get('origin'), "couldn't fetch cookie for some reason, maybe no cookie exists?"); | 		            //console.error((new Date), "couldn't fetch cookie for some reason, maybe no cookie exists?", req.get('origin'), "couldn't fetch cookie for some reason, maybe no cookie exists?"); | ||||||
|  |  | ||||||
| 				} catch(e) { | 				} catch(e) { | ||||||
| 	                console.error((new Date), "couldn't fetch origin"); | 	                //console.error((new Date), "couldn't fetch origin"); | ||||||
| 	            } | 	            } | ||||||
| 	            var user_name = Functions.hash_pass(Functions.rndName(uniqid.time(), 15)); | 	            var user_name = Functions.hash_pass(Functions.rndName(uniqid.time(), 15)); | ||||||
| 				res.cookie('_uI', user_name, { | 				res.cookie('_uI', user_name, { | ||||||
|   | |||||||
| @@ -1,4 +1,7 @@ | |||||||
| var api_key = "xxxx"; | var api_key = { | ||||||
|  |     "youtube": "xxxx", | ||||||
|  |     "soundcloud": "", | ||||||
|  | }; | ||||||
|  |  | ||||||
| try { | try { | ||||||
|     module.exports = api_key; |     module.exports = api_key; | ||||||
|   | |||||||
| @@ -79,7 +79,7 @@ function chat(msg, guid, offline, socket) { | |||||||
|     } |     } | ||||||
|     var coll = msg.channel.toLowerCase();//.replace(/ /g,''); |     var coll = msg.channel.toLowerCase();//.replace(/ /g,''); | ||||||
|     coll = Functions.removeEmojis(coll).toLowerCase(); |     coll = Functions.removeEmojis(coll).toLowerCase(); | ||||||
|     coll = filter.clean(coll); |     //coll = filter.clean(coll); | ||||||
|     Functions.getSessionAdminUser(Functions.getSession(socket), coll, function(userpass) { |     Functions.getSessionAdminUser(Functions.getSession(socket), coll, function(userpass) { | ||||||
|         if(userpass != "" || msg.pass == undefined) { |         if(userpass != "" || msg.pass == undefined) { | ||||||
|             msg.pass = userpass; |             msg.pass = userpass; | ||||||
| @@ -132,7 +132,7 @@ function all_chat(msg, guid, offline, socket) { | |||||||
|     var coll = msg.channel.toLowerCase();//.replace(/ /g,''); |     var coll = msg.channel.toLowerCase();//.replace(/ /g,''); | ||||||
|     var data = msg.data; |     var data = msg.data; | ||||||
|     coll = Functions.removeEmojis(coll).toLowerCase(); |     coll = Functions.removeEmojis(coll).toLowerCase(); | ||||||
|     coll = filter.clean(coll); |     //coll = filter.clean(coll); | ||||||
|     Functions.check_inlist(coll, guid, socket, offline); |     Functions.check_inlist(coll, guid, socket, offline); | ||||||
|     if(data !== "" && data !== undefined && data !== null && |     if(data !== "" && data !== undefined && data !== null && | ||||||
|     data.length < 151 && data.replace(/\s/g, '').length){ |     data.length < 151 && data.replace(/\s/g, '').length){ | ||||||
|   | |||||||
| @@ -11,9 +11,12 @@ var connected_db = mongojs('mongodb://' + mongo_config.host + '/user_credentials | |||||||
| var crypto = require('crypto'); | var crypto = require('crypto'); | ||||||
| var db = require(pathThumbnails + '/handlers/db.js'); | var db = require(pathThumbnails + '/handlers/db.js'); | ||||||
| var uniqid = require('uniqid'); | var uniqid = require('uniqid'); | ||||||
|  | var Filter = require('bad-words'); | ||||||
|  | var filter = new Filter({ placeHolder: 'x'}); | ||||||
|  |  | ||||||
| function encodeChannelName(str) { | function encodeChannelName(str) { | ||||||
|   var _fn = encodeURIComponent; |   var _fn = encodeURIComponent; | ||||||
|  |   str = filter.clean(str); | ||||||
|   var toReturn = _fn(str); |   var toReturn = _fn(str); | ||||||
|   toReturn = toReturn.replace(/_/g, "%5F"); |   toReturn = toReturn.replace(/_/g, "%5F"); | ||||||
|   toReturn = toReturn.replace(/%26amp%3B/g, "%26").replace(/%26amp%3b/g, "%26"); |   toReturn = toReturn.replace(/%26amp%3B/g, "%26").replace(/%26amp%3b/g, "%26"); | ||||||
| @@ -25,6 +28,7 @@ function decodeChannelName(str) { | |||||||
|   var _fn = decodeURIComponent; |   var _fn = decodeURIComponent; | ||||||
|    str = str.toUpperCase(); |    str = str.toUpperCase(); | ||||||
|    var toReturn = _fn(str.replace(/%5F/g, "_")); |    var toReturn = _fn(str.replace(/%5F/g, "_")); | ||||||
|  |    toReturn = filter.clean(toReturn); | ||||||
|    return toReturn.toLowerCase(); |    return toReturn.toLowerCase(); | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -99,9 +99,12 @@ module.exports = function() { | |||||||
|                 typeof(msg.channel) == "string" && typeof(msg.socket_id) == "string" && msg.channel != "") { |                 typeof(msg.channel) == "string" && typeof(msg.socket_id) == "string" && msg.channel != "") { | ||||||
|                     db.collection("connected_users").find({"_id": msg.channel}, function(err, connected_users_channel) { |                     db.collection("connected_users").find({"_id": msg.channel}, function(err, connected_users_channel) { | ||||||
|                         if(connected_users_channel.length > 0 && connected_users_channel[0].users.indexOf(msg.guid) > -1) { |                         if(connected_users_channel.length > 0 && connected_users_channel[0].users.indexOf(msg.guid) > -1) { | ||||||
|  |                             if(msg.hasOwnProperty("channel")) { | ||||||
|  |                                 msg.channel = Functions.encodeChannelName(msg.channel); | ||||||
|  |                             } | ||||||
|                             coll = msg.channel.toLowerCase();//.replace(/ /g,''); |                             coll = msg.channel.toLowerCase();//.replace(/ /g,''); | ||||||
|                             coll = Functions.removeEmojis(coll).toLowerCase(); |                             coll = Functions.removeEmojis(coll).toLowerCase(); | ||||||
|                             coll = filter.clean(coll); |                             //coll = filter.clean(coll); | ||||||
|                             if(coll.indexOf("?") > -1){ |                             if(coll.indexOf("?") > -1){ | ||||||
|                                 coll = coll.substring(0, coll.indexOf("?")); |                                 coll = coll.substring(0, coll.indexOf("?")); | ||||||
|                             } |                             } | ||||||
| @@ -111,9 +114,7 @@ module.exports = function() { | |||||||
|                             guid = msg.guid; |                             guid = msg.guid; | ||||||
|                             socketid = msg.socket_id; |                             socketid = msg.socket_id; | ||||||
|                             socket.zoff_id = socketid; |                             socket.zoff_id = socketid; | ||||||
|                             if(msg.hasOwnProperty("channel")) { |  | ||||||
|                                 msg.channel = Functions.encodeChannelName(msg.channel); |  | ||||||
|                             } |  | ||||||
|                             in_list = true; |                             in_list = true; | ||||||
|                             chromecast_object = true; |                             chromecast_object = true; | ||||||
|                             socket.join(coll); |                             socket.join(coll); | ||||||
| @@ -139,8 +140,8 @@ module.exports = function() { | |||||||
|                 } |                 } | ||||||
|                 coll = Functions.removeEmojis(_list).toLowerCase(); |                 coll = Functions.removeEmojis(_list).toLowerCase(); | ||||||
|                 //coll = coll.replace(/_/g, ""); |                 //coll = coll.replace(/_/g, ""); | ||||||
|  |                 msg.channel = Functions.encodeChannelName(msg.channel); | ||||||
|                 coll = filter.clean(coll); |                 //coll = filter.clean(coll); | ||||||
|             } catch(e) { |             } catch(e) { | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
| @@ -249,7 +250,7 @@ module.exports = function() { | |||||||
|                 if(channel != "") coll = channel; |                 if(channel != "") coll = channel; | ||||||
|                 if(coll !== undefined) { |                 if(coll !== undefined) { | ||||||
|                     coll = Functions.removeEmojis(coll).toLowerCase(); |                     coll = Functions.removeEmojis(coll).toLowerCase(); | ||||||
|                     coll = filter.clean(coll); |                     //coll = filter.clean(coll); | ||||||
|                     db.collection("connected_users").findAndModify({ |                     db.collection("connected_users").findAndModify({ | ||||||
|                         query: {"_id": coll}, |                         query: {"_id": coll}, | ||||||
|                         update: {$pull: {users: guid}}, |                         update: {$pull: {users: guid}}, | ||||||
| @@ -397,7 +398,7 @@ module.exports = function() { | |||||||
|                 coll = Functions.removeEmojis(_list).toLowerCase(); |                 coll = Functions.removeEmojis(_list).toLowerCase(); | ||||||
|                 //coll = coll.replace(/_/g, ""); |                 //coll = coll.replace(/_/g, ""); | ||||||
|                 // |                 // | ||||||
|                 coll = filter.clean(coll); |                 //coll = filter.clean(coll); | ||||||
|             } catch(e) { |             } catch(e) { | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
| @@ -425,7 +426,7 @@ module.exports = function() { | |||||||
|                     coll = Functions.removeEmojis(coll).toLowerCase(); |                     coll = Functions.removeEmojis(coll).toLowerCase(); | ||||||
|                     //coll = coll.replace(/_/g, ""); |                     //coll = coll.replace(/_/g, ""); | ||||||
|  |  | ||||||
|                     coll = filter.clean(coll); |                     //coll = filter.clean(coll); | ||||||
|                 } catch(e) { |                 } catch(e) { | ||||||
|                     return; |                     return; | ||||||
|                 } |                 } | ||||||
| @@ -460,7 +461,7 @@ module.exports = function() { | |||||||
|                     coll = Functions.removeEmojis(coll).toLowerCase(); |                     coll = Functions.removeEmojis(coll).toLowerCase(); | ||||||
|                     //coll = coll.replace(/_/g, ""); |                     //coll = coll.replace(/_/g, ""); | ||||||
|  |  | ||||||
|                     coll = filter.clean(coll); |                     //coll = filter.clean(coll); | ||||||
|                 } catch(e) { |                 } catch(e) { | ||||||
|                     return; |                     return; | ||||||
|                 } |                 } | ||||||
| @@ -482,7 +483,7 @@ module.exports = function() { | |||||||
|                 coll = Functions.removeEmojis(coll).toLowerCase(); |                 coll = Functions.removeEmojis(coll).toLowerCase(); | ||||||
|                 //coll = coll.replace(/_/g, ""); |                 //coll = coll.replace(/_/g, ""); | ||||||
|  |  | ||||||
|                 coll = filter.clean(coll); |                 //coll = filter.clean(coll); | ||||||
|             } catch(e) { |             } catch(e) { | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
| @@ -506,7 +507,7 @@ module.exports = function() { | |||||||
|                     coll = Functions.removeEmojis(coll).toLowerCase(); |                     coll = Functions.removeEmojis(coll).toLowerCase(); | ||||||
|                     //coll = coll.replace(/_/g, ""); |                     //coll = coll.replace(/_/g, ""); | ||||||
|  |  | ||||||
|                     coll = filter.clean(coll); |                     //coll = filter.clean(coll); | ||||||
|                 } catch(e) { |                 } catch(e) { | ||||||
|                     return; |                     return; | ||||||
|                 } |                 } | ||||||
| @@ -571,7 +572,7 @@ module.exports = function() { | |||||||
|                     coll = Functions.removeEmojis(coll).toLowerCase(); |                     coll = Functions.removeEmojis(coll).toLowerCase(); | ||||||
|                     //coll = coll.replace(/_/g, ""); |                     //coll = coll.replace(/_/g, ""); | ||||||
|  |  | ||||||
|                     coll = filter.clean(coll); |                     //coll = filter.clean(coll); | ||||||
|                 } catch(e) { |                 } catch(e) { | ||||||
|                     return; |                     return; | ||||||
|                 } |                 } | ||||||
| @@ -601,7 +602,7 @@ module.exports = function() { | |||||||
|                     coll = Functions.removeEmojis(coll).toLowerCase(); |                     coll = Functions.removeEmojis(coll).toLowerCase(); | ||||||
|                     //coll = coll.replace(/_/g, ""); |                     //coll = coll.replace(/_/g, ""); | ||||||
|  |  | ||||||
|                     coll = filter.clean(coll); |                     //coll = filter.clean(coll); | ||||||
|                 } catch(e) { |                 } catch(e) { | ||||||
|                     return; |                     return; | ||||||
|                 } |                 } | ||||||
| @@ -631,7 +632,7 @@ module.exports = function() { | |||||||
|             if(msg.hasOwnProperty("channel") && msg.channel != "" && typeof(msg.channel) == "string") { |             if(msg.hasOwnProperty("channel") && msg.channel != "" && typeof(msg.channel) == "string") { | ||||||
|                 coll = msg.channel;//.replace(/ /g,''); |                 coll = msg.channel;//.replace(/ /g,''); | ||||||
|                 coll = Functions.removeEmojis(coll).toLowerCase(); |                 coll = Functions.removeEmojis(coll).toLowerCase(); | ||||||
|                 coll = filter.clean(coll); |                 //coll = filter.clean(coll); | ||||||
|                 List.left_channel(coll, guid, short_id, in_list, socket, false); |                 List.left_channel(coll, guid, short_id, in_list, socket, false); | ||||||
|             } |             } | ||||||
|         }) |         }) | ||||||
| @@ -670,7 +671,7 @@ module.exports = function() { | |||||||
|                     coll = Functions.removeEmojis(coll).toLowerCase(); |                     coll = Functions.removeEmojis(coll).toLowerCase(); | ||||||
|                     //coll = coll.replace(/_/g, ""); |                     //coll = coll.replace(/_/g, ""); | ||||||
|  |  | ||||||
|                     coll = filter.clean(coll); |                     //coll = filter.clean(coll); | ||||||
|                 } catch(e) { |                 } catch(e) { | ||||||
|                     return; |                     return; | ||||||
|                 } |                 } | ||||||
|   | |||||||
| @@ -60,7 +60,7 @@ function list(msg, guid, coll, offline, socket) { | |||||||
|             } |             } | ||||||
|             coll = msg.channel.toLowerCase(); //.replace(/ /g,''); |             coll = msg.channel.toLowerCase(); //.replace(/ /g,''); | ||||||
|             coll = Functions.removeEmojis(coll).toLowerCase(); |             coll = Functions.removeEmojis(coll).toLowerCase(); | ||||||
|             coll = filter.clean(coll); |             //coll = filter.clean(coll); | ||||||
|             var pass = crypto.createHash('sha256').update(Functions.decrypt_string(msg.pass)).digest("base64"); |             var pass = crypto.createHash('sha256').update(Functions.decrypt_string(msg.pass)).digest("base64"); | ||||||
|             db.collection('frontpage_lists').find({"_id": coll}, function(err, frontpage_lists){ |             db.collection('frontpage_lists').find({"_id": coll}, function(err, frontpage_lists){ | ||||||
|                 if(frontpage_lists.length == 1) { |                 if(frontpage_lists.length == 1) { | ||||||
| @@ -129,7 +129,7 @@ function skip(list, guid, coll, offline, socket) { | |||||||
|                 coll = Functions.removeEmojis(coll).toLowerCase(); |                 coll = Functions.removeEmojis(coll).toLowerCase(); | ||||||
|                 //coll = coll.replace(/_/g, ""); |                 //coll = coll.replace(/_/g, ""); | ||||||
|  |  | ||||||
|                 coll = filter.clean(coll); |                 //coll = filter.clean(coll); | ||||||
|             } catch(e) { |             } catch(e) { | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
|   | |||||||
| @@ -537,7 +537,7 @@ function add_function(arr, coll, guid, offline, socket) { | |||||||
|             } |             } | ||||||
|             coll = msg.channel.toLowerCase();//.replace(/ /g,''); |             coll = msg.channel.toLowerCase();//.replace(/ /g,''); | ||||||
|             coll = Functions.removeEmojis(coll).toLowerCase(); |             coll = Functions.removeEmojis(coll).toLowerCase(); | ||||||
|             coll = filter.clean(coll); |             //coll = filter.clean(coll); | ||||||
|             Functions.getSessionAdminUser(Functions.getSession(socket), coll, function(userpass, adminpass) { |             Functions.getSessionAdminUser(Functions.getSession(socket), coll, function(userpass, adminpass) { | ||||||
|                 if(adminpass != "" || msg.adminpass == undefined) { |                 if(adminpass != "" || msg.adminpass == undefined) { | ||||||
|                     msg.adminpass = adminpass; |                     msg.adminpass = adminpass; | ||||||
| @@ -601,7 +601,7 @@ function add_function(arr, coll, guid, offline, socket) { | |||||||
|         } |         } | ||||||
|         coll = msg.channel.toLowerCase();//.replace(/ /g,''); |         coll = msg.channel.toLowerCase();//.replace(/ /g,''); | ||||||
|         coll = Functions.removeEmojis(coll).toLowerCase(); |         coll = Functions.removeEmojis(coll).toLowerCase(); | ||||||
|         coll = filter.clean(coll); |         //coll = filter.clean(coll); | ||||||
|         Functions.getSessionAdminUser(Functions.getSession(socket), coll, function(userpass, adminpass) { |         Functions.getSessionAdminUser(Functions.getSession(socket), coll, function(userpass, adminpass) { | ||||||
|             if(adminpass != "" || msg.adminpass == undefined) { |             if(adminpass != "" || msg.adminpass == undefined) { | ||||||
|                 msg.adminpass = adminpass; |                 msg.adminpass = adminpass; | ||||||
| @@ -674,7 +674,7 @@ function add_function(arr, coll, guid, offline, socket) { | |||||||
|             var coll = Functions.removeEmojis(params.channel).toLowerCase(); |             var coll = Functions.removeEmojis(params.channel).toLowerCase(); | ||||||
|             //coll = coll.replace(/_/g, "").replace(/ /g,''); |             //coll = coll.replace(/_/g, "").replace(/ /g,''); | ||||||
|  |  | ||||||
|             coll = filter.clean(coll); |             //coll = filter.clean(coll); | ||||||
|             db.collection(coll + "_settings").find(function(err, docs){ |             db.collection(coll + "_settings").find(function(err, docs){ | ||||||
|                 if(docs !== null && docs.length !== 0 && docs[0].adminpass == Functions.hash_pass(Functions.hash_pass(Functions.decrypt_string(params.adminpass),true))) |                 if(docs !== null && docs.length !== 0 && docs[0].adminpass == Functions.hash_pass(Functions.hash_pass(Functions.decrypt_string(params.adminpass),true))) | ||||||
|                 { |                 { | ||||||
| @@ -723,7 +723,7 @@ function add_function(arr, coll, guid, offline, socket) { | |||||||
|             } |             } | ||||||
|             //coll = coll.replace(/ /g,''); |             //coll = coll.replace(/ /g,''); | ||||||
|             coll = Functions.removeEmojis(coll).toLowerCase(); |             coll = Functions.removeEmojis(coll).toLowerCase(); | ||||||
|             coll = filter.clean(coll); |             //coll = filter.clean(coll); | ||||||
|             Functions.getSessionAdminUser(Functions.getSession(socket), coll, function(userpass, adminpass, gotten) { |             Functions.getSessionAdminUser(Functions.getSession(socket), coll, function(userpass, adminpass, gotten) { | ||||||
|                 if(adminpass != "" || msg.adminpass == undefined) { |                 if(adminpass != "" || msg.adminpass == undefined) { | ||||||
|                     msg.adminpass = adminpass; |                     msg.adminpass = adminpass; | ||||||
|   | |||||||
| @@ -36,7 +36,7 @@ function password(inp, coll, guid, offline, socket) { | |||||||
|             coll = Functions.removeEmojis(coll).toLowerCase(); |             coll = Functions.removeEmojis(coll).toLowerCase(); | ||||||
|             //coll = coll.replace(/_/g, ""); |             //coll = coll.replace(/_/g, ""); | ||||||
|  |  | ||||||
|             coll = filter.clean(coll); |             //coll = filter.clean(coll); | ||||||
|         } catch(e) { |         } catch(e) { | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
| @@ -100,7 +100,7 @@ function conf_function(params, coll, guid, offline, socket) { | |||||||
|                 coll = Functions.removeEmojis(coll).toLowerCase(); |                 coll = Functions.removeEmojis(coll).toLowerCase(); | ||||||
|                 //coll = coll.replace(/_/g, ""); |                 //coll = coll.replace(/_/g, ""); | ||||||
|  |  | ||||||
|                 coll = filter.clean(coll); |                 //coll = filter.clean(coll); | ||||||
|             } catch(e) { |             } catch(e) { | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
|   | |||||||
| @@ -1,7 +1,8 @@ | |||||||
| var path = require('path'); | var path = require('path'); | ||||||
| var time_regex = /P((([0-9]*\.?[0-9]*)Y)?(([0-9]*\.?[0-9]*)M)?(([0-9]*\.?[0-9]*)W)?(([0-9]*\.?[0-9]*)D)?)?(T(([0-9]*\.?[0-9]*)H)?(([0-9]*\.?[0-9]*)M)?(([0-9]*\.?[0-9]*)S)?)?/; | var time_regex = /P((([0-9]*\.?[0-9]*)Y)?(([0-9]*\.?[0-9]*)M)?(([0-9]*\.?[0-9]*)W)?(([0-9]*\.?[0-9]*)D)?)?(T(([0-9]*\.?[0-9]*)H)?(([0-9]*\.?[0-9]*)M)?(([0-9]*\.?[0-9]*)S)?)?/; | ||||||
| try { | try { | ||||||
|     var key = require(path.join(__dirname, '../config/api_key.js')); |     var keys = require(path.join(__dirname, '../config/api_key.js')); | ||||||
|  |     var key = keys.youtube; | ||||||
| } catch(e) { | } catch(e) { | ||||||
|     console.log("Error - missing file"); |     console.log("Error - missing file"); | ||||||
|     console.log("Seems you forgot to create the file api_key.js in /server/config/. Have a look at api_key.example.js."); |     console.log("Seems you forgot to create the file api_key.js in /server/config/. Have a look at api_key.example.js."); | ||||||
|   | |||||||
| @@ -31,8 +31,12 @@ $(document).on("click", "#refresh_all", function(e){ | |||||||
| function decodeChannelName(str) { | function decodeChannelName(str) { | ||||||
|   var _fn = decodeURIComponent; |   var _fn = decodeURIComponent; | ||||||
|   str = str.toUpperCase(); |   str = str.toUpperCase(); | ||||||
|   var toReturn = _fn(str.replace(/%5F/g, "_")); |   try { | ||||||
|   return toReturn.toLowerCase(); |       var toReturn = _fn(str.replace(/%5F/g, "_")); | ||||||
|  |       return toReturn.toLowerCase(); | ||||||
|  |   } catch(e) { | ||||||
|  |       return str.toLowerCase(); | ||||||
|  |   } | ||||||
| } | } | ||||||
|  |  | ||||||
| socket.on("spread_listeners", function(obj){ | socket.on("spread_listeners", function(obj){ | ||||||
|   | |||||||
| @@ -3096,6 +3096,10 @@ nav ul li:hover, nav ul li.active { | |||||||
|         width: 100vw; |         width: 100vw; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     #search-wrapper:hover, #song-title:hover { | ||||||
|  |         background: inherit; | ||||||
|  |     } | ||||||
|  |  | ||||||
|     #toast-container{ |     #toast-container{ | ||||||
|         left:0% !important; |         left:0% !important; | ||||||
|         width:100vw; |         width:100vw; | ||||||
|   | |||||||
| @@ -16,10 +16,13 @@ var Channel = { | |||||||
|             Helper.addClass(".pagination-results", "client-pagination-height"); |             Helper.addClass(".pagination-results", "client-pagination-height"); | ||||||
|             Helper.addClass(".control-list", "client-control-list"); |             Helper.addClass(".control-list", "client-control-list"); | ||||||
|         } else { |         } else { | ||||||
|             SC.initialize({ |             if(!api_key.hasOwnProperty("soundcloud")) soundcloud_enabled = false; | ||||||
|               client_id: 'ed53fc01f248f15becddf8eb52cc91ef' |             else { | ||||||
|             }, function() { |                 SC.initialize({ | ||||||
|             }); |                   client_id: api_key.soundcloud | ||||||
|  |                 }, function() { | ||||||
|  |                 }); | ||||||
|  |             } | ||||||
|             if(cast_ready_connect || chromecastAvailable || chromecastReady) { |             if(cast_ready_connect || chromecastAvailable || chromecastReady) { | ||||||
|                 Helper.addClass(".volume-container", "volume-container-cast"); |                 Helper.addClass(".volume-container", "volume-container-cast"); | ||||||
|             } |             } | ||||||
|   | |||||||
| @@ -6,6 +6,7 @@ var paused = false; | |||||||
| var client = false; | var client = false; | ||||||
| var startTime = 0; | var startTime = 0; | ||||||
| var hostMode = false; | var hostMode = false; | ||||||
|  | var soundcloud_enabled = true; | ||||||
| var socket_connected = false; | var socket_connected = false; | ||||||
| var dynamicListeners = {}; | var dynamicListeners = {}; | ||||||
| var player_ready = false; | var player_ready = false; | ||||||
| @@ -54,7 +55,7 @@ var Crypt = { | |||||||
| }; | }; | ||||||
|  |  | ||||||
| SC.initialize({ | SC.initialize({ | ||||||
|   client_id: 'ed53fc01f248f15becddf8eb52cc91ef' |   client_id: api_key.soundcloud | ||||||
| }, function() { | }, function() { | ||||||
| }); | }); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -254,7 +254,7 @@ var List = { | |||||||
|             Helper.ajax({ |             Helper.ajax({ | ||||||
|                 method: "get", |                 method: "get", | ||||||
|                 url: 'https://www.googleapis.com/youtube/v3/videos?id=' + full_playlist[i].id |                 url: 'https://www.googleapis.com/youtube/v3/videos?id=' + full_playlist[i].id | ||||||
|                        + "&key=" + api_key + "&part=snippet", |                        + "&key=" + api_key.youtube + "&part=snippet", | ||||||
|                 success:  function (data) { |                 success:  function (data) { | ||||||
|                     data = JSON.parse(data); |                     data = JSON.parse(data); | ||||||
|                       //Helper.log("Empty-checker items " + data.items.length); |                       //Helper.log("Empty-checker items " + data.items.length); | ||||||
| @@ -813,7 +813,7 @@ var List = { | |||||||
|     exportToYoutube: function() { |     exportToYoutube: function() { | ||||||
|         ga('send', 'event', "export", "youtube"); |         ga('send', 'event', "export", "youtube"); | ||||||
|  |  | ||||||
|         var request_url = "https://www.googleapis.com/youtube/v3/playlists?part=snippet&key=" + api_key; |         var request_url = "https://www.googleapis.com/youtube/v3/playlists?part=snippet&key=" + api_key.youtube; | ||||||
|         Helper.removeClass(".exported-list-container", "hide"); |         Helper.removeClass(".exported-list-container", "hide"); | ||||||
|         Helper.removeClass("#playlist_loader_export", "hide"); |         Helper.removeClass("#playlist_loader_export", "hide"); | ||||||
|         Helper.ajax({ |         Helper.ajax({ | ||||||
| @@ -833,7 +833,7 @@ var List = { | |||||||
|                 response = JSON.parse(response); |                 response = JSON.parse(response); | ||||||
|                 var number_added = 0; |                 var number_added = 0; | ||||||
|                 var playlist_id = response.id; |                 var playlist_id = response.id; | ||||||
|                 var request_url = "https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&key=" + api_key; |                 var request_url = "https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&key=" + api_key.youtube; | ||||||
|                 List.addToYoutubePlaylist(playlist_id, full_playlist, number_added, request_url) |                 List.addToYoutubePlaylist(playlist_id, full_playlist, number_added, request_url) | ||||||
|             }, |             }, | ||||||
|             error: function(response){ |             error: function(response){ | ||||||
| @@ -902,12 +902,12 @@ var List = { | |||||||
|         if(full_playlist[num].hasOwnProperty("source") && full_playlist[num].source != "soundcloud") { |         if(full_playlist[num].hasOwnProperty("source") && full_playlist[num].source != "soundcloud") { | ||||||
|             List.insertInYouTubePlaylist(playlist_id, full_playlist[num].id, num, request_url) |             List.insertInYouTubePlaylist(playlist_id, full_playlist[num].id, num, request_url) | ||||||
|         } else { |         } else { | ||||||
|             var yt_url = "https://www.googleapis.com/youtube/v3/search?key="+api_key+"&videoEmbeddable=true&part=id,snippet&fields=items(id,snippet)&type=video&order=relevance&safeSearch=none&maxResults=10&videoCategoryId=10"; |             var yt_url = "https://www.googleapis.com/youtube/v3/search?key="+api_key.youtube+"&videoEmbeddable=true&part=id,snippet&fields=items(id,snippet)&type=video&order=relevance&safeSearch=none&maxResults=10&videoCategoryId=10"; | ||||||
|             yt_url+="&q="+full_playlist[num].title; |             yt_url+="&q="+full_playlist[num].title; | ||||||
|             var title = full_playlist[num].title; |             var title = full_playlist[num].title; | ||||||
|             var temptitle = title.split("-"); |             var temptitle = title.split("-"); | ||||||
|             temptitle = temptitle.join(" ").split(" "); |             temptitle = temptitle.join(" ").split(" "); | ||||||
|             var vid_url = "https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet,id&key="+api_key+"&id="; |             var vid_url = "https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet,id&key="+api_key.youtube+"&id="; | ||||||
|             Helper.ajax({ |             Helper.ajax({ | ||||||
|                 type: "GET", |                 type: "GET", | ||||||
|                 url: yt_url, |                 url: yt_url, | ||||||
|   | |||||||
| @@ -5,6 +5,7 @@ var client = false; | |||||||
| if(domain.length > 0 && domain[0] == "client") { | if(domain.length > 0 && domain[0] == "client") { | ||||||
|     client = true; |     client = true; | ||||||
| } | } | ||||||
|  | var soundcloud_enabled = true; | ||||||
| var local_new_channel = false; | var local_new_channel = false; | ||||||
| var hiddenPlaylist = false; | var hiddenPlaylist = false; | ||||||
| var videoSource; | var videoSource; | ||||||
|   | |||||||
| @@ -245,6 +245,10 @@ var Player = { | |||||||
|             //Playercontrols.play_pause(); |             //Playercontrols.play_pause(); | ||||||
|         } else { |         } else { | ||||||
|             if(videoSource == "soundcloud") { |             if(videoSource == "soundcloud") { | ||||||
|  |                 if(!soundcloud_enabled) { | ||||||
|  |                     console.error("SoundCloud isn't enabled, so can't search on SoundCloud.."); | ||||||
|  |                     return; | ||||||
|  |                 } | ||||||
|                 Player.soundcloud_player.play(); |                 Player.soundcloud_player.play(); | ||||||
|                 //SC.Widget(document.querySelector("#soundcloud_player")).play(); |                 //SC.Widget(document.querySelector("#soundcloud_player")).play(); | ||||||
|             } else { |             } else { | ||||||
| @@ -264,6 +268,10 @@ var Player = { | |||||||
|         } else { |         } else { | ||||||
|             paused = true; |             paused = true; | ||||||
|             if(videoSource == "soundcloud") { |             if(videoSource == "soundcloud") { | ||||||
|  |                 if(!soundcloud_enabled) { | ||||||
|  |                     console.error("SoundCloud isn't enabled, so can't search on SoundCloud.."); | ||||||
|  |                     return; | ||||||
|  |                 } | ||||||
|                 Player.soundcloud_player.pause(); |                 Player.soundcloud_player.pause(); | ||||||
|                 //SC.Widget(document.querySelector("#soundcloud_player")).pause(); |                 //SC.Widget(document.querySelector("#soundcloud_player")).pause(); | ||||||
|             } else { |             } else { | ||||||
| @@ -283,6 +291,10 @@ var Player = { | |||||||
|     }, |     }, | ||||||
|  |  | ||||||
|     loadSoundCloud: function(id, this_duration, start, end, _autoplay) { |     loadSoundCloud: function(id, this_duration, start, end, _autoplay) { | ||||||
|  |         if(!soundcloud_enabled) { | ||||||
|  |             console.error("SoundCloud isn't enabled, so can't search on SoundCloud.."); | ||||||
|  |             return; | ||||||
|  |         } | ||||||
|         try { |         try { | ||||||
|             if(SC == null) return; |             if(SC == null) return; | ||||||
|         } catch(e) { |         } catch(e) { | ||||||
|   | |||||||
| @@ -44,14 +44,14 @@ var Search = { | |||||||
|         if(search_input !== ""){ |         if(search_input !== ""){ | ||||||
|             searching = true; |             searching = true; | ||||||
|             var keyword= encodeURIComponent(search_input); |             var keyword= encodeURIComponent(search_input); | ||||||
|             var yt_url = "https://www.googleapis.com/youtube/v3/search?key="+api_key+"&videoEmbeddable=true&part=id&type=video&order=relevance&safeSearch=none&maxResults=25"; |             var yt_url = "https://www.googleapis.com/youtube/v3/search?key="+api_key.youtube+"&videoEmbeddable=true&part=id&type=video&order=relevance&safeSearch=none&maxResults=25"; | ||||||
|             yt_url+="&q="+keyword; |             yt_url+="&q="+keyword; | ||||||
|             if(music)yt_url+="&videoCategoryId=10"; |             if(music)yt_url+="&videoCategoryId=10"; | ||||||
|             if(pagination) yt_url += "&pageToken=" + pagination; |             if(pagination) yt_url += "&pageToken=" + pagination; | ||||||
|             var vid_url = "https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet,id&key="+api_key+"&id="; |             var vid_url = "https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet,id&key="+api_key.youtube+"&id="; | ||||||
|             if(related) { |             if(related) { | ||||||
|                 var yt_url 	= "https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=25&relatedToVideoId="+keyword+"&type=video&key="+api_key; |                 var yt_url 	= "https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=25&relatedToVideoId="+keyword+"&type=video&key="+api_key.youtube; | ||||||
|                 var vid_url	= "https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet,id&key="+api_key+"&id="; |                 var vid_url	= "https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet,id&key="+api_key.youtube+"&id="; | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             Helper.addClass(document.querySelector("#search-btn .material-icons"), "hide"); |             Helper.addClass(document.querySelector("#search-btn .material-icons"), "hide"); | ||||||
| @@ -196,6 +196,11 @@ var Search = { | |||||||
|     }, |     }, | ||||||
|  |  | ||||||
|     soundcloudSearch: function(keyword) { |     soundcloudSearch: function(keyword) { | ||||||
|  |         if(!soundcloud_enabled) { | ||||||
|  |             document.querySelector("#results_soundcloud").innerHTML = '<div style="display:block;" id="inner-results" class="empty-inner-results"><div id="empty-results" class="valign-wrapper><span class="valign">No SoundCloud API-key, search disabled..</span></div></div>'; | ||||||
|  |  | ||||||
|  |             return; | ||||||
|  |         } | ||||||
|         if(keyword.length == 0) return; |         if(keyword.length == 0) return; | ||||||
|         SC.get('/tracks', { |         SC.get('/tracks', { | ||||||
|             q: keyword |             q: keyword | ||||||
| @@ -308,9 +313,9 @@ var Search = { | |||||||
|  |  | ||||||
|     backgroundSearch: function(title, artist, length, totalNumber, current){ |     backgroundSearch: function(title, artist, length, totalNumber, current){ | ||||||
|         var keyword= encodeURIComponent(title + " " + artist); |         var keyword= encodeURIComponent(title + " " + artist); | ||||||
|         var yt_url = "https://www.googleapis.com/youtube/v3/search?key="+api_key+"&videoEmbeddable=true&part=id,snippet&fields=items(id,snippet)&type=video&order=relevance&safeSearch=none&maxResults=10&videoCategoryId=10"; |         var yt_url = "https://www.googleapis.com/youtube/v3/search?key="+api_key.youtube+"&videoEmbeddable=true&part=id,snippet&fields=items(id,snippet)&type=video&order=relevance&safeSearch=none&maxResults=10&videoCategoryId=10"; | ||||||
|         yt_url+="&q="+keyword; |         yt_url+="&q="+keyword; | ||||||
|         var vid_url = "https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet,id&key="+api_key+"&id="; |         var vid_url = "https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet,id&key="+api_key.youtube+"&id="; | ||||||
|         artist = artist.split(" "); |         artist = artist.split(" "); | ||||||
|         var temptitle = title.split("-"); |         var temptitle = title.split("-"); | ||||||
|         temptitle = temptitle.join(" ").split(" "); |         temptitle = temptitle.join(" ").split(" "); | ||||||
| @@ -454,7 +459,7 @@ importPlaylist: function(pId,pageToken){ | |||||||
|     var datatype; |     var datatype; | ||||||
|     if(pageToken !== undefined) |     if(pageToken !== undefined) | ||||||
|     token = "&pageToken="+pageToken; |     token = "&pageToken="+pageToken; | ||||||
|     playlist_url = "https://www.googleapis.com/youtube/v3/playlistItems?part=contentDetails&maxResults=49&key="+api_key+"&playlistId="+pId+token; |     playlist_url = "https://www.googleapis.com/youtube/v3/playlistItems?part=contentDetails&maxResults=49&key="+api_key.youtube+"&playlistId="+pId+token; | ||||||
|     if(youtube_authenticated) { |     if(youtube_authenticated) { | ||||||
|         datatype = "html"; |         datatype = "html"; | ||||||
|         headers = { |         headers = { | ||||||
| @@ -597,7 +602,7 @@ importSpotifyPlaylist: function(url){ | |||||||
| addVideos: function(ids){ | addVideos: function(ids){ | ||||||
|     var more = false; |     var more = false; | ||||||
|     var next_ids = []; |     var next_ids = []; | ||||||
|     var request_url="https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet,id&key=" + api_key + "&id="; |     var request_url="https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet,id&key=" + api_key.youtube + "&id="; | ||||||
|     for(var i = 0; i < ids.length; i++) { |     for(var i = 0; i < ids.length; i++) { | ||||||
|         if(i > 48) { |         if(i > 48) { | ||||||
|             more = true; |             more = true; | ||||||
|   | |||||||
| @@ -53,8 +53,8 @@ var Suggestions = { | |||||||
|             Helper.removeClass(document.querySelector(".suggest-title-info"), "hide"); |             Helper.removeClass(document.querySelector(".suggest-title-info"), "hide"); | ||||||
|             Helper.removeClass("#suggest-song-html", "hide"); |             Helper.removeClass("#suggest-song-html", "hide"); | ||||||
|         } |         } | ||||||
|         var get_url 	= "https://www.googleapis.com/youtube/v3/search?part=snippet&relatedToVideoId="+id+"&type=video&key="+api_key; |         var get_url 	= "https://www.googleapis.com/youtube/v3/search?part=snippet&relatedToVideoId="+id+"&type=video&key="+api_key.youtube; | ||||||
|         var video_urls	= "https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet,id&key="+api_key+"&id="; |         var video_urls	= "https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet,id&key="+api_key.youtube+"&id="; | ||||||
|  |  | ||||||
|         Helper.ajax({ |         Helper.ajax({ | ||||||
|             type: "GET", |             type: "GET", | ||||||
|   | |||||||
| @@ -48,5 +48,5 @@ | |||||||
|             <a href="#" class="btn waves-effect waves-light next-results-button orange">Next</a> |             <a href="#" class="btn waves-effect waves-light next-results-button orange">Next</a> | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
|     <div id="results_soundcloud" class="col s12">Test 2</div> |     <div id="results_soundcloud" class="col s12"></div> | ||||||
|   </div> |   </div> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user