Download MovieTube.Web/Controllers/HomeController.cs from niobures/VideoSearch: direct link, hf CLI and curl.
- Browser
- Download file 1.42 kB
-
https://huggingface.co/niobures/VideoSearch/resolve/main/MovieTube.Web/Controllers/HomeController.cs
- Command line
-
hf download hf://niobures/VideoSearch/MovieTube.Web/Controllers/HomeController.cs
-
curl -L -o HomeController.cs https://huggingface.co/niobures/VideoSearch/resolve/main/MovieTube.Web/Controllers/HomeController.cs
1.42 kB
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Web; | |
| using System.Web.Mvc; | |
| using System.Web.Script.Serialization; | |
| using MovieTube.Web.Models; | |
| using MovieTube.Web.Attributes; | |
| namespace MovieTube.Web.Controllers | |
| { | |
| public class HomeController : BaseMvcController | |
| { | |
| // | |
| // GET: /Home/ | |
| // [OutputCache(Duration=3600)] | |
| public ActionResult Index(int? year, int? page, string term = "", string language = "") | |
| { | |
| var tn = repository.List(term,language,year, page); | |
| var d = new JavaScriptSerializer().Serialize(new | |
| { | |
| showWatchView = false, | |
| activeView = language, | |
| thumbInfo = tn | |
| }); | |
| return View("Index",(object)d); | |
| } | |
| public ActionResult Watch(string language, int year, string id, string title) | |
| { | |
| var movie = repository.QueryMovie(id, true); | |
| var d = new JavaScriptSerializer().Serialize(new | |
| { | |
| showWatchView = true, | |
| activeView = "watch", | |
| movie = movie, | |
| thumbInfo = new ThumbNailVm() | |
| }); | |
| return View("Index", (object)d); | |
| } | |
| public ActionResult Player() | |
| { | |
| return View("_Player"); | |
| } | |
| } | |
| } | |