public async Task EditVideo(VideoListAdminDTO vid)
        {
            Video = await AdminRep.GetVideoByIdAsync(vid.Id);

            Video.DatabaseCategories = await AdminRep.GetCategoriesAsync();

            Video.IsEdited = true;
        }
示例#2
0
 public async Task AddCategory()
 {
     if (await Video.AddCategoryToDatabase(CurrentUser))
     {
         Video.NewCategory.Name    = "";
         Video.NewCategory.Name_en = "";
         Video.DatabaseCategories  = await AdminRep.GetCategoriesAsync();
     }
 }
示例#3
0
        public async Task CreateCustomVideo()
        {
            if (Video.DatabaseCategories.Count() == 0)
            {
                Video.DatabaseCategories = await AdminRep.GetCategoriesAsync();
            }
            Video.IsCustom = true;
            List <CategoryDTO> list = new List <CategoryDTO>();

            for (int i = 0; i < 3; i++)
            {
                CategoryDTO cat = new CategoryDTO();
                list.Add(cat);
            }
            Video.Categories = list;
        }
示例#4
0
 public async Task OpenModal(VideoListAdminDTO vid)
 {
     Video.Duration = vid.Duration;
     Video.HD       = vid.HD;
     Video.Img      = vid.Img;
     Video.Preview  = vid.Preview;
     Video.Title    = vid.Title;
     Video.Title_en = vid.Title_en;
     Video.Url      = vid.Url;
     Video.Id       = vid.Id;
     if (SelectedWebCategory == "gay")
     {
         Video.AllowMain       = false;
         Video.CheckBoxEnabled = false;
     }
     if (Video.DatabaseCategories.Count() == 0)
     {
         Video.DatabaseCategories = await AdminRep.GetCategoriesAsync();
     }
     if (SwitchWebsite == 0)
     {
         SpiderRep.GetCategoriesRedTube(Video);
     }
     else if (SwitchWebsite == 1)
     {
         SpiderRep.GetCategoriesXhamster(Video);
     }
     else if (SwitchWebsite == 2)
     {
         SpiderRep.GetCategoriesDrTuber(Video);
     }
     else if (SwitchWebsite == 3)
     {
         SpiderRep.GetCategoriesPornHub(Video);
     }
 }