1
00:00:01,960 --> 00:00:08,590
OK, we've got one song set up now, we want to do many songs and it's actually very similar.

2
00:00:08,590 --> 00:00:13,810
So we're just going to copy all of this and come in here and pasted and now make sure I should mention

3
00:00:14,020 --> 00:00:16,990
that everything inside your functions are tabbed over.

4
00:00:16,990 --> 00:00:19,720
And I'm hitting the tab key on the keyboard to tab them.

5
00:00:20,020 --> 00:00:22,420
I am not hitting the space bar a bunch of times.

6
00:00:22,420 --> 00:00:23,110
You can't do that.

7
00:00:23,110 --> 00:00:25,510
You have to tab Python is tab sensitive.

8
00:00:25,510 --> 00:00:33,160
So OK, so basically before we're calling this file dialogue, ask open filename, we can also call

9
00:00:33,160 --> 00:00:41,060
ask open file names like just make it plural and that's basically all you have to do.

10
00:00:41,290 --> 00:00:44,200
So that will allow us to select many names.

11
00:00:44,200 --> 00:00:50,500
But you know, before when we selected one song, we were just returning the name of that one song.

12
00:00:50,800 --> 00:00:51,210
Right.

13
00:00:51,430 --> 00:00:53,700
We're going to be bringing back more than one song.

14
00:00:53,710 --> 00:00:55,990
So this is not going to be singular anymore.

15
00:00:55,990 --> 00:00:56,940
It's not going to be one song.

16
00:00:56,950 --> 00:00:58,630
It's going to be a list of songs.

17
00:00:58,810 --> 00:01:01,900
So we need to actually loop through that list.

18
00:01:02,230 --> 00:01:04,990
And let's change this from song to songs.

19
00:01:04,990 --> 00:01:06,330
That makes more sense, right?

20
00:01:09,580 --> 00:01:15,460
Let's come down here and make some space and let's comment and let's go loop through.

21
00:01:17,260 --> 00:01:22,620
Song list and replace directory structure.

22
00:01:24,620 --> 00:01:32,930
And MP three from song name, right, just like before, but now we want to loop, so we're going to

23
00:01:32,930 --> 00:01:35,930
say four song in songs.

24
00:01:36,680 --> 00:01:38,360
So this is just a basic for loop.

25
00:01:38,660 --> 00:01:43,830
We're saying for each song in this list of songs that we're returning, what do we want to do?

26
00:01:44,180 --> 00:01:46,280
Well, we want to do all of this stuff.

27
00:01:46,280 --> 00:01:54,380
So I'm just going to copy all of this and hit my tab key tab this over so that it's inside of our for

28
00:01:54,380 --> 00:01:54,830
loop now.

29
00:01:54,830 --> 00:01:59,630
So for each song and songs, we want to replace that C audio thing.

30
00:01:59,630 --> 00:02:04,280
We want to replace that MP three from the end of it, and then we want to put it at the end.

31
00:02:04,520 --> 00:02:11,990
And let's just add a comment, add to a playlist or add to end of playlist.

32
00:02:12,260 --> 00:02:16,270
And let's copy this and add this little comment here to write.

33
00:02:16,610 --> 00:02:20,270
I've always bad at commenting, so OK, I think that should do the trick.

34
00:02:20,270 --> 00:02:21,860
So let's go and save this and run it.

35
00:02:24,770 --> 00:02:29,760
Let's pull this over, so let's add many song, let's add many song to play list.

36
00:02:29,780 --> 00:02:30,830
Hold on, let's fix that.

37
00:02:30,980 --> 00:02:31,910
That's going to drive me nuts.

38
00:02:31,920 --> 00:02:35,180
So come down here to our menu thing and add many.

39
00:02:36,250 --> 00:02:39,070
Songs to play list are Save This.

40
00:02:40,210 --> 00:02:41,460
All right, let's run this again.

41
00:02:42,760 --> 00:02:49,120
Bring this over and many songs to playlist, and I'm just going to hold down my mouse button, my left

42
00:02:49,120 --> 00:02:54,190
mouse button and drag up, you can also click on the bottom one and then hold down your shift key and

43
00:02:54,190 --> 00:02:57,400
then press the up arrow key to select as many as you want.

44
00:02:57,610 --> 00:03:03,550
And when you click open, you can see down here it's got a list of all the names and I can click open

45
00:03:03,670 --> 00:03:06,340
and boom, it adds them all very cool.

46
00:03:06,730 --> 00:03:07,800
And that's all there is to it.

47
00:03:09,350 --> 00:03:16,530
So, OK, that's pretty easy, I think in the next video, we'll start to look at deleting songs.

48
00:03:16,590 --> 00:03:19,610
If we want to delete one, we'll create a menu up here that we can do that.

49
00:03:19,730 --> 00:03:20,960
And that'll be in the next video.
