mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 17:28:55 +00:00
Replace anidb with anilist
This commit is contained in:
@@ -37,6 +37,17 @@ class CoverController extends Controller
|
||||
} else {
|
||||
$filePath = storage_path("covers/{$type}/{$filename}");
|
||||
}
|
||||
} elseif ($type === 'anime') {
|
||||
// For anime, try the requested filename first, then fall back to old format (without -cover)
|
||||
$filePath = storage_path("covers/{$type}/{$filename}");
|
||||
|
||||
// If file doesn't exist and filename ends with -cover.jpg, try old format
|
||||
if (!file_exists($filePath) && preg_match('/^(\d+)-cover\.jpg$/', $filename, $matches)) {
|
||||
$oldFormatPath = storage_path("covers/{$type}/{$matches[1]}.jpg");
|
||||
if (file_exists($oldFormatPath)) {
|
||||
$filePath = $oldFormatPath;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$filePath = storage_path("covers/{$type}/{$filename}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user