-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Ultimate Way of Browsing Channels #1320
Open
emrakyz
wants to merge
17
commits into
LukeSmithxyz:master
Choose a base branch
from
emrakyz:patch-6
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Commits on May 2, 2023
-
The Ultimate Way of Browsing Channels
The script works extremely fast except the first time to update the whole data. It takes about 2 minutes to update the whole database with 80 different channels. You can set a cronjob for this. It's not a heavy work for the PC. It justs fetch the text data with yt-dlp. Video example below: This script is a sophisticated and ingenious tool designed to streamline your YouTube experience by organizing and managing your favorite YouTube channels, allowing you to browse and watch videos directly within the script without ever visiting its website. You can assign the channels inside various categories such as "Tech", "Science", "Sports", etc. The videos can be played using the 'mpv' media player. Moreover, the script allows you to sort videos based on view count or duration; download videos; and even maintain a "Watch Later" list. If you combine this script with "SponsorBlock" lua script created for "mpv", then you will have the ultimate experience. SponsorBlock removes all sponsored segments in a video including intros, outros or similar unnecessary parts. It's normally a browser extension but is also available for "mpv". No browsers, accounts, distractions, crappy algorithm and recommendations, advertisements, sponsors, intros, outros, fillers or empty spaces. We eliminate them all. Required Programs: dmenu | mpv | jq | yt-dlp FEATURES 1. Browse all videos from all channels you set at the same time. You can filter titles through dmenu. 2. Browse a channel's videos. 3. Select a channel either from the main menu or inside a Category. 4. Watch, Download or Put videos in a "Watch Later List". 5. Sort videos by view or duration. The default sort is upload date. The only problem is, we can't have the exact upload date, so we can't apply much more advanced filtering. It can be done but it makes fetching the data for the first time too slow. 6. The menus have a complex loop system. It always continues where you left off. The script doesn't close itself when you make a selection. So you don't have to run the script over and over again and get to where you left off. You can also press Escape to return to a prior menu. 7. You won't see the URLs or any unnecessary things inside dmenu. Just the titles. JUSTIFICATION This script is incredibly beneficial for those who seek a minimalist and focused approach to consuming content on YouTube. By providing a CLI-based interface (dmenu), the script reduces distractions and clutter that are commonly encountered on the Youtube website. It allows users to personalize their content consumption and manage channels more effectively. The script is also remarkably efficient and easy to navigate, providing a user-friendly experience that saves time and promotes productivity. The script is organized into functions that each perform a specific task, such as updating channel data, retrieving video titles, playing videos, downloading videos, adding videos to the watch later list, and browsing all channels. These functions are called by the main script to provide the user with various options for navigating and interacting with the videos. The script makes use of various Bash features such as associative arrays, shell redirection and piping, to simplify and streamline the code. It also uses conditionals and loops to handle different user input and error cases. Overall, this script is a powerful and flexible tool for browsing, watching, organizing YouTube channels, and it provides a great example of Bash usage to automate and streamline complex tasks. DETAILED EXPLANATION - The script begins by defining two associative arrays, CHANNELS and CATEGORIES, which store the YouTube channel names along with their respective URLs and categories. It then sets the directories for storing data and videos, and creates them if they do not already exist. - The 'update_data' function updates the metadata for a given channel, while the 'update_all_channels' function updates metadata for all channels. The metadata includes the video title, URL, view count, and duration, which are extracted using 'yt-dlp' and 'jq' utilities. - The 'get_videos' function retrieves the video titles from the metadata of a given channel, sorted by the specified criteria (if any). The 'video_url' function returns the URL of a video based on its title and channel name. The 'play_video' and 'download_video' functions use 'mpv' and 'yt-dlp', respectively, to play or download a video given its title and channel name. - The 'add_to_watch_later' function appends the video title and channel name to a watch later list, while the 'play_watch_later' and 'delete_from_watch_later' functions play a video from the list or remove it, respectively. - The 'get_all_videos' function retrieves all video titles from the metadata of all channels, sorted by the specified criteria. The 'browse_all_channels' function lets you browse through all channels and select a video to watch, download, or add to the watch later list. - The main part of the script first prompts the user to update the database of channels. If the user chooses to do so, the 'update_all_channels' function is called. The script then presents the user with options to browse all channels, browse channels by category, or browse the watch later list. The script loops through these options until the user decides to exit.
Configuration menu - View commit details
-
Copy full SHA for 8e7c55f - Browse repository at this point
Copy the full SHA 8e7c55fView commit details
Commits on May 30, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 395a277 - Browse repository at this point
Copy the full SHA 395a277View commit details
Commits on Sep 29, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 9e2bf97 - Browse repository at this point
Copy the full SHA 9e2bf97View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4fc941b - Browse repository at this point
Copy the full SHA 4fc941bView commit details
Commits on Oct 17, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 96b997e - Browse repository at this point
Copy the full SHA 96b997eView commit details
Commits on Nov 18, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 2734857 - Browse repository at this point
Copy the full SHA 2734857View commit details -
Configuration menu - View commit details
-
Copy full SHA for e15f5ee - Browse repository at this point
Copy the full SHA e15f5eeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3ba7e6d - Browse repository at this point
Copy the full SHA 3ba7e6dView commit details
Commits on Nov 19, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 996af99 - Browse repository at this point
Copy the full SHA 996af99View commit details -
Configuration menu - View commit details
-
Copy full SHA for 60866ca - Browse repository at this point
Copy the full SHA 60866caView commit details -
Configuration menu - View commit details
-
Copy full SHA for a7061f7 - Browse repository at this point
Copy the full SHA a7061f7View commit details
Commits on Dec 2, 2023
-
Configuration menu - View commit details
-
Copy full SHA for ce57705 - Browse repository at this point
Copy the full SHA ce57705View commit details -
Configuration menu - View commit details
-
Copy full SHA for aa74c7a - Browse repository at this point
Copy the full SHA aa74c7aView commit details
Commits on Dec 4, 2023
-
Configuration menu - View commit details
-
Copy full SHA for d5f31b5 - Browse repository at this point
Copy the full SHA d5f31b5View commit details
Commits on Jul 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a43657a - Browse repository at this point
Copy the full SHA a43657aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 37ffc69 - Browse repository at this point
Copy the full SHA 37ffc69View commit details -
Configuration menu - View commit details
-
Copy full SHA for ae85e22 - Browse repository at this point
Copy the full SHA ae85e22View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.