@echo off
rem play.bat
rem RJM Programming
rem November, 2025

set passed=
set rest=
set crest=
set ccom=
set ytprefix=
set substring="PtR4cWb4HNg"
set seven=0

if trick==trick%1 (
  set /p ans=Radio Play via comma separate YouTube 11 character IDs or search ideas for a playlist (if any among first seven in a comma separated list is PtR4cWb4HNg temporary YouTube playlist audio and video play can be attempted) ... 7 for Shower Songs ... egs. Tragedy,Boogie Wonderland,Down Among the Dead Men ... random ... Tragedy ,Imagine*3,Breezin ... ordered 5 ... Tragedy  ,Pina Colada Son,Fast Car ... audio ... Tragedy   ,Galveston,Fix You    ... audio ordered,    and go.  
  set ansplus="%ans%                                                                                                                                              "
 
  if "%ansplus:~12,1%"=="," (
   if "%ansplus:~1,11%"=="%substring%" (
    set ytprefix="ytprefix"
   )
   if "%ansplus:~24,1%"=="," (
    if "%ansplus:~13,23%"=="%substring%" (
     set ytprefix="ytprefix"
    )
    if "%ansplus:~36,1%"=="," (
     if "%ansplus:~25,35%"=="%substring%" (
      set ytprefix="ytprefix"
     )
     if "%ansplus:~48,1%"=="," (
      if "%ansplus:~37,47%"=="%substring%" (
       set ytprefix="ytprefix"
      )
      if "%ansplus:~60,1%"=="," (
       if "%ansplus:~49,59%"=="%substring%" (
        set ytprefix="ytprefix"
       )
       if "%ansplus:~72,1%"=="," (
        if "%ansplus:~61,71%"=="%substring%" (
         set ytprefix="ytprefix"
        )
        if "%ansplus:~84,1%"==" " (
         set seven=7
         explorer.exe "https://www.rjmprogramming.com.au/HTMLCSS/shower_songs.html?thelist=%ans%"
         goto :end
        ) else (
         set seven=6
        )  
       ) else (
         set seven=5
       )  
      ) else (
        set seven=4
      )  
     ) else (
       set seven=3
     )  
    ) else (
      set seven=2
    )  
   ) else (
     set seven=1
   )  
  ) else (
    set seven=0
  )  

) else (
  set ans="%1"

  set ansplus="%1,%2,%3,%4,%5,%6,%7 %8                                                                      "
 
  if "%ansplus:~12,1%"=="," (
   if "%ansplus:~1,11%"=="%substring%" (
    set ytprefix="ytprefix"
   )
   if "%ansplus:~24,1%"=="," (
    if "%ansplus:~13,23%"=="%substring%" (
     set ytprefix="ytprefix"
    )
    if "%ansplus:~36,1%"=="," (
     if "%ansplus:~25,35%"=="%substring%" (
      set ytprefix="ytprefix"
     )
     if "%ansplus:~48,1%"=="," (
      if "%ansplus:~37,47%"=="%substring%" (
       set ytprefix="ytprefix"
      )
      if "%ansplus:~60,1%"=="," (
       if "%ansplus:~49,59%"=="%substring%" (
        set ytprefix="ytprefix"
       )
       if "%ansplus:~72,1%"=="," (
        if "%ansplus:~61,71%"=="%substring%" (
         set ytprefix="ytprefix"
        )
        if trick==trick%8 (
         set seven=7
         if "%ytprefix%"=="ytprefix" (
          goto :beforeend
         )
         explorer.exe "https://www.rjmprogramming.com.au/HTMLCSS/shower_songs.html?thelist=%1,%2,%3,%4,%5,%6,%7"
         goto :end
        ) else (
         set seven=6
        )  
       ) else (
         set seven=5
       )  
      ) else (
        set seven=4
      )  
     ) else (
       set seven=3
     )  
    ) else (
      set seven=2
    )  
   ) else (
     set seven=1
   )  
  ) else (
    set seven=0
  )  

  :beforeend
  set passed=yes
  if "%ans%"=="%substring%" (
     set ytprefix="ytprefix"
  )
  if trick==trick%2 goto :loop
  set ans="%ans%,%2"
  if trick==trick%3 goto :loop 
  set ans="%ans%,%3"
  if trick==trick%4  goto :loop
  set ans="%ans%,%4"
  if trick==trick%5  goto :loop
  set ans="%ans%,%5"
  if trick==trick%6  goto :loop
  set ans="%ans%,%6"
  if trick==trick%7 goto :loop
  set ans="%ans%,%7"
  if trick==trick%8  goto :loop
  set ans="%ans%,%8"
  if trick==trick%9  goto :loop
  set ans="%ans%,%9"
  if "%ytprefix%"=="ytprefix" (
    goto :preend
  )
  explorer.exe "https://www.rjmprogramming.com.au/HTMLCSS/swipe_media.html %ans:"=%"
:loop
  if "%9"=="" ( 
   @echo off
  ) else (
   shift
   set rest="%rest% %9"
   if "%9"=="%substring%" (
     set ytprefix="ytprefix"
   )
   goto :loop
  )
  set ans="%ans%%rest%"
  set ans=%ans:"=%
  if "%ytprefix%"=="ytprefix" (
    goto :preend
  )
  explorer.exe "https://www.rjmprogramming.com.au/HTMLCSS/swipe_media.html %ans%"
)
if trick==trick%passed% (
set ans=%ans:"=%
if "%ans:,=%"=="%ans%" (
  echo "Nothing to do."
) else (
  if "%ytprefix%"=="ytprefix" (
    goto :preend
  )
  explorer.exe "https://www.rjmprogramming.com.au/HTMLCSS/swipe_media.html %ans%"
)
)
goto :end
:preend
set ytprefix="https://www.youtube.com/watch_videos?video_ids="
explorer.exe "%ytprefix%%ans%"
rem exit
:end