diff --git a/LyricsPy/servicios/instance/songs.db b/LyricsPy/servicios/instance/songs.db index 596e604..f516d43 100644 Binary files a/LyricsPy/servicios/instance/songs.db and b/LyricsPy/servicios/instance/songs.db differ diff --git a/LyricsPy/servicios/lyrics/paginas.py b/LyricsPy/servicios/lyrics/paginas.py index c01b5c7..af1308f 100644 --- a/LyricsPy/servicios/lyrics/paginas.py +++ b/LyricsPy/servicios/lyrics/paginas.py @@ -106,3 +106,22 @@ def album(album_id): @bp.route('/uploads/') def uploaded_file(filename): return send_from_directory(current_app.config['UPLOAD_FOLDER'], filename) + +@bp.route('/searchsong') +def searchsong(): + query = request.args.get('query', '') + if query: + songs = Song.query.filter(Song.title.contains(query)).all() + else: + songs = [] + return render_template('searchsong.html', query=query, songs=songs) + + +@bp.route('/searchalbum') +def searchalbum(): + query = request.args.get('query', '') + if query: + albumes = Album.query.filter(Album.name.contains(query)).all() + else: + albumes = [] + return render_template('searchalbum.html', query=query, albumes=albumes) diff --git a/LyricsPy/servicios/lyrics/templates/_cabecera.html b/LyricsPy/servicios/lyrics/templates/_cabecera.html index 5016d9f..661252d 100644 --- a/LyricsPy/servicios/lyrics/templates/_cabecera.html +++ b/LyricsPy/servicios/lyrics/templates/_cabecera.html @@ -9,15 +9,6 @@ Menu -
- -
-