Skip to content

Commit

Permalink
fix: alist ali raw type
Browse files Browse the repository at this point in the history
  • Loading branch information
zijiren233 committed Feb 11, 2025
1 parent bf9746d commit e60a15d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion server/handlers/vendors/vendorAlist/alist.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,18 @@ func (s *AlistVendorService) GenMovieInfo(ctx context.Context, user *op.User, us
movie.MovieBase.Type = "m3u8"

rawStreamURL := data.URL

subPath := s.movie.SubPath()
var rawType string
if subPath == "" {
rawType = utils.GetURLExtension(movie.MovieBase.VendorInfo.Alist.Path)
} else {
rawType = utils.GetURLExtension(subPath)
}
movie.MovieBase.MoreSources = []*dbModel.MoreSource{
{
Name: "raw",
Type: utils.GetURLExtension(movie.MovieBase.VendorInfo.Alist.Path),
Type: rawType,
URL: rawStreamURL,
},
}
Expand Down
10 changes: 9 additions & 1 deletion server/handlers/vendors/vendoralist/alist.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,18 @@ func (s *AlistVendorService) GenMovieInfo(ctx context.Context, user *op.User, us
movie.MovieBase.Type = "m3u8"

rawStreamURL := data.URL

subPath := s.movie.SubPath()
var rawType string
if subPath == "" {
rawType = utils.GetURLExtension(movie.MovieBase.VendorInfo.Alist.Path)
} else {
rawType = utils.GetURLExtension(subPath)
}
movie.MovieBase.MoreSources = []*dbModel.MoreSource{
{
Name: "raw",
Type: utils.GetURLExtension(movie.MovieBase.VendorInfo.Alist.Path),
Type: rawType,
URL: rawStreamURL,
},
}
Expand Down

0 comments on commit e60a15d

Please sign in to comment.