コード例 #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()
コード例 #2
0
ファイル: BandModel.py プロジェクト: A-Hassan-M/MusicPlayer
    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()
コード例 #3
0
ファイル: ArtistModel.py プロジェクト: A-Hassan-M/MusicPlayer
    def add_artist(self, artist):
        conn.execute("INSERT INTO artist " + "VALUES('" + artist.name +
                     "', '" + artist.date_of_birth + "', '" + artist.band +
                     "')")

        conn.commit()
コード例 #4
0
 def add_playlist_songs(self, song_name, playlist_name):
     conn.execute("INSERT INTO playlist_song VALUES('" + playlist_name +
                  "','" + song_name + "')")
     conn.commit()
コード例 #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()
コード例 #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()
コード例 #7
0
 def add_playlist(self, name, description):
     conn.execute("INSERT INTO playlist VALUES('" + name + "','" +
                  description + "')")
     conn.commit()
コード例 #8
0
ファイル: BandModel.py プロジェクト: A-Hassan-M/MusicPlayer
 def add_band(self, band_name):
     conn.execute("INSERT INTO band VALUES('" + band_name + "')")
     conn.commit()