Skip to content

Commit

Permalink
Merge pull request #38 from StarDustCFW/master
Browse files Browse the repository at this point in the history
Fix Jkanime search
  • Loading branch information
darkxex authored Apr 5, 2021
2 parents 325b0c9 + c812c68 commit 3a55516
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
15 changes: 7 additions & 8 deletions source/JKanime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,7 @@ int refrescarpro(void* data){
temp0=content.find("Programación");
temp1=content.find("TOP ANIMES",temp0);
content = content.substr(temp0,temp1-temp0);
// std::cout << "---" << val0 << std::endl;


printf("--\n");
while (val0 != -1 && !quit) {
val0 = content.find("<a href=", val1);
if (val0 == -1) { break; }
Expand All @@ -269,7 +266,7 @@ printf("--\n");
std::string gpreview = content.substr(val3, val4 - val3);
arrayimages.push_back(gpreview);

std::cout << gdrive << " . " << gpreview << std::endl;
//std::cout << gdrive << " . " << gpreview << std::endl;
temporal = temporal + gdrive + "\n";
temporal = temporal + gpreview + "\n";
porcentajereload = val1;
Expand Down Expand Up @@ -362,6 +359,7 @@ int MKcapitBuffer() {

std::string terese = a.substr(re1, re2 - re1);
replace(terese, "<br/>", "");
replace(terese, "&quot;", "");
con_rese.push_back(terese);


Expand All @@ -384,7 +382,7 @@ int MKcapitBuffer() {
con_nextdate.push_back(terese);


int indx1 = 1, indx2, indx3, indx4;
int indx1 = 1, indx2, indx3;
indx1 = a.find("<span>Genero:</span>", indx1);
std::string generosTMP="";
while (indx1 != -1) {
Expand Down Expand Up @@ -509,7 +507,7 @@ int searchjk(void* data)

int val0 = 0,val1 = 1,val2,val3, val4;
while (val0 != -1) {
val0 = content.find("portada-title", val1);
val0 = content.find("<div class=\"anime__item\">", val1);
if (val0 == -1) { break; }

val1 = 6 + content.find("href=", val0);
Expand All @@ -518,7 +516,7 @@ int searchjk(void* data)


arraysearch.push_back(gdrive);
val3 = content.find("<img src=", val2) + 10;
val3 = content.find("data-setbg=", val2) + 12;
val4 = content.find('"', val3);
std::string gsearchpreview = content.substr(val3, val4 - val3);
arraysearchimages.push_back(gsearchpreview);
Expand Down Expand Up @@ -590,6 +588,7 @@ int capit(void* data) {

std::string terese = a.substr(re1, re2 - re1);
replace(terese, "<br/>", "");
replace(terese, "&quot;", "");
rese = terese;
std::cout << rese << std::endl;

Expand All @@ -612,7 +611,7 @@ int capit(void* data) {
}
}

int indx1 = 1, indx2, indx3, indx4;
int indx1 = 1, indx2, indx3;
indx1 = a.find("<span>Genero:</span>", indx1);
std::string generosTMP="";
while (indx1 != -1) {
Expand Down
1 change: 1 addition & 0 deletions source/SDLWork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ void SDLB::intA(){
gFont2 = TTF_OpenFont("romfs:/lazy2.ttf", 150);
gFontcapit = TTF_OpenFont("romfs:/lazy2.ttf", 100);
gFont3 = TTF_OpenFont("romfs:/lazy2.ttf", 40);
gFont4 = TTF_OpenFont("romfs:/lazy2.ttf", 30);
digifont = TTF_OpenFont("romfs:/digifont.otf", 16);

#else
Expand Down
1 change: 1 addition & 0 deletions source/SDLWork.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ TTF_Font* digifont = NULL;
TTF_Font *gFontcapit = NULL;
TTF_Font *gFont2 = NULL;
TTF_Font *gFont3 = NULL;
TTF_Font *gFont4 = NULL;
Mix_Music* gMusic = NULL;
int TouchX=-1;
int TouchY=-1;
Expand Down
2 changes: 1 addition & 1 deletion source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ int main(int argc, char **argv)
}
T_R.render(posxbase+15, posybase + 65);

gTextTexture.loadFromRenderedTextWrap(GOD.gFont3, generos, textColor,750);
gTextTexture.loadFromRenderedTextWrap(GOD.gFont4, generos, textColor,750);
gTextTexture.render(posxbase+25, posybase + 380-gTextTexture.getHeight());
}

Expand Down

0 comments on commit 3a55516

Please sign in to comment.