Compare commits

...

12 Commits

Author SHA1 Message Date
5c32daf593 Change order of arguments 2024-04-28 16:28:32 +02:00
15f332d318 Updated list of songs 2024-04-28 16:19:46 +02:00
2754ebd482 Add .pre-commit 2024-04-28 16:18:59 +02:00
d73a192e27 Updated list of songs 2024-04-09 08:45:46 +02:00
b11f1275c3 Updated list of songs 2024-03-02 10:31:25 +01:00
6f367b6ffc Updated list of songs 2024-02-24 13:07:13 +01:00
21b941bf04 Updated list of songs 2024-02-17 09:48:04 +01:00
e19c885371 Updated list of songs 2024-02-11 15:15:18 +01:00
2d3dc09095 Updated list of songs 2024-02-10 11:11:21 +01:00
87fed8d24b Updated list of songs 2024-02-04 17:36:48 +01:00
21bbafdee7 Updated list again 2024-01-29 21:43:45 +01:00
b7884fc285 Updated list 2024-01-29 21:40:39 +01:00
3 changed files with 340 additions and 107 deletions

17
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,17 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.2
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format

View File

@@ -1,62 +1,273 @@
01 - Raw As F**k - The Slammer (12" Vinyl HD)
02 - Crack DJ's - OK Run!
03 - Unsolved Mysteries
04 - Lords of Motion (Breaks Remix) (Aquasky Vs. Masterblaster)
05 - X-Ray (Follow Me)
06 - Tu Café (Deekline & Ed Solo Remix)
07 - Cut & Run - No Good
08 - Multiply & ED 209 - You Nnow
09 - Josh Wink - Higher State Of Consciousness Original
10 - Buzzthrill - Everybody In The House (Get Some Mix)
11 - sugar - the feeling (powertools acid funk mix)
12 - Friction & Spice - Groove Me (Original Mix)
13 - Lula - Man = Drug (Sfx Beat Remix)
14 - MOSEH NAIM - NEEM (Shooting Star)
15 - DA HOOL :: Hypochondria (KULTÜR Breaks Remix)
16 - monstah freakz - thats right! (dj kultur + jan-b remix)
17 - Milk Inc - La Vache ( Kultur Remix) + Lula - Men&Drugs (Rasco&Isy Remix)
18 - LA RISSA - I DO BOTH JAY AND JANE (Sireena Breakbeat)
19 - WOOKIE - BACK UP (Dj Zinc Remix)
20 - GROOVKIDZ - I FEEL THIS WAY (DJ Razzz & Mojo´s Ultrapure Mix)
21 - Dj Mike B - Feel My Energy (Original Mix)
22 - Da Antidote
23 - Disco Biscuit (Remastered)
24 - Dj Quest & Ken Mac vs Backdraft - The Prophecy
25 - FROG JUNKIES AIR GUITAR serious acid mix
26 - The Dust Brothers - Chemical Beats
27 - You And Me
28 - Hankook - 303 (Original Mix) [Distortion Records]
29 - Micro - Fall Into Me (DJ Icey Remix)
30 - DJ Defkline And Red Polo - Felix Hustle
31 - Kiero Breakbeat
32 - BASCO - THE BEAT IS OVER (Original Mix)
33 - Krome & Time - The Slammer (1993)
34 - Brothers Of Dub -Same Frequency ( Future Funk Squad's 'Sonic Correction' Remix ) [ FREE DOWNLOAD ]
35 - Nasty
36 - Fresh Flamenco
37 - Don't you want me (Breakbeat)
38 - 1993
39 - Feel The Vibe
40 - Breaks | Müme - Finger Lickin [Phreak Recordings]
41 - Mute (ES) - Old School Flavour (Original Mix) [Distorsion Records]
42 - Karma
43 - Perfect Kombo Ft. Viper X - Go To The Guadalpark (Original Mix).wmv
44 - Tucu Tucu
45 - Cat Hedral
46 - Oscar - M.A.D. (Mental Ability To Be Different)
47 - The Dj's Project - Funk-Da-Fried-Party (Original Mix)
48 - Dylan Rhymes - Naked & Ashamed (Original Mix)
49 - Buzzthrill - Come With Me (Kelly Reverb She's A Goner Mix)
50 - Red Alien Feat. Afrika Islam - Red Alien (Zulu Beats Mix)
51 - Envelope - Electronic Love (Extended Mix)
52 - DJ I.C.O.N. - Voco Me (Breakbeat Remix)
53 - House Empire - Excuse Me (Break Beat Mix)
54 - Let's Get Loco
55 - Scania
56 - Death Race
57 - Mike Reitmayer - Cafe Del Mar (Remix 5° Aniversario)
58 - 2 Funky in Here (Maceo Rivas & Dr Black Sheep Remix)
59 - Novy vs Eniac Smoke Dis (Original Mix) [Breakbeat]
60 - X-Perimental II
61 - DJ Icey - Low Down Good Girl
62 - Electroliners - Loose Caboose
03 - Lords of Motion (Breaks Remix) (Aquasky Vs. Masterblaster)
04 - X-Ray (Follow Me)
05 - Tu Café (Deekline & Ed Solo Remix)
06 - Multiply & ED 209 - You Nnow
07 - Josh Wink - Higher State Of Consciousness Original
08 - Buzzthrill - Everybody In The House (Get Some Mix)
09 - sugar - the feeling (powertools acid funk mix)
10 - Lula - Man = Drug (Sfx Beat Remix)
11 - MOSEH NAIM - NEEM (Shooting Star)
12 - DA HOOL :: Hypochondria (KULTÜR Breaks Remix)
13 - monstah freakz - thats right! (dj kultur + jan-b remix)
14 - LA RISSA - I DO BOTH JAY AND JANE (Sireena Breakbeat)
15 - WOOKIE - BACK UP (Dj Zinc Remix)
16 - GROOVKIDZ - I FEEL THIS WAY (DJ Razzz & Mojo´s Ultrapure Mix)
17 - Dj Mike B - Feel My Energy (Original Mix)
18 - Da Antidote
19 - Disco Biscuit (Remastered)
20 - Dj Quest & Ken Mac vs Backdraft - The Prophecy
21 - FROG JUNKIES AIR GUITAR serious acid mix
22 - The Dust Brothers - Chemical Beats
23 - You And Me
24 - Hankook - 303 (Original Mix) [Distortion Records]
25 - DJ Defkline And Red Polo - Felix Hustle
26 - Kiero Breakbeat
27 - Krome & Time - The Slammer (1993)
28 - Nasty
29 - Fresh Flamenco
30 - 1993
31 - Feel The Vibe
32 - Perfect Kombo Ft. Viper X - Go To The Guadalpark (Original Mix).wmv
33 - Tucu Tucu
34 - Cat Hedral
35 - Oscar - M.A.D. (Mental Ability To Be Different)
36 - The Dj's Project - Funk-Da-Fried-Party (Original Mix)
37 - Dylan Rhymes - Naked & Ashamed (Original Mix)
38 - Buzzthrill - Come With Me (Kelly Reverb She's A Goner Mix)
39 - Red Alien Feat. Afrika Islam - Red Alien (Zulu Beats Mix)
40 - Envelope - Electronic Love (Extended Mix)
41 - House Empire - Excuse Me (Break Beat Mix)
42 - Let's Get Loco
43 - Death Race
44 - Mike Reitmayer - Café Del Mar 2002
45 - 2 Funky in Here (Maceo Rivas & Dr Black Sheep Remix)
46 - Novy vs Eniac Smoke Dis (Original Mix) [Breakbeat]
47 - X-Perimental II
48 - Electroliners - Loose Caboose
49 - Take California
50 - Aquagen - Phatt Bass (DJ Anuschka 5º Aniversario rmx)
51 - Dj Karpin - You Belong To Me
52 - Leo Anibaldi - Im Really Sick (Sfx Beats Remix)
53 - Luna C - Piano Progression (Sfx Beats Remix)
54 - Sfx Beats - Bad Beats
55 - Sfx Beats - The United Make A Power
56 - The Verve - Dont Stop (Sfx Beats Remix)
57 - Ghost Stars 1 Unknown Artists #breakbeat #music #andalucia #novedades #españa
58 - Milk Inc. - Vache (Remix Dj Fen)
59 - EMERGENCY - CHECK IT OUT (DJ GAZ BREAKBEAT MIX)
60 - Law of Life
61 - Welcome To The Rave
62 - Geon - Intensity (Kulman Remix)
63 - Easy (Extended Mix)
64 - Mr Fli - Under The Sky (Original Version)
65 - Heartjumpa (Original Version)
66 - Southside Spinners - Luvstruck (Breakbeat Remix)
67 - Your Caress (All I Need) (Extended Mix)
68 - Urban Hype - A Trip To Trumpton (12'' Club Version) (1992)
69 - Dj Voyce - La Musica
70 - Benigno
71 - Hyper Go
72 - Backdraft - Headcharge
73 - DJ Zinc and Jammin Go DJ (Original Mix)
74 - Punk Or Funk (Original Mix)
75 - Morpheus (Original Mix)
76 - Baddest DJ (Original Mix)
77 - Dj Fen - To The World (Kultür Remix)
78 - DJ Nomad & Taranto - Horizon (Original Mix Edit) @breakbeatologia @Adolfoyadore
79 - Con - Let It Go (Break-Trance Mix)
80 - Before - Believe In Love (Break Beat Mix)
81 - Capella - U Got 2 Know (Kultür + Jan-B Break Remix)
82 - Warning
83 - What Ya Say
84 - Sol Brothers - That Elvis Track (DC Remix)
85 - Propellerheads Dive! (Original Mix)
86 - Progression - Reach Further (Original MIx)
87 - O-Men - The Omen (Original Mix)
88 - Dj Kultur - Magic
89 - Yves Deruyter - Outsiders (Marusha Remix)
90 - Six Million
91 - JDS Blackout
92 - Zero - Emit/Collect (Rennie Pilgrem Agatha Stomp)
93 - 777 (Remastered Lucky Strike Mix)
94 - It's Ruff
95 - To The Top
96 - Manic Stamped
97 - Elite Force - Bombin The Subway (Elite Force Monsta Mix)
98 - Take Me 2003
99 - Dj Quest - Wormhole (feat Odissi)
100 - Cut and Run - Murder in the jamrock (Tclub)
101 - Distortionz vs Deep Impact - Demonz - Bass Invaderz - Breakbeat, Nuskool Breaks
102 - Citriq Lines - Reset
103 - Private video
104 - New Dimension
105 - Deep Impact - Carpet Muncha (Original Mix)
106 - DJ QUEST gravelmuncha
107 - Kung Fu Funk (Original Mix)
108 - Pendulum - Fasten Your Seltbelt Feat. The Freestylers
109 - ED209 - Infectious (Distortionz Remix) - Hardcore Beats - Breakbeat, Nuskool Breaks
110 - Cut & Run No Good
111 - DJs Friction And Spice Groove Me (Original)
112 - Fall Into Me (DJ Icey Remix)
113 - Interstellar
114 - Jiro - Pull Up (Original Mix) [Distortion Records]
115 - The Beat Is Over
116 - Brothers Of Dub Same Frequency (Future Funk Squad's 'Sonic-Correction' Remix)
117 - MÜME - Finger Lickin (original mix) #breakbeat
118 - Old School Flavour
119 - I.C.O.N. - Voco Me (Original)
120 - DJ Icey Low Down Good Girl
121 - Freestylers Feat. Million Dan - Boom Blast (Deekline & Wizard Feat. Yoland Remix)
122 - Phreak
123 - Floorfilla - Mr Q Screams Out (Kultür Remix)
124 - Deekline & Wizard - Woah
125 - Deekline & Wizard Feat Spoonface - Blo Dem Away
126 - Breakfastaz x Ivory - Girls, Money, Drinks and Drugs
127 - Game Control (Original Mix)
128 - Hell Yeah! (Original Mix)
129 - X- Rated (Original Mix)
130 - Omni Trio - Renegade Snares (Aquasky vs Masterblaster Remix)
131 - Quench Dreams (Franxis`90 & Sunrise remix)
132 - Shadow Breaks (Keep on Movin' Mix - Mixed)
133 - Hold You (Original Mix)
134 - Africa (Sun God Mix)
135 - War
136 - The Rage
137 - Afterparty
138 - Wizard & Ivory - Jack In A Box (Aquasky Remix)
139 - Whats Down Low (Aquasky vs. Masterblaster Breaks Mix)
140 - Annihilation
141 - Mr. Fli Serious Sound
142 - FM-3 & Bowser - Backstage
143 - Aquasky vs Master Blaster - Thru The Fire (Backdraft Rmx)
144 - DJ Baby Anne 'Mixtress'
145 - PHUTURE ASSASSINS - Ganja Madness (Backdraft Remix) - Warehouse Wax 008
146 - 2000 & More
147 - R U Ready, Pt. 2
148 - Labrat (Backdraft's VIP Mix)
149 - the autobots vs screwface - Apocalypse.
150 - Baymont bross - Mutanbreakz - Drop the bass .
151 - dr fish - influenza - Sasser Remix.
152 - conectivers and bikto -The quarantine .
153 - Backdraft - Nicotine
154 - Concentrate
155 - Doc Zee & Greenflamez - Set Me Free
156 - Big Eyes
157 - Anonymous (D-Fast Beats Remix)
158 - Nation of Love (GreenFlamez & Dr Black Sheep Remix)
159 - DJ QUEST & DJ ODISSI - Break Me (Original Pyramid Remix) @breakbeatologia
160 - No Heaven
161 - Amnexiac - Surrender (original mix)
162 - Westbam - Beatbox Rocker
163 - *1995 * Rennie Pilgrem - A Place Called Acid [ TEMAZO RETRO BREAKBEAT ]
164 - *2002* Aka - Bubblegum 2 [ Temazo Retro Breakbeat ]
165 - *2004* Distortionz - Can of Worms [ Temazo Retro Breakbeat ]
166 - CTRL Z Vs The Autobots Vs Screwface - Karma
167 - Pink Elephant vs Backdraft - Better L8 Than Never
168 - Back Again
169 - Will Azada - Mysterious White Powder (Original Mix) [Hypercolour]
170 - Energy Mash (Aquasky vs. Masterblaster)
171 - Megatron (Aquasky vs. Masterblaster)
172 - Krafty Kuts & Skool Of Thought - Devastate
173 - Old Groove
174 - Ctrl Z, Screwface and Stereotype - Dusk Til Dawn (demeNtial BPM Mix)
175 - Dylan Rhymes & Pablo Decoder - I am Sweet (Ctrl Z RemiX)
176 - The Autobots vs Screwface - Flesh Eater
177 - Koma & Bones - Get Down (The Breakfastaz remix)
178 - D-Ranged - Killer Spiderz
179 - Wayward Soul Wild Child
180 - Rave In The Moon
181 - Revolution
182 - Blood For Everyone
183 - Plump DJs feat Gary Numan - Pray For You (Lee Coombs Remix)
184 - J.D.S. Daylight
185 - Avion
186 - Vortex (Original Mix)
187 - Libre (Bad Legs Remix)
188 - Angel Dust Remix (FFS Remix)
189 - Autobots_-_Blogger
190 - Time Out
191 - Breakbeat nation vol.1. Dziblio--After Hours
192 - I Need A Breakbeat
193 - Elektronauts - Bumper (Plump DJs Vocal Mix)
194 - Player One Into The Darkness (Original Mix)
195 - Bill Vega & New Decade - Mind Beats
196 - Stepsine - Gen Sec of Breaks
197 - Freeflow 45 - Peaktime
198 - Take Me Away (XTC Come Hard Mix)
199 - Kay Cee - Unsolved Mysteries (Elektrochemie LK Remix)
200 - M.A.N.I.C. - I'm Coming Hardcore '96 (Original Mix)
201 - Excuses For Skipping - Tonic For Hysteria (Simon Apex & Smart Bomb Remix)
202 - Esion - Buzzin
203 - Amunition (Original Mix)
204 - The Wiggle
205 - Private video
206 - Menorca
207 - Case 82 & Dazzler - Deep Inside (Original Mix)
208 - Dogzilla (Chris Carter & JHZ Feat SKB) - Big Chat
209 - Wu Tang
210 - Hardcore Man
211 - The Monster
212 - Abyss
213 - Skinwalkers
214 - Dj Kultur Everybody Get Up
215 - Kultür - Evassion4Ever (Take 1)
216 - Quadrophonia  Quadrophonia (Nu Skool Breaks Remix) @DjMarcioDanceSjp
217 - Spit It Out - The Breakfastaz
218 - Infiniti - Running Away
219 - Aquasky - Structure
220 - "Make Me Feel Good" - Dj Icey
221 - Rasco & Peaky Beats - Cats In Seville
222 - Flaunting
223 - Say my name
224 - Dreamers
225 - Enigma
226 - It Takes Me Up
227 - Karuma On Y Va (Kultür Remix)
228 - Dj RiCeY - Castles in the Sky (Break Beat)
229 - The Breakfastaz - Kick It
230 - DJ Mike B Into The Groove
231 - Freq Nasty - Brooklyn to Brixton (Freestylers Raw as fuck remix).wmv
232 - Mark Ruff Ryder - We Do It Ruff (Vs Joy Mega Mix)
233 - Sly Fidelity - Skin & Bone (Rennie Pilgrem & Blim Mix)
234 - Lee Coombs - Future Sound Of Retro
235 - Splitloop - Panic Mechanic (Original Mix)
236 - Nectarios - Pheonix (Vigi And Nectarios Mix)
237 - Stereo 8 - Stamina Feat Jakes
238 - Dee Pattern Vs J.D.S. Who's The Bad Man (Untitled Mix 1)
239 - CHRIS CARTER: ESP (2022 Remaster)
240 - Masthaz of Phunk - Masthaz of Phunk (Phat Mixz)
241 - Dee Pattern Vs J.D.S. Who's The Bad Man (Untitled Mix 2)
242 - Vlad & Ardisson - Metrognome (Smithmonger remix)
243 - Drumattic Twins - Thinkin' About You Baby
244 - Bass City Rollaz - Everybody Get Funky
245 - Plump DJs - Big Groovy Fucker
246 - Arthur Baker vs Rennie Pilgrem - Like no other (Rennie Pilgrem Mix)
247 - Hoffman - Everybody
248 - Bad Habits 2008 Remix - Portal - 2FX / 2 Fresh - Hardcore Breaks / HCB / Oldskool / Rave / Piano
249 - Semi Detached - Funky Plucker!
250 - Dave London - Breathe Deep (Infiniti Remix)
251 - Bass City Rollaz - Bad One
252 - Qb Project - in Time (Pete Voyagers Mix)
253 - Cut & Run Loneliness
254 - Peacemaker - Last Train (Original Mix)
255 - Black Mushroom - Don't Clap Anybody (Ecstatica Mix)
256 - Cobra (Chris Carter Remix) (Aquasky Vs. Masterblaster)
257 - Cut & Paste - Forget It (Original Krinkle Kut)
258 - Royksopp - What Else Is There (Trentemoller Breaks Mix)
259 - Swordpen (Original Mix)
260 - Cut & Run - Palinka / Beatman and Ludmilla - Inka (Backdraft remix)
261 - Aquasky - Sucker Punch
262 - Alieneye - Found A Cafe (Mix 2)
263 - Anuschka - Feel The Generation
264 - DJ 43 Pepper Spray (I Wouldn't Want That Sprayed In My Face Remix)
265 - Orbital - Kein Trink Wasser
266 - Ctrl Z vs Screwface [Stereo Typical]
267 - Balls To The Wall (Stereo:Typical Pt. 2) (Original Mix)
268 - Turn up the Music (Dr Black Sheep Remix)
269 - The Silence (Matt Darey Tekara Mix)
270 - dj Isy - Adrenaline
271 - Transformer Man - Hell Hound (Kem Remix)
272 - Brainkiller - Destroy The World
273 - Influenza - Let Me Fall ( KmFx rmx )

View File

@@ -10,32 +10,28 @@ import re
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
import googleapiclient.errors
scopes = ["https://www.googleapis.com/auth/youtube.force-ssl"]
channels = {
"breakbeat_sesiones":"PLZFfy80_qguYVqbpQlX-aHdiYHTwc6-wW",
"breakbeat_temas":"PLZFfy80_qguZnpBYfSFlkMdjGIfVcz7e7",
"breakbeat_sesiones": "PLZFfy80_qguYVqbpQlX-aHdiYHTwc6-wW",
"breakbeat_temas": "PLZFfy80_qguZnpBYfSFlkMdjGIfVcz7e7",
"wods": "PLZFfy80_qguYCbTDQD0GSK4zUzEjbQMQT",
"rap_español": "PLZFfy80_qgub44wWWDcAykdQCJNCXo4jp",
}
def get_playlist_length(youtube, playlist_id):
items = youtube.playlists().list(
part="snippet,contentDetails",
id=playlist_id
)
items = youtube.playlists().list(part="snippet,contentDetails", id=playlist_id)
playlist_info = items.execute()
return playlist_info['items'][0]['contentDetails']['itemCount']
return playlist_info["items"][0]["contentDetails"]["itemCount"]
def list_songs(youtube, channel_id, stdout=False):
max_results = 50
request = youtube.playlistItems().list(
part="snippet,contentDetails",
maxResults=max_results,
playlistId=channel_id
part="snippet,contentDetails", maxResults=max_results, playlistId=channel_id
)
response = request.execute()
print()
@@ -43,9 +39,9 @@ def list_songs(youtube, channel_id, stdout=False):
# Process the first page of results
deleted = 0
songs_list = []
for idx, item in enumerate(response['items'], start=1):
title = item['snippet']['title']
for idx, item in enumerate(response["items"], start=1):
title = item["snippet"]["title"]
if title == "Deleted video":
deleted += 1
continue
@@ -53,36 +49,43 @@ def list_songs(youtube, channel_id, stdout=False):
# Continue making requests for additional pages using pageToken
new_starting = 51
while 'nextPageToken' in response:
while "nextPageToken" in response:
request = youtube.playlistItems().list(
part='snippet',
part="snippet",
playlistId=channel_id,
maxResults=max_results,
pageToken=response['nextPageToken']
pageToken=response["nextPageToken"],
)
response = request.execute()
# Process the results for the additional pages
for idx, item in enumerate(response['items'], start=new_starting):
title = item['snippet']['title']
for idx, item in enumerate(response["items"], start=new_starting):
title = item["snippet"]["title"]
if title == "Deleted video":
deleted += 1
continue
continue
songs_list.append(f"{idx-deleted:02d} - {title}")
new_starting += 50
if stdout:
# Print to standard output
print("\n".join(songs_list))
get_key_by_value = lambda dict, val: next((k for k, v in dict.items() if v == val), None)
channel_name = get_key_by_value(channels, channel_id)
# get_key_by_value = lambda dict, val: next(
# (k for k, v in dict.items() if v == val), None
# )
def _get_key_by_value(dict, val):
return next((k for k, v in dict.items() if v == val), None)
channel_name = _get_key_by_value(channels, channel_id)
# Save to file if output_file is provided
with open(f"{channel_name} songs", 'w', encoding='utf-8') as file:
with open(f"{channel_name} songs", "w", encoding="utf-8") as file:
file.write("\n".join(songs_list))
print("\nList created successfully!")
def add_song(youtube, channel_id, song):
pos = get_playlist_length(youtube, channel_id)
@@ -92,25 +95,27 @@ def add_song(youtube, channel_id, song):
"snippet": {
"playlistId": channel_id,
"position": pos,
"resourceId": {
"kind": "youtube#video",
"videoId": song
}
"resourceId": {"kind": "youtube#video", "videoId": song},
}
}
},
)
response = request.execute()
# response = request.execute()
request.execute()
print("\nSong added successfully!")
def main():
parser = argparse.ArgumentParser(description="Manage YouTube playlist songs.")
parser.add_argument("-l", "--list", action="store_true", help="List songs in the playlist")
parser.add_argument("-a", "--add", metavar="song", help="Add a song to the playlist")
parser.add_argument("channel_name", help="Name of the playlist")
parser.add_argument(
"-l", "--list", metavar="channel_name", help="List songs in the playlist"
)
parser.add_argument(
"-a", "--add", metavar="channel_name", help="Name of the playlist"
)
parser.add_argument("song", nargs="?", help="Name of the song")
args = parser.parse_args()
channel_name = args.channel_name
channel_name = args.add or args.list
channel_id = channels.get(channel_name)
if not args.list and not args.add:
@@ -124,27 +129,27 @@ def main():
# *DO NOT* leave this option enabled in production.
os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "1"
api_service_name = "youtube"
api_version = "v3"
# scopes is a global variable
client_secret = "./client_secrets.json"
flow = InstalledAppFlow.from_client_secrets_file(
client_secret, scopes)
flow = InstalledAppFlow.from_client_secrets_file(client_secret, scopes)
credentials = flow.run_local_server(port=0)
youtube = build(
api_service_name, api_version,
credentials=credentials)
api_service_name = "youtube"
api_version = "v3"
youtube = build(api_service_name, api_version, credentials=credentials)
if args.list:
list_songs(youtube, channel_id, stdout=False)
elif args.add:
song = args.add
# # this assumes a song is passed as in either of the following ways
# # https://youtu.be/eEnyi9L6KP4 --> split by "/"
# # https://youtube.com/watch?v=Ez-gizOF0Wo --> split by "="
if not args.song:
parser.error("Please provide the name of the song with -a.")
song = args.song
# this assumes a song is passed as in either of the following ways
# https://youtu.be/eEnyi9L6KP4 --> split by "/"
# https://youtube.com/watch?v=Ez-gizOF0Wo --> split by "="
song = re.split(r"/|=", song)[-1]
add_song(youtube, channel_id, song)
if __name__ == "__main__":
main()