Compare commits
	
		
			No commits in common. "f67691e8d7d71caff6b8ba655b10778af715629d" and "f237ab7e1eb5a26919676871672a4dc6da1c7ab8" have entirely different histories.
		
	
	
		
			f67691e8d7
			...
			f237ab7e1e
		
	
		
							
								
								
									
										21
									
								
								yt
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								yt
									
									
									
									
									
								
							| @ -158,7 +158,7 @@ pick() { # Pick a video to play from a playlist of videos | ||||
| 			if test -z "$list"; then | ||||
| 				list="$(grep "$line" "$cachefile")" | ||||
| 			else | ||||
| 				list="$(printf '%s\n%s' "$list" "$(grep "$line" "$cachefile" | uniq)")" | ||||
| 				list="$(printf '%s\n%s' "$list" "$(grep "$line" "$cachefile")")" | ||||
| 			fi | ||||
| 		done | ||||
| 
 | ||||
| @ -167,30 +167,18 @@ pick() { # Pick a video to play from a playlist of videos | ||||
| 
 | ||||
| 		test -z "$chosen" \ | ||||
| 			|| printf "%s: %s: Playing stream.\n" "$argv0" "$chosen" 1>&2 \ | ||||
| 			&& play "$chosen" | ||||
| 			&& mpv "$chosen" | ||||
| 	fi | ||||
| } | ||||
| 
 | ||||
| play() { # play a video after caching its title | ||||
| 	if test -z "$PLAYER"; then | ||||
| 		printf "%s: Please set \$PLAYER to your preferred video player." \ | ||||
| 			"$argv0" 1>&2 | ||||
| 		exit 78 # sysexits.h(3) EX_CONFIG | ||||
| 	fi | ||||
| 
 | ||||
| 	cache "$@" | ||||
| 	"$PLAYER" "$@" | ||||
| 	mpv "$@" | ||||
| } | ||||
| 
 | ||||
| queue() { | ||||
| 	if test -z "$PLAYER"; then | ||||
| 		printf "%s: Please set \$PLAYER to your preferred video player." \ | ||||
| 			"$argv0" 1>&2 | ||||
| 		exit 78 # sysexits.h(3) EX_CONFIG | ||||
| 	fi | ||||
| 
 | ||||
| 	while test -f "$YT_PL_DIR/$1.m3u"; do | ||||
| 		"$PLAYER" "$YT_PL_DIR/$1.m3u" | ||||
| 		mpv "$YT_PL_DIR/$1.m3u" | ||||
| 		shift | ||||
| 	done | ||||
| } | ||||
| @ -280,6 +268,7 @@ verify() { # replaces videos with archived versions if they are not available | ||||
| for dep in \ | ||||
| 	curl \ | ||||
| 	jq \ | ||||
| 	mpv \ | ||||
| 	yt-dlp | ||||
| do | ||||
| 	if ! command -v "$dep" >/dev/null | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user