1
00:00:01,910 --> 00:00:06,980
In the last video, we set it up to where when we add a song like Loophole Boom, it pops up here at

2
00:00:06,980 --> 00:00:09,440
the bottom of the screen as this.

3
00:00:09,440 --> 00:00:11,510
But we want it to not pop up down here.

4
00:00:11,630 --> 00:00:12,920
We want to pop it up in here.

5
00:00:12,920 --> 00:00:14,680
I just put it down here so we can see it.

6
00:00:14,990 --> 00:00:18,170
So in this video, we're going to add it to the playlist box.

7
00:00:18,170 --> 00:00:18,500
Right.

8
00:00:18,530 --> 00:00:24,380
So let's head over your code and come down to the bottom here and just sort of remember what we called

9
00:00:24,380 --> 00:00:25,240
our playlist.

10
00:00:25,910 --> 00:00:27,620
We call it playlist box.

11
00:00:28,250 --> 00:00:33,260
So to add things to the playlist box, we can just insert them.

12
00:00:33,260 --> 00:00:38,480
And to do that we go playlist, underscore, box, dot, insert, and now we need to give it a position.

13
00:00:38,480 --> 00:00:39,470
Where do we want to put this?

14
00:00:39,480 --> 00:00:41,360
Well, we want to put it at the end of the list.

15
00:00:41,570 --> 00:00:44,450
So that's and and what do we want to put in.

16
00:00:44,450 --> 00:00:46,340
We want to put in this song.

17
00:00:47,550 --> 00:00:47,890
Right.

18
00:00:48,270 --> 00:00:54,870
So and sort of makes sense to me, because as we add songs, it's going to create a list and when we

19
00:00:54,870 --> 00:00:58,140
add a new song, we want to put the new song at the bottom of that list.

20
00:00:58,140 --> 00:01:00,510
So to do that, we just call end all capital.

21
00:01:00,510 --> 00:01:01,760
So go and save this.

22
00:01:02,130 --> 00:01:06,850
And in fact, we can get rid of this comment this out for now.

23
00:01:06,870 --> 00:01:07,710
We don't really need that.

24
00:01:07,950 --> 00:01:08,970
Let's save this and run it.

25
00:01:12,590 --> 00:01:17,500
So let's add a song and let's add not me, and when we do boom, it pops up right there.

26
00:01:17,810 --> 00:01:21,970
We can add another one as I go hiking, boom, it pops up.

27
00:01:21,980 --> 00:01:24,620
But beneath it, we can add another one.

28
00:01:26,510 --> 00:01:27,830
It pops up below there.

29
00:01:28,700 --> 00:01:30,080
We're getting a little spacing thing there.

30
00:01:30,110 --> 00:01:31,550
That's where we'll have to look at that.

31
00:01:32,270 --> 00:01:33,680
But OK, this is working now.

32
00:01:33,920 --> 00:01:38,660
Now, one thing, when we click on these, it's we got this blue bar and the text turns white.

33
00:01:38,660 --> 00:01:39,320
I don't like that.

34
00:01:39,320 --> 00:01:40,610
Will change that in a little bit.

35
00:01:41,000 --> 00:01:46,430
But more importantly, we've got the directory structure and the DOT MP three showing up here, and

36
00:01:46,430 --> 00:01:47,470
I don't really like that.

37
00:01:47,480 --> 00:01:54,110
So by directory structure, I mean, see Colen forward slash MP three slash audio slash and then the

38
00:01:54,110 --> 00:01:56,660
song title and then Dot MP three.

39
00:01:56,660 --> 00:01:58,580
I don't want all of that stuff there.

40
00:01:58,580 --> 00:01:59,750
I just want the song title.

41
00:01:59,750 --> 00:02:04,520
I just wanted to say not me or hiking or move it or lose it.

42
00:02:04,520 --> 00:02:05,810
I just want that song title.

43
00:02:05,810 --> 00:02:11,660
So let's strip out the stuff from the beginning and the stuff at the end and we can do that pretty easily

44
00:02:11,960 --> 00:02:14,020
using just regular python.

45
00:02:14,300 --> 00:02:15,610
So let's get rid of that.

46
00:02:15,620 --> 00:02:16,520
We don't need this.

47
00:02:16,820 --> 00:02:24,410
So let's go, let's go strip out directory structure.

48
00:02:25,830 --> 00:02:30,060
And that MP three from song title.

49
00:02:31,310 --> 00:02:38,990
So to do that, we can just call song and set that equal to song, not replace, we want to replace

50
00:02:38,990 --> 00:02:39,870
something in there.

51
00:02:39,890 --> 00:02:41,030
So what do we want to replace?

52
00:02:41,300 --> 00:02:46,240
Well, we want to replace see, that's capital C and Colon, the forward slash.

53
00:02:46,490 --> 00:02:48,610
We want to remove three.

54
00:02:48,620 --> 00:02:51,580
We want to remove audio and we want to move that.

55
00:02:52,430 --> 00:02:53,960
We want to take all that out.

56
00:02:54,140 --> 00:02:55,700
What do we want to replace it with?

57
00:02:56,120 --> 00:02:56,650
Nothing.

58
00:02:56,660 --> 00:03:02,320
So we just put double quotation marks and then we could copy this and do it again and strip out that

59
00:03:02,720 --> 00:03:04,730
MP three stuff from the end.

60
00:03:05,060 --> 00:03:08,150
And again, we just want to replace it with nothing.

61
00:03:08,420 --> 00:03:14,600
So now Song will just be the song name and when we put it on the list, it'll just be the name.

62
00:03:14,600 --> 00:03:17,570
So we go and save this and run this guy.

63
00:03:20,530 --> 00:03:27,190
And it's a song, not me room now it says, not me, we create another one, add another one, let's

64
00:03:27,190 --> 00:03:30,960
call hiking boots, hiking at another one.

65
00:03:31,780 --> 00:03:34,360
No when sad majesty and.

66
00:03:34,360 --> 00:03:35,310
OK, very cool.

67
00:03:35,980 --> 00:03:38,320
So, all right, we're adding these things here.

68
00:03:38,560 --> 00:03:42,520
But when we click on them, like I said, we get this blue bar and this white tax.

69
00:03:42,520 --> 00:03:43,360
I don't really like that.

70
00:03:43,360 --> 00:03:45,760
So I think we'll change that in the next video.
