Make sure you commit and push your recent changes. We can't make any of these fixes until your put the changes up on github
The admin panel shouldn't be limited to the first 150 videos.
This is an easy enough fix. Just make sure that currentVideoID is never set less than 1, but don't worry about setting it too large. The API will give back no videos if the ID range is too high, and this is fine
You should be removing all tr tags, not the td tags.
change
$('#videoTable td').remove();
to
$('#videoTable tr').remove();
There's a lot of duplicated code
Specifically, the block of code starting with this:
$(function(){ $.getJSON("./api/getvidrange/" + currentVideoID.toString() + "/" + (currentVideoID + 49).toString(), function(videos) {
De-duplicate the code by making it into a function and replacing every copy of the code with a call to the function
This is an easy enough fix. Just make sure that currentVideoID is never set less than 1, but don't worry about setting it too large. The API will give back no videos if the ID range is too high, and this is fine
change
$('#videoTable td').remove();
to$('#videoTable tr').remove();
$(function(){ $.getJSON("./api/getvidrange/" + currentVideoID.toString() + "/" + (currentVideoID + 49).toString(), function(videos) {
De-duplicate the code by making it into a function and replacing every copy of the code with a call to the function