# 📺 How to Add More Seasons to Your Video Player ## Complete Guide for Adding Seasons 3, 4, 5+ to Your Blogger Post --- ## 📋 Table of Contents 1. [Overview](#overview) 2. [Step 1: Add Episode Titles](#step-1-add-episode-titles) 3. [Step 2: Add Episode Links](#step-2-add-episode-links) 4. [Step 3: Update Episode Database](#step-3-update-episode-database) 5. [Step 4: Update Episode Data](#step-4-update-episode-data) 6. [Step 5: Add Season Button in HTML](#step-5-add-season-button-in-html) 7. [Step 6: Update Server Mirrors (Optional)](#step-6-update-server-mirrors-optional) 8. [Complete Working Example](#complete-working-example) 9. [Quick Reference Checklist](#quick-reference-checklist) 10. [Troubleshooting](#troubleshooting) --- ## Overview Your video player is designed to be **season-independent** - the same server buttons (SUB-HD-01, DUB-HD-01, etc.) work for all seasons. When you add a new season, you only need to: - Add the episode titles - Add the episode links - Register the new season in the database - Add a new season button The server buttons will **automatically work** with the new season! --- ## Step 1: Add Episode Titles Add a new array for your season's episode titles. Place this near the top of the JavaScript section with your other title arrays. ```javascript // Episode titles for Season 03 const season3Titles = [ "Episode 1 Title Here", "Episode 2 Title Here", "Episode 3 Title Here", "Episode 4 Title Here", "Episode 5 Title Here", "Episode 6 Title Here", "Episode 7 Title Here", "Episode 8 Title Here", "Episode 9 Title Here", "Episode 10 Title Here", "Episode 11 Title Here", "Episode 12 Title Here" ]; ``` **For Season 4:** ```javascript // Episode titles for Season 04 const season4Titles = [ "Episode 1 Title", "Episode 2 Title", // ... up to episode 12 ]; ``` --- ## Step 2: Add Episode Links Create arrays for SUB, DUB, and UNCENSORED links. Add these after your existing season link arrays. ### For SUB Episodes: ```javascript // ============================================ // SEASON 03 - SUB EPISODES // ============================================ const season3SubHD01 = [ 'https://your-server.com/s03e01-sub.m3u8', // Episode 1 'https://your-server.com/s03e02-sub.m3u8', // Episode 2 'https://your-server.com/s03e03-sub.m3u8', // Episode 3 'https://your-server.com/s03e04-sub.m3u8', // Episode 4 'https://your-server.com/s03e05-sub.m3u8', // Episode 5 'https://your-server.com/s03e06-sub.m3u8', // Episode 6 'https://your-server.com/s03e07-sub.m3u8', // Episode 7 'https://your-server.com/s03e08-sub.m3u8', // Episode 8 'https://your-server.com/s03e09-sub.m3u8', // Episode 9 'https://your-server.com/s03e10-sub.m3u8', // Episode 10 'https://your-server.com/s03e11-sub.m3u8', // Episode 11 'https://your-server.com/s03e12-sub.m3u8' // Episode 12 ]; ``` ### For DUB Episodes (if available): ```javascript // ============================================ // SEASON 03 - DUB EPISODES // ============================================ const season3DubHD01 = [ 'https://your-server.com/s03e01-dub.m3u8', 'https://your-server.com/s03e02-dub.m3u8', 'https://your-server.com/s03e03-dub.m3u8', 'https://your-server.com/s03e04-dub.m3u8', 'https://your-server.com/s03e05-dub.m3u8', 'https://your-server.com/s03e06-dub.m3u8', 'https://your-server.com/s03e07-dub.m3u8', 'https://your-server.com/s03e08-dub.m3u8', 'https://your-server.com/s03e09-dub.m3u8', 'https://your-server.com/s03e10-dub.m3u8', 'https://your-server.com/s03e11-dub.m3u8', 'https://your-server.com/s03e12-dub.m3u8' ]; ``` ### For UNCENSORED Episodes (if available): ```javascript // ============================================ // SEASON 03 - UNCENSORED EPISODES // ============================================ const season3UncensoredHD01 = [ 'https://your-server.com/s03e01-uncensored.m3u8', 'https://your-server.com/s03e02-uncensored.m3u8', // ... up to episode 12 ]; ``` ### If You Don't Have All Episodes Yet (Use Placeholders): ```javascript const season3DubHD01 = [ 'https://your-server.com/s03e01-dub.m3u8', // Episode 1 (has link) '', // Episode 2 (placeholder) '', // Episode 3 (placeholder) '', // Episode 4 (placeholder) '', // Episode 5 (placeholder) '', // Episode 6 (placeholder) '', // Episode 7 (placeholder) '', // Episode 8 (placeholder) '', // Episode 9 (placeholder) '', // Episode 10 (placeholder) '', // Episode 11 (placeholder) '' // Episode 12 (placeholder) ]; ``` > **Important**: Each array MUST have 12 items (one for each episode). Use empty strings `''` as placeholders for missing episodes. --- ## Step 3: Update Episode Database Find the `episodeDatabase` object in your code and add the new season: ```javascript const episodeDatabase = { // Season 1 episodes '1': { 'SUB': season1SubHD01, 'DUB': season1DubHD01, 'UNCENSORED': season1UncensoredHD01 }, // Season 2 episodes '2': { 'SUB': season2SubHD01, 'DUB': season2DubHD01, 'UNCENSORED': season2UncensoredHD01 }, // Season 3 episodes (NEW) '3': { 'SUB': season3SubHD01, 'DUB': season3DubHD01, 'UNCENSORED': season3UncensoredHD01 } // Add Season 4, 5, etc. here }; ``` **For Season 4:** ```javascript // Season 4 episodes '4': { 'SUB': season4SubHD01, 'DUB': season4DubHD01, 'UNCENSORED': season4UncensoredHD01 } ``` --- ## Step 4: Update Episode Data Find the `episodeData` object and add the new season with its titles: ```javascript const episodeData = { '1': season1Titles.map((title, idx) => ({ id: idx+1, title })), '2': season2Titles.map((title, idx) => ({ id: idx+1, title })), '3': season3Titles.map((title, idx) => ({ id: idx+1, title })) // NEW // Add Season 4, 5, etc. here }; ``` **For Season 4:** ```javascript '4': season4Titles.map((title, idx) => ({ id: idx+1, title })) ``` --- ## Step 5: Add Season Button in HTML Find the seasons row in your HTML and add a new button: ```html
Watch More Seasons
``` The `data-season` attribute must match the keys used in `episodeDatabase` and `episodeData` ('1', '2', '3', etc.). --- ## Step 6: Update Server Mirrors (Optional) If you have **different mirror links** for HD-02 through HD-05, update the `serverMirrors` object: ```javascript const serverMirrors = { 'SUB-HD-01': (season) => { if (season === '1') return season1SubHD01; if (season === '2') return season2SubHD01; if (season === '3') return season3SubHD01; // NEW if (season === '4') return season4SubHD01; // For future }, 'SUB-HD-02': (season) => { if (season === '1') return season1SubHD02; // Your mirror links if (season === '2') return season2SubHD02; if (season === '3') return season3SubHD02; // NEW }, // Repeat for HD-03, HD-04, HD-05... 'DUB-HD-01': (season) => { if (season === '1') return season1DubHD01; if (season === '2') return season2DubHD01; if (season === '3') return season3DubHD01; // NEW }, // ... and so on for all server types }; ``` If you don't have different mirror links, you can skip this step - the HD-01 links will be used for all servers. --- ## Complete Working Example Here's a complete example showing how to add Season 3 to your existing code: ```javascript (function() { // Episode titles for Season 01 const season1Titles = [ /* your titles */ ]; // Episode titles for Season 02 const season2Titles = [ /* your titles */ ]; // STEP 1: Add Season 03 titles const season3Titles = [ "The New Threat", "Alliance Formed", "Training Begins", "First Battle", "Unexpected Ally", "Secret Revealed", "Dark Past", "The Tournament", "Semi-Finals", "Final Match", "Aftermath", "A New Beginning" ]; // Season 1 links const season1SubHD01 = [ /* your links */ ]; const season1DubHD01 = [ /* your links */ ]; const season1UncensoredHD01 = [ /* your links */ ]; // Season 2 links const season2SubHD01 = [ /* your links */ ]; const season2DubHD01 = [ /* your links */ ]; const season2UncensoredHD01 = [ /* your links */ ]; // STEP 2: Add Season 03 links const season3SubHD01 = [ 'https://server.com/s03e01-sub.m3u8', 'https://server.com/s03e02-sub.m3u8', 'https://server.com/s03e03-sub.m3u8', 'https://server.com/s03e04-sub.m3u8', 'https://server.com/s03e05-sub.m3u8', 'https://server.com/s03e06-sub.m3u8', 'https://server.com/s03e07-sub.m3u8', 'https://server.com/s03e08-sub.m3u8', 'https://server.com/s03e09-sub.m3u8', 'https://server.com/s03e10-sub.m3u8', 'https://server.com/s03e11-sub.m3u8', 'https://server.com/s03e12-sub.m3u8' ]; const season3DubHD01 = [ 'https://server.com/s03e01-dub.m3u8', '', '', '', '', '', '', '', '', '', '', '' // Placeholders ]; const season3UncensoredHD01 = [ '', '', '', '', '', '', '', '', '', '', '', '' // All placeholders ]; // STEP 3: Update episodeDatabase const episodeDatabase = { '1': { 'SUB': season1SubHD01, 'DUB': season1DubHD01, 'UNCENSORED': season1UncensoredHD01 }, '2': { 'SUB': season2SubHD01, 'DUB': season2DubHD01, 'UNCENSORED': season2UncensoredHD01 }, '3': { 'SUB': season3SubHD01, 'DUB': season3DubHD01, 'UNCENSORED': season3UncensoredHD01 } // NEW }; // STEP 4: Update episodeData const episodeData = { '1': season1Titles.map((title, idx) => ({ id: idx+1, title })), '2': season2Titles.map((title, idx) => ({ id: idx+1, title })), '3': season3Titles.map((title, idx) => ({ id: idx+1, title })) // NEW }; // Rest of your code remains the same... // State, DOM elements, functions, etc. })(); ``` **And in your HTML:** ```html
``` --- ## Quick Reference Checklist Use this checklist when adding a new season: - [ ] **Add episode titles array** (`const seasonXTitles = [...]`) - [ ] **Add SUB links array** (`const seasonXSubHD01 = [...]`) - must have 12 items - [ ] **Add DUB links array** (`const seasonXDubHD01 = [...]`) - use `''` placeholders if needed - [ ] **Add UNCENSORED links array** (`const seasonXUncensoredHD01 = [...]`) - use `''` placeholders if needed - [ ] **Update `episodeDatabase`** with new season entry - [ ] **Update `episodeData`** with new season mapping - [ ] **Add season button** in HTML with correct `data-season` attribute - [ ] **Verify all arrays have 12 items** (count them!) - [ ] **Test the player** by clicking the new season and selecting episodes --- ## Troubleshooting ### Problem: New season button doesn't show episodes **Solution:** Check that: - `data-season` attribute matches exactly (e.g., `data-season="3"`) - Season is added to both `episodeDatabase` and `episodeData` - Titles array has the correct number of items ### Problem: Videos don't play when selecting new season **Solution:** Verify that: - Link arrays have 12 items (even if some are empty) - The server button (e.g., SUB-HD-01) is active - Links in the arrays are correct and accessible ### Problem: "No video available" message shows **Solution:** Check that: - The episode index exists in the link array - For episodes without links, you have empty strings `''` as placeholders - The link for that specific episode is not empty ### Problem: Season button shows but server buttons don't work **Solution:** The server buttons are season-independent, so they should work automatically. Check the browser console for JavaScript errors. --- ## Summary Adding a new season is a **4-step process** in code + **1 step** in HTML: 1. **Titles** → Add `seasonXTitles` array 2. **Links** → Add `seasonXSubHD01`, `seasonXDubHD01`, `seasonXUncensoredHD01` arrays 3. **Database** → Update `episodeDatabase` with new season 4. **Data** → Update `episodeData` with new season 5. **HTML** → Add new season button The server buttons (SUB-HD-01 through HD-05) will **automatically work** with the new season because they're designed to be season-independent! --- *Happy coding! 🚀*