mysql - record and check state of local files #32

Merged
bones7242 merged 10 commits from mysql into master 2017-06-17 06:21:35 +02:00
5 changed files with 57 additions and 35 deletions
Showing only changes of commit 6f7d9af768 - Show all commits

View file

@ -24,7 +24,7 @@ module.exports = {
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
"method": "get",
"params": { "uri": uri, "timeout": 20}
}).then(function (getResponse) {
console.log(">> 'get' success");
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
console.log(">> 'get' success", getResponse.data);
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
//check to make sure the daemon didn't just time out (or otherwise send an error that appears to be a success response)
if (getResponse.data.result.error){
reject(getResponse.data.result.error);

kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.

View file

@ -1,6 +1,7 @@
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
var path = require('path');
var axios = require('axios');
var lbryApi = require('./lbryApi');
var db = require("../models");
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
function filterForFreePublicClaims(claimsListArray){
//console.log("claims list:", claimsListArray)
@ -98,33 +99,50 @@ module.exports = {
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
});
return deferred;
},
getClaimBasedOnUri: function(uri){
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
getClaimBasedOnUri: function(claimName, claimId){
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
var deferred = new Promise(function (resolve, reject){
var uri = claimName + "#" + claimId;
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
console.log(">> lbryHelpers >> getClaimBasedOnUri:", uri);
// resolve the claim
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
lbryApi.resolveUri(uri)
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
.then(function(resolvedUri){
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
//console.log("result >>", resolvedUri)
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
// check to make sure it is free and public
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
if (isFreePublicClaim(resolvedUri.result[uri].claim)){
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
// promise to get the chosen uri
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
lbryApi.getClaim(uri)
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
.then(function(data){
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
resolve({
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
fileName: data.result.file_name,
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
directory: data.result.download_directory,
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
contentType: data.result.metadata.stream.source.contentType
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
});
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
// check locally for the claim
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
db.File.findOne({where: { claim_id: claimId }})
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
.then(function(claim){
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
console.log("asset found locally >>", claim)
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
// if a record is found, return it
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
if (claim){
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
var fileInfo = {
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
file_name: claim.dataValues.name,
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
download_path: claim.dataValues.path,
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
content_type: claim.dataValues.file_type
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
}
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
resolve(fileInfo);
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
// ... otherwise use daemon to retrieve it
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
} else {
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
// get the claim info via 'resolve'
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
lbryApi.resolveUri(uri)
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
.then(function(resolvedUri){
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
// check to make sure it is free and public
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
if (isFreePublicClaim(resolvedUri.result[uri].claim)){
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
// 'get' the claim
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
lbryApi.getClaim(uri)
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
.then(function(data){
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
resolve({
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
file_name: data.result.file_name,
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
download_path: data.result.download_path,
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
content_type: data.result.metadata.stream.source.contentType
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
});
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
}).catch(function(error){
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
reject(error)
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
});
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
} else {
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
reject("NO_FREE_PUBLIC_CLAIMS");
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
}
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
}).catch(function(error){
reject(error)
});
} else {
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
reject("NO_FREE_PUBLIC_CLAIMS");
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
}
}).catch(function(error){
reject(error)
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
});
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
reject(error);
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
})
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
});
return deferred;
},

kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

View file

@ -62,6 +62,8 @@ module.exports = {
file_type: fileType,
claim_id: data.result.claim_id,
nsfw: nsfw,
}).catch(function(error){
console.log('an error occurred when writing to the MySQL database. Check the logs.');
});
})
.catch(function(error){

View file

@ -1,14 +1,13 @@
function serveFile(fileInfo, res){
// set default options
var options = {
root: fileInfo.directory,
headers: {
"X-Content-Type-Options": "nosniff",
"Content-Type": fileInfo.contentType
"Content-Type": fileInfo.content_type
}
};
// adjust default options as needed
switch (fileInfo.contentType){
switch (fileInfo.content_type){
case "image/jpeg":
break;
case "image/gif":
@ -23,19 +22,20 @@ function serveFile(fileInfo, res){
break;
}
// send file
res.status(200).sendFile(fileInfo.fileName, options);
res.status(200).sendFile(fileInfo.download_path, options);
}
module.exports = function(app, routeHelpers, lbryHelpers, ua, googleAnalyticsId){
// route to fetch one free public claim
app.get("/:name/:claim_id", function(req, res){
ua(googleAnalyticsId, {https: true}).event("Serve Route", "/name/claimId", req.params.name + "/" + req.params.claim_id).send();
var uri = req.params.name + "#" + req.params.claim_id;
console.log(">> GET request on /" + uri);
// create promise
lbryHelpers.getClaimBasedOnUri(uri)
var routeString = req.params.name + "/" + req.params.claim_id;
// google analytics
ua(googleAnalyticsId, {https: true}).event("Serve Route", "/name/claimId", routeString).send();
// begin image-serve processes
console.log(">> GET request on /" + routeString);
lbryHelpers.getClaimBasedOnUri(req.params.name, req.params.claim_id)
.then(function(fileInfo){
console.log("/:name/:claim_id success.", fileInfo.fileName);
console.log("/:name/:claim_id success.", fileInfo.file_name);
serveFile(fileInfo, res);
}).catch(function(error){
console.log("/:name/:claim_id error:", error)
@ -44,12 +44,13 @@ module.exports = function(app, routeHelpers, lbryHelpers, ua, googleAnalyticsId)
});
// route to fetch one free public claim
app.get("/:name", function(req, res){
// google analytics
ua(googleAnalyticsId, {https: true}).event("Serve Route", "/name", req.params.name).send();
// begin image-serve processes
console.log(">> GET request on /" + req.params.name);
// create promise
lbryHelpers.getClaimBasedOnNameOnly(req.params.name)
.then(function(fileInfo){
console.log("/:name success.", fileInfo.fileName);
console.log("/:name success.", fileInfo.file_name);
serveFile(fileInfo, res);
}).catch(function(error){
console.log("/:name error:", error);

View file

@ -64,9 +64,10 @@ var http = require("./routes/sockets-routes.js")(app, path, siofu, hostedContent
// sync sequelize
// wrap the server in socket.io to intercept incoming sockets requests
// start server
db.sequelize.sync({}).then(function(){
db.sequelize.sync({})
.then(function(){
http.listen(PORT, function() {
console.log("Listening on PORT " + PORT);
});
})
});