diff --git a/src/main.py b/src/main.py index c4dfd14..a72b35c 100644 --- a/src/main.py +++ b/src/main.py @@ -96,8 +96,5 @@ print("[Info] Download music \"{}\" with the status: {}".format(music.file_name, music.status)) print("[Summary] Found {} new musics".format(new_music_count)) -if new_music_count > 0: - print("Processing the music") - MusicPatcher().process_music() -else: - print("No need processing") \ No newline at end of file +print("Processing the music") +MusicPatcher().process_music() \ No newline at end of file diff --git a/src/patch.py b/src/patch.py index 22361ed..91cb3f8 100644 --- a/src/patch.py +++ b/src/patch.py @@ -33,7 +33,7 @@ self.connection.close() def process_music(self): - postgreSQL_select_Query = "SELECT ID,path FROM track where comment=''" + postgreSQL_select_Query = "SELECT ID,path FROM track" track_records = self.__select(postgreSQL_select_Query) for track_record in track_records: path_tokens = track_record[1].split("/") diff --git a/src/test.py b/src/test.py deleted file mode 100644 index facb1aa..0000000 --- a/src/test.py +++ /dev/null @@ -1,11 +0,0 @@ -import string - -str = "xe7xbdxaaxe6x81xb6xe7x8ex8bxe5x86xa0/xe7x94xb2xe9x93x81xe5x9fx8exefxbcx88xe5xbex90xe6xa2xa6xe5x9cx86Remixxefxbcx89" -res = "" -for i, ch in enumerate(str): - if ch =='x' and len(str) > i+2 and all(c in string.hexdigits for c in str[i+1: i+3]): - res += "\\x" - else: - res += ch - -print(res) \ No newline at end of file