Skip to content

Commit

Permalink
new pr
Browse files Browse the repository at this point in the history
  • Loading branch information
T1duS committed Nov 20, 2018
1 parent 5d83e64 commit f6810f7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ exclude_lines =
if __name__ == .__main__.:
ignore_errors = True
omit =
swaglyrics/tests.py
tests/*
setup.py
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ python:
# command to install dependencies
install:
- pip install .
- pip install blinker
- pip install flask_testing
- pip install codecov
- pip install nose-cov
# command to run tests
script:
script:
- nosetests --nocapture --with-cov --cov-config .coveragerc

after_success:
- codecov
- codecov
5 changes: 3 additions & 2 deletions swaglyrics/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ def get_lyrics(song, artist, make_issue=True):
return lyrics


def lyrics(song, artist):
def lyrics(song, artist, make_issue=True):
"""
Displays the fetched lyrics if song playing.
:param song: currently playing song
:param artist: song artist
:param make_issue: whether to make an issue on GitHub if song unsupported
:return: lyrics if song playing
"""
if song and artist: # check if song playing
Expand All @@ -83,7 +84,7 @@ def lyrics(song, artist):
except FileNotFoundError:
pass
print('\nGetting lyrics for {song} by {artist}\n'.format(song=song, artist=artist), end='')
lyrics = get_lyrics(song, artist)
lyrics = get_lyrics(song, artist, make_issue)
for _ in range(30): # loading spinner
sys.stdout.write(next(spinner))
sys.stdout.flush()
Expand Down
2 changes: 1 addition & 1 deletion swaglyrics/tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
from swaglyrics import spotify

app = Flask(__name__, template_folder=os.path.join(os.path.dirname(os.path.abspath('tab.py')), 'templates'))
app = Flask(__name__, template_folder=os.path.join(os.path.dirname(os.path.abspath('SwagLyrics-For-Spotify')), 'swaglyrics/templates'))
# use relative path of the template folder

song = None
Expand Down

0 comments on commit f6810f7

Please sign in to comment.