mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-07 18:01:42 +00:00
This commit implements a comprehensive YouTube download feature that allows administrators to download audio from YouTube videos and playlists. Backend Changes: - Add yt-dlp-wrap npm dependency for YouTube downloading - Create YouTubeDownloadManager to handle download queue and execution - Create YouTubeDownloadController with API endpoints for download/queue/cancel - Add YouTube utility functions for URL validation and metadata extraction - Create YouTubeDownload object model for tracking download state - Add API routes: POST /api/youtube/download, GET /api/youtube/queue, DELETE /api/youtube/download/:id - Implement playlist support - automatically queue all videos from playlist URLs - Download audio in MP3 format with best quality - Organize files in subfolder structure: <Uploader>/<Video Title>/ - Extract metadata and create library items automatically - Real-time progress updates via Socket.io Frontend Changes: - Create YouTubeDownloadModal component for user-friendly download interface - Add download button to Appbar header (admin-only, visible with current library) - Update Vuex store with modal state management - Register modal globally in default layout - Implement Socket.io listeners for download events (started, progress, completed, failed, queued) - Show toast notifications for download status updates Features: - Admin-only access control - Support for single videos and playlists - Audio quality selection (best, 320kbps, 256kbps, 192kbps, 128kbps) - Library and folder selection - Download queue management - Real-time progress tracking - Automatic thumbnail download as cover image - Automatic library item creation with metadata - Error handling and user feedback Technical Details: - Uses yt-dlp for reliable YouTube downloading - Integrates with existing task management system - Respects library folder permissions - Follows existing code patterns (similar to podcast downloads) - Socket.io events for real-time updates
70 lines
2.2 KiB
JSON
70 lines
2.2 KiB
JSON
{
|
|
"name": "audiobookshelf",
|
|
"version": "2.32.1",
|
|
"buildNumber": 1,
|
|
"description": "Self-hosted audiobook and podcast server",
|
|
"main": "index.js",
|
|
"scripts": {
|
|
"dev": "nodemon --watch server index.js -- --dev",
|
|
"start": "node index.js",
|
|
"start-dev": "node index.js --prod-with-dev-env",
|
|
"client": "cd client && npm ci && npm run generate",
|
|
"prod": "npm run client && npm ci && node index.js",
|
|
"build-win": "npm run client && pkg -t node20-win-x64 -o ./dist/win/audiobookshelf -C GZip .",
|
|
"build-win-no-compress": "npm run client && pkg -t node20-win-x64 -o ./dist/win/audiobookshelf .",
|
|
"build-linux": "build/linuxpackager",
|
|
"docker": "docker buildx build --platform linux/amd64,linux/arm64 --push . -t advplyr/audiobookshelf",
|
|
"docker-amd64-local": "docker buildx build --platform linux/amd64 --load . -t advplyr/audiobookshelf-amd64-local",
|
|
"docker-arm64-local": "docker buildx build --platform linux/arm64 --load . -t advplyr/audiobookshelf-arm64-local",
|
|
"deploy-linux": "node deploy/linux",
|
|
"test": "mocha",
|
|
"coverage": "nyc mocha"
|
|
},
|
|
"bin": "index.js",
|
|
"pkg": {
|
|
"assets": [
|
|
"client/dist/**/*",
|
|
"node_modules/sqlite3/lib/binding/**/*.node",
|
|
"server/migrations/*.js"
|
|
],
|
|
"scripts": [
|
|
"index.js",
|
|
"server/**/*.js"
|
|
]
|
|
},
|
|
"mocha": {
|
|
"recursive": true
|
|
},
|
|
"author": "advplyr",
|
|
"license": "GPL-3.0",
|
|
"dependencies": {
|
|
"axios": "^0.27.2",
|
|
"cookie-parser": "^1.4.6",
|
|
"express": "^4.17.1",
|
|
"express-rate-limit": "^7.5.1",
|
|
"express-session": "^1.17.3",
|
|
"graceful-fs": "^4.2.10",
|
|
"htmlparser2": "^8.0.1",
|
|
"lru-cache": "^10.0.3",
|
|
"node-unrar-js": "^2.0.2",
|
|
"nodemailer": "^6.9.13",
|
|
"openid-client": "^5.6.1",
|
|
"p-throttle": "^4.1.1",
|
|
"passport": "^0.6.0",
|
|
"passport-jwt": "^4.0.1",
|
|
"semver": "^7.6.3",
|
|
"sequelize": "^6.35.2",
|
|
"socket.io": "^4.5.4",
|
|
"sqlite3": "^5.1.7",
|
|
"ssrf-req-filter": "^1.1.0",
|
|
"xml2js": "^0.5.0",
|
|
"yt-dlp-wrap": "^2.3.12"
|
|
},
|
|
"devDependencies": {
|
|
"chai": "^4.3.10",
|
|
"mocha": "^10.2.0",
|
|
"nodemon": "^2.0.20",
|
|
"nyc": "^15.1.0",
|
|
"sinon": "^17.0.1"
|
|
}
|
|
}
|