AlistGo/alist · error
baidu youth video dlink not found for %s
Error message
baidu youth video dlink not found for %s
What it means
Returned by BaiduYouth.getMediaInfoDLink (drivers/baidu_youth/util.go:402): the streaming/video info endpoint (type=VideoURL, media=1) responded successfully but Info.Dlink was empty. I.e. Baidu knows about the file but did not hand out a video download link — usually because the file is not a recognized video or the account cannot stream it.
Source
Thrown at drivers/baidu_youth/util.go:402
req.SetContext(ctx)
req.SetQueryParams(map[string]string{
"channel": videoAPIChannel,
"clienttype": "1",
"devuid": videoAPIDevUID,
"dlink": "1",
"fs_id": fileID,
"media": "1",
"nom3u8": "1",
"origin": "dlna",
"path": path,
"type": "VideoURL",
})
}, &resp)
if err != nil {
return "", err
}
if resp.Info.Dlink == "" {
return "", fmt.Errorf("baidu youth video dlink not found for %s", path)
}
return resp.Info.Dlink, nil
}
func (d *BaiduYouth) buildVideoLink(ctx context.Context, file model.Obj) (*model.Link, error) {
dlink, err := d.getMediaInfoDLink(ctx, file)
if err != nil {
return nil, err
}
return &model.Link{
URL: dlink,
Header: http.Header{
"Referer": []string{panReferer},
},
}, nil
}
func (d *BaiduYouth) requestLocateDownloadURL(ctx context.Context, path string, fileID string, fileMD5 string, sk string) (string, error) {View on GitHub (pinned to 843d9dc814)
Solutions
- Fall back to the standard locatedownload path when the dlink is missing
- Verify the file is actually a video (extension/mime) before choosing buildVideoLink
- Retry later for freshly uploaded videos still transcoding
Example fix
// before
func (d *BaiduYouth) buildVideoLink(ctx context.Context, file model.Obj) (*model.Link, error) {
dlink, err := d.getMediaInfoDLink(ctx, file)
if err != nil { return nil, err }
...
}
// after
dlink, err := d.getMediaInfoDLink(ctx, file)
if err != nil {
if strings.Contains(err.Error(), "video dlink not found") {
return d.buildNormalLink(ctx, file) // locatedownload fallback
}
return nil, err
} Defensive patterns
Strategy: fallback
Validate before calling
// prefer the media path only for likely-video objects
func isLikelyVideo(obj model.Obj) bool {
ext := strings.ToLower(path.Ext(obj.GetName()))
switch ext {
case ".mp4", ".mkv", ".avi", ".mov", ".flv", ".ts", ".webm":
return true
}
return false
} Try / catch
dlink, err := d.getMediaInfoDLink(ctx, file)
if err != nil && strings.Contains(err.Error(), "video dlink not found") {
// not streamable as video: fall back to the normal locatedownload flow
return d.buildNormalLink(ctx, file)
}
if err != nil {
return nil, err
} Prevention
- Gate the video path on file type/mime instead of trying it blindly
- Retry media links later for freshly uploaded videos still transcoding
- Keep the locatedownload fallback wired so missing dlinks degrade gracefully
When it happens
Trigger: buildVideoLink called for a non-video file; video not yet transcoded/available for streaming; media info blocked for the account or region.
Common situations: Driver falls back to the video path when locatedownload fails on media files; newly uploaded videos before transcoding completes; unsupported codecs.
Related errors
- baidu youth locatedownload url not found for %s
- empty download url
- [baidu_youth] %s (errno=%d)
- baidu youth list metadata incomplete for %s
- missing cookie or qrcode account
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/622830c4d43229e3.
Report an issue: GitHub.