Beispiel #1
0
    def undo_song_rating(params: dict) -> str:
        rating = SongRating.get(fileName=params['fileName']) \
            or SongRating(fileName=params['fileName'])
        rating.rating = rating.rating[:-1]
        classes.DbTables.commit()

        return rating.rating
Beispiel #2
0
    def undo_song_rating(params: dict) -> str:
        rating = SongRating.get(fileName=params['fileName']) \
            or SongRating(fileName=params['fileName'])
        rating.rating = rating.rating[:-1]
        classes.DbTables.commit()

        return rating.rating
Beispiel #3
0
    def add_song_rating(params: dict) -> str:

        rating = SongRating.get(fileName=params['fileName']) \
            or SongRating(fileName=params['fileName'])

        rating.rating += '+' if params['isGood'] else '-'

        classes.DbTables.commit()

        return rating.rating
Beispiel #4
0
    def add_song_rating(params: dict) -> str:

        rating = SongRating.get(fileName=params['fileName']) \
            or SongRating(fileName=params['fileName'])

        rating.rating += '+' if params['isGood'] else '-'

        classes.DbTables.commit()

        return rating.rating