Skip to content

Commit

Permalink
fix search
Browse files Browse the repository at this point in the history
  • Loading branch information
immisterio committed Oct 4, 2023
1 parent 8e3e904 commit a06990c
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 14 deletions.
5 changes: 4 additions & 1 deletion SISI/Controllers/BongaCams/ListController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ public class ListController : BaseSisiController
{
[HttpGet]
[Route("bgs")]
async public Task<JsonResult> Index(string sort, int pg = 1)
async public Task<JsonResult> Index(string search, string sort, int pg = 1)
{
if (!AppInit.conf.BongaCams.enable)
return OnError("disable");

if (!string.IsNullOrEmpty(search))
return OnError("no search");

var proxyManager = new ProxyManager("bgs", AppInit.conf.BongaCams);
var proxy = proxyManager.Get();

Expand Down
5 changes: 4 additions & 1 deletion SISI/Controllers/Chaturbate/ListController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ public class ListController : BaseSisiController
{
[HttpGet]
[Route("chu")]
async public Task<JsonResult> Index(string sort, int pg = 1)
async public Task<JsonResult> Index(string search, string sort, int pg = 1)
{
if (!AppInit.conf.Chaturbate.enable)
return OnError("disable");

if (!string.IsNullOrEmpty(search))
return OnError("no search");

string memKey = $"Chaturbate:list:{sort}:{pg}";
if (!memoryCache.TryGetValue(memKey, out List<PlaylistItem> playlists))
{
Expand Down
2 changes: 1 addition & 1 deletion SISI/Controllers/Ebalovo/ListController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async public Task<JsonResult> Index(string search, string sort, string c, int pg
memoryCache.Set(memKey, playlists, DateTime.Now.AddMinutes(AppInit.conf.multiaccess ? 10 : 2));
}

return OnResult(playlists, EbalovoTo.Menu(host, sort, c));
return OnResult(playlists, string.IsNullOrEmpty(search) ? EbalovoTo.Menu(host, sort, c) : null);
}
}
}
2 changes: 1 addition & 1 deletion SISI/Controllers/Eporner/ListController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async public Task<JsonResult> Index(string search, string sort, string c, int pg
memoryCache.Set(memKey, playlists, DateTime.Now.AddMinutes(AppInit.conf.multiaccess ? 10 : 2));
}

return OnResult(playlists, EpornerTo.Menu(host, sort, c));
return OnResult(playlists, string.IsNullOrEmpty(search) ? EpornerTo.Menu(host, sort, c) : null);
}
}
}
2 changes: 1 addition & 1 deletion SISI/Controllers/HQporner/ListController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async public Task<JsonResult> Index(string search, string sort, string c, int pg
memoryCache.Set(memKey, playlists, DateTime.Now.AddMinutes(AppInit.conf.multiaccess ? 10 : 2));
}

return OnResult(playlists, HQpornerTo.Menu(host, sort, c));
return OnResult(playlists, string.IsNullOrEmpty(search) ? HQpornerTo.Menu(host, sort, c) : null);
}
}
}
4 changes: 2 additions & 2 deletions SISI/Controllers/PornHub/ListController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async public Task<JsonResult> Index(string search, string sort, int c, int pg =
memoryCache.Set(memKey, playlists, DateTime.Now.AddMinutes(AppInit.conf.multiaccess ? 10 : 2));
}

return OnResult(playlists, PornHubTo.Menu(host, plugin, sort, c));
return OnResult(playlists, string.IsNullOrEmpty(search) ? PornHubTo.Menu(host, plugin, sort, c) : null);
}


Expand Down Expand Up @@ -94,7 +94,7 @@ async public Task<JsonResult> Prem(string search, string sort, string hd, int c,
memoryCache.Set(memKey, playlists, DateTime.Now.AddMinutes(AppInit.conf.multiaccess ? 10 : 2));
}

return OnResult(playlists, PornHubTo.Menu(host, "pornhubpremium", sort, c, hd));
return OnResult(playlists, string.IsNullOrEmpty(search) ? PornHubTo.Menu(host, "pornhubpremium", sort, c, hd) : null);
}
}
}
2 changes: 1 addition & 1 deletion SISI/Controllers/Porntrex/ListController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async public Task<JsonResult> Index(string search, string sort, string c, int pg
memoryCache.Set(memKey, playlists, DateTime.Now.AddMinutes(AppInit.conf.multiaccess ? 10 : 2));
}

return OnResult(playlists, PorntrexTo.Menu(host, sort, c), headers: new List<(string name, string val)> { ("referer", AppInit.conf.Porntrex.host) });
return OnResult(playlists, string.IsNullOrEmpty(search) ? PorntrexTo.Menu(host, sort, c) : null, headers: new List<(string name, string val)> { ("referer", AppInit.conf.Porntrex.host) });
}
}
}
2 changes: 1 addition & 1 deletion SISI/Controllers/Spankbang/ListController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async public Task<JsonResult> Index(string search, string sort, int pg = 1)
memoryCache.Set(memKey, playlists, DateTime.Now.AddMinutes(AppInit.conf.multiaccess ? 10 : 2));
}

return OnResult(playlists, SpankbangTo.Menu(host, sort));
return OnResult(playlists, string.IsNullOrEmpty(search) ? SpankbangTo.Menu(host, sort) : null);
}
}
}
2 changes: 1 addition & 1 deletion SISI/Controllers/Xhamster/ListController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async public Task<JsonResult> Index(string search, string c, string q, string so
memoryCache.Set(memKey, playlists, DateTime.Now.AddMinutes(AppInit.conf.multiaccess ? 10 : 2));
}

return OnResult(playlists, XhamsterTo.Menu(host, plugin, c, q, sort));
return OnResult(playlists, string.IsNullOrEmpty(search) ? XhamsterTo.Menu(host, plugin, c, q, sort) : null);
}
}
}
2 changes: 1 addition & 1 deletion SISI/Controllers/Xnxx/ListController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async public Task<JsonResult> Index(string search, int pg = 1)
memoryCache.Set(memKey, playlists, DateTime.Now.AddMinutes(AppInit.conf.multiaccess ? 10 : 2));
}

return OnResult(playlists, XnxxTo.Menu(host));
return OnResult(playlists, string.IsNullOrEmpty(search) ? XnxxTo.Menu(host) : null);
}
}
}
2 changes: 1 addition & 1 deletion SISI/Controllers/Xvideos/ListController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async public Task<JsonResult> Index(string search, string sort, string c, int pg
memoryCache.Set(memKey, playlists, DateTime.Now.AddMinutes(AppInit.conf.multiaccess ? 10 : 2));
}

return OnResult(playlists, XvideosTo.Menu(host, plugin, sort, c));
return OnResult(playlists, string.IsNullOrEmpty(search) ? XvideosTo.Menu(host, plugin, sort, c) : null);
}
}
}
4 changes: 2 additions & 2 deletions SISI/SisiApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public ActionResult Index()
{
channels.Add(new
{
title = "Sexy Time",
playlist_url = "http://vi.sisi.am/xdb"
title = "faphouse.com",
playlist_url = "https://vi.sisi.am/fph"
});
}

Expand Down

0 comments on commit a06990c

Please sign in to comment.