diff --git a/src/patch.py b/src/patch.py index ad82aec..c6f2eac 100644 --- a/src/patch.py +++ b/src/patch.py @@ -37,7 +37,7 @@ track_records = self.__select(postgreSQL_select_Query) for track_record in track_records: path_tokens = track_record[1].split("/") - tokens =path_tokens[len(path_tokens)-1].replace(".mp3","").split("_") + tokens =path_tokens[len(path_tokens)-1].replace(".mp3","").replace(".MP3","").split("_") if len(tokens) != 4: continue artist_tracks = self.__select("SELECT track from artist_track where track = {}".format(track_record[0])) @@ -59,4 +59,4 @@ sql_query = "UPDATE track set title='{}' , title_search='{}', comment={} where id={}".format(tokens[0],tokens[0],tokens[3],track_record[0]) self.__update(sql_query) -MusicPatcher().process_music() \ No newline at end of file +MusicPatcher().process_music()