bote795/AnimeTrackerStorageAngularRevamp

totalEps

Closed this issue · 3 comments

Change the way TotalEps is being handled from a string " out of X" to a pure number and edit all files related to this issue.

0 is currently being used as a need to check, a string is that it has been set, so at the moment when it checks for number its not set, but using number going to have to change the logic

$scope.Episode = function(anime)
{
var string = "";
var text = "-1";
//does total eps have 'out of 'X
if (typeof anime["totalEps"] === "string")
text = anime["totalEps"].substring(8, anime["totalEps"].length)
//is it a new anime
if (anime["ep"] == 0)
string += "New";
//is the anime done
else if (anime["ep"] == parseInt(text))
string += "done";
//else just deplay the ep of the anime
else
string += anime["ep"];
if (typeof anime["totalEps"] === "string" && anime["ep"] != parseInt(text))
{
//ep out of X
string += anime["totalEps"];
}
return string;

Need to change logic on how episode is being displayed...