Example #1
0
    def add_song(self, song, playlist_name):
        conn.execute("INSERT INTO song VALUES('" + song.name + "','" +
                     song.release_date + "','" + song.lyrics + "','" +
                     song.length + "','" + song.path + "','" + song.album +
                     "')")

        conn.commit()
Example #2
0
    def add_song_band(self, song):
        for band_name in song.bands:
            conn.execute("INSERT INTO song_band VALUES('" + song.name + "','" +
                         band_name + "'," + '0' + ")")
        for band_name in song.featured_bands:
            conn.execute("INSERT INTO song_band VALUES('" + song.name + "','" +
                         band_name + "'," + '1' + ")")

        conn.commit()
Example #3
0
    def add_artist(self, artist):
        conn.execute("INSERT INTO artist " + "VALUES('" + artist.name +
                     "', '" + artist.date_of_birth + "', '" + artist.band +
                     "')")

        conn.commit()
Example #4
0
 def add_playlist_songs(self, song_name, playlist_name):
     conn.execute("INSERT INTO playlist_song VALUES('" + playlist_name +
                  "','" + song_name + "')")
     conn.commit()
Example #5
0
 def remove_playlist_song(self, playlist_name, song_name):
     conn.execute("DELETE FROM playlist_song " + "WHERE playlist_name = '" +
                  playlist_name + "' " + "AND song_name = '" + song_name +
                  "'")
     conn.commit()
Example #6
0
    def remove_playlist(self, name):
        conn.execute("DELETE FROM playlist_song " + "WHERE playlist_name = '" +
                     name + "'")

        conn.execute("DELETE FROM playlist " + "WHERE name = '" + name + "'")
        conn.commit()
Example #7
0
 def add_playlist(self, name, description):
     conn.execute("INSERT INTO playlist VALUES('" + name + "','" +
                  description + "')")
     conn.commit()
Example #8
0
 def add_band(self, band_name):
     conn.execute("INSERT INTO band VALUES('" + band_name + "')")
     conn.commit()