Skip to content

Commit

Permalink
cleaned up musicplayer
Browse files Browse the repository at this point in the history
  • Loading branch information
Masterjx9 committed Sep 19, 2022
1 parent 4292303 commit 68427b4
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 91 deletions.
16 changes: 1 addition & 15 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class musicimages(db.Model):

@app.route('/')
def hello():
return 'Hello, World!'
return redirect("vgmplayer")

@app.route('/grvgm', methods=['GET'])
def grvgm():
Expand Down Expand Up @@ -140,20 +140,6 @@ def grvgm():
@app.route('/vgmplayer')
def vgmplayer():
return render_template("musicplayer.html")


# @app.route('/iplookup', methods=['POST'])
# def iplookup():
# if request.method == 'POST':
# request_json = request.json
# iplocadata = requests.get("https://freegeoip.app/json/"+str(request_json["ipaddress"])+"?apikey=cf036630-351d-11ec-bd19-7d45ee7e599d").json()
# googlemaplink = "https://maps.google.com/maps?q=loc:"+str(iplocadata["latitude"])+"+"+str(iplocadata["longitude"])+"&t=&z=8&ie=UTF8&iwloc=&output=embed"
# print(googlemaplink)
# iplookupregion = {
# "mapinfo":googlemaplink
# }
# return iplookupregion



if __name__ == "__main__":
Expand Down
6 changes: 4 additions & 2 deletions static/css/musicplayer.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
*{
margin: 0;
padding: 0;
font-family: cursive;
}
body{
min-height: 100vh;
Expand Down Expand Up @@ -150,12 +149,15 @@ input[type="range"]::-webkit-slider-thumb{
width: 80%;
overflow: hidden;
margin-bottom: 6.5em;
/* border: 1px solid #fff;*/
color: #148f77;
letter-spacing: 1px;
font-family: Impact;
}
.song_detail #title{
text-transform: capitalize;
color: #fff;
font-size: 35px;
font-family: 1px;
}
.song_detail #artist{
text-transform: capitalize;
Expand Down
26 changes: 0 additions & 26 deletions static/js/bitcoinchart.js

This file was deleted.

34 changes: 0 additions & 34 deletions static/js/googlemaps.js

This file was deleted.

24 changes: 11 additions & 13 deletions static/js/musicplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ function load_track(index_no,checker){
reset_slider();

track.src = All_song[index_no].path;
title.innerHTML = All_song[index_no].name;
title.innerHTML = "Title: "+All_song[index_no].name;
track_image.src = All_song[index_no].img;
track_image.style.cssText += "object-fit: contain;"
artist.innerHTML = All_song[index_no].artists;
album.innerHTML = All_song[index_no].album;
platform.innerHTML = All_song[index_no].platform;
year.innerHTML = All_song[index_no].year;
genre.innerHTML = All_song[index_no].genre;
artist.innerHTML = "Artists: "+All_song[index_no].artists;
album.innerHTML = "Game: "+All_song[index_no].album;
platform.innerHTML = "Console/Platform: "+All_song[index_no].platform;
year.innerHTML = "Year: "+All_song[index_no].year;
genre.innerHTML = "Genre: "+All_song[index_no].genre;
track.load();

timer = setInterval(range_slider ,1000);
Expand Down Expand Up @@ -222,12 +222,10 @@ function range_slider(){
// function will run when the song is over
if(track.ended){
play.innerHTML = '<i class="fa fa-play" aria-hidden="true"></i>';
load_track(index_no);
playsong();
// if(autoplay==1){
// index_no += 1;
// load_track(index_no);
// playsong();
// }
// load_track(index_no);
// playsong();
if(autoplay==1){
load_track(index_no,checker="next_song")
}
}
}
2 changes: 1 addition & 1 deletion templates/musicplayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<body>

<div class="main">
<p id="logo"><i class="fa fa-music"></i>Music</p>
<p id="logo"><i class="fa fa-music"></i>VGMify Player</p>

<!-- show_song_number -->
<div class="show_song_no">
Expand Down

0 comments on commit 68427b4

Please sign in to comment.