Sort Youtube Playlist by Duration (Advanced)

Sorts youtube playlist by duration

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
BASiQ
今日安裝
0
安裝總數
17
評價
1 0 0
版本
4.6.0
建立日期
2025-10-11
更新日期
2025-10-20
尺寸
112.8 KB
授權條款
GPL-2.0-only
腳本執行於

Sort YouTube Playlist by Duration (Advanced) 🎧

Image

Key Features ✨

  • Smart Sorting - Ascending/descending by duration with alphabetical tiebreaker
  • Settings Panel - Persistent preferences (sort mode, auto-scroll, log verbosity)
  • Dry Run Mode - Preview changes before applying (v4.5.0)
  • Duration Filters - Include only videos within specific length ranges (v4.3.0)
  • Analytics - Stats on total duration, avg length, shortest/longest videos (v4.2.0)
  • CSV Export - Export playlist data for external analysis (v4.4.0)
  • Real-time Logging - Copy-to-clipboard support with 1000 message retention

Installation 🚀

Option 1: Userscript (Recommended)

  1. Install Tampermonkey in Chrome
  2. Copy contents of extension/yt.js and create new Tampermonkey script
  3. Save and it runs automatically on YouTube

Option 2: Chrome Extension

  1. Clone/download this repository
  2. Go to chrome://extensions/ → Enable "Developer mode"
  3. Click "Load unpacked" → Select extension folder

Usage ▶️

  1. Open any editable YouTube playlist in Chrome
  2. Expand the "Sort Playlist by Duration" panel injected below playlist header
  3. Optional: Configure Settings, view Stats, or set duration filters
  4. Select sort order: Shortest First or Longest First
  5. Choose: Sort all (loads entire playlist) or Sort only loaded (current videos)
  6. Recommended: Enable Dry Run to preview changes before applying
  7. Click Sort and watch the real-time log
  8. Optional: Export playlist data as CSV

Note: After sorting, don't switch back to YouTube's auto-sort (Date Added, etc.) - manual sorting is permanent.

Troubleshooting 🧯

  • Verify Tampermonkey shows script active on youtube.com
  • Reload page if controls don't appear
  • Use Dry Run mode to preview before applying changes
  • Adjust Settings panel for scroll retry times or log verbosity
  • Use Copy Console button for detailed logs
  • Check browser console for additional error messages

Recent Updates 📋

v4.6.0 (Oct 2025) - Missing video tolerance & adaptive reload tweaks
v4.5.0 - Settings Panel & Dry Run Mode
v4.4.0 - CSV Export & improved move counter
v4.3.0 - Duration filters (min/max length)
v4.2.0 - Playlist statistics button
v4.1.0 - Copy Console & lazy loading fixes

Full changelog in yt.js

Links 🔗

License 📄

GPL-2.0-only