mirror of
https://github.com/ProudMuBai/GoFilm.git
synced 2026-02-15 15:14:40 +08:00
fix default playSource and update upload manage
This commit is contained in:
@@ -11,5 +11,5 @@ func TableInIt() {
|
||||
// 创建 Search Table
|
||||
system.CreateSearchTable()
|
||||
// 创建图片信息管理表
|
||||
system.CreatePictureTable()
|
||||
system.CreateFileTable()
|
||||
}
|
||||
|
||||
@@ -22,8 +22,8 @@ func FilmSourceInit() {
|
||||
}
|
||||
var l []system.FilmSource = []system.FilmSource{
|
||||
{Id: util.GenerateSalt(), Name: "HD(lzBk)", Uri: `https://cj.lzcaiji.com/api.php/provide/vod/`, ResultModel: system.JsonResult, Grade: system.SlaveCollect, SyncPictures: false, CollectType: system.CollectVideo, State: true},
|
||||
{Id: util.GenerateSalt(), Name: "HD(sn)", Uri: `https://suoniapi.com/api.php/provide/vod/from/snm3u8/`, ResultModel: system.JsonResult, Grade: system.SlaveCollect, SyncPictures: false, CollectType: system.CollectVideo, State: true},
|
||||
{Id: util.GenerateSalt(), Name: "HD(bf)", Uri: `https://bfzyapi.com/api.php/provide/vod/`, ResultModel: system.JsonResult, Grade: system.SlaveCollect, SyncPictures: false, CollectType: system.CollectVideo, State: true, Interval: 1600},
|
||||
{Id: util.GenerateSalt(), Name: "HD(sn)", Uri: `https://suoniapi.com/api.php/provide/vod/from/snm3u8/`, ResultModel: system.JsonResult, Grade: system.SlaveCollect, SyncPictures: false, CollectType: system.CollectVideo, State: true, Interval: 2000},
|
||||
{Id: util.GenerateSalt(), Name: "HD(bf)", Uri: `https://bfzyapi.com/api.php/provide/vod/`, ResultModel: system.JsonResult, Grade: system.SlaveCollect, SyncPictures: false, CollectType: system.CollectVideo, State: true, Interval: 2500},
|
||||
{Id: util.GenerateSalt(), Name: "HD(ff)", Uri: `http://cj.ffzyapi.com/api.php/provide/vod/`, ResultModel: system.JsonResult, Grade: system.SlaveCollect, SyncPictures: false, CollectType: system.CollectVideo, State: true},
|
||||
{Id: util.GenerateSalt(), Name: "HD(kk)", Uri: `https://kuaikan-api.com/api.php/provide/vod/from/kuaikan/`, ResultModel: system.JsonResult, Grade: system.SlaveCollect, SyncPictures: false, CollectType: system.CollectVideo, State: true},
|
||||
//{Id: util.GenerateSalt(), Name: "HD(lz)", Uri: `https://cj.lziapi.com/api.php/provide/vod/`, ResultModel: system.JsonResult, Grade: system.SlaveCollect, SyncPictures: false, CollectType: system.CollectVideo, State: true},
|
||||
|
||||
@@ -51,3 +51,8 @@ func CreateBaseDir() error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func RemoveFile(path string) error {
|
||||
err := os.Remove(path)
|
||||
return err
|
||||
}
|
||||
@@ -201,10 +201,17 @@ func BatchCollect(h int, ids ...string) {
|
||||
for _, id := range ids {
|
||||
// 如果查询到对应Id的资源站信息, 且资源站处于启用状态
|
||||
if fs := system.FindCollectSourceById(id); fs != nil && fs.State {
|
||||
// 采用协程并发执行, 每个站点单独开启一个协程执行
|
||||
go func() {
|
||||
err := HandleCollect(fs.Id, h)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
}()
|
||||
// 执行当前站点的采集任务
|
||||
if err := HandleCollect(fs.Id, h); err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
//if err := HandleCollect(fs.Id, h); err != nil {
|
||||
// log.Println(err)
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user