

Tables_names = for i in tables_names]ĭf: pd.DataFrame, db_path: str, table_name: str, overwrite: bool = False Return unquote(file_url).replace("file://", "")ĭef list_table_names(db_path: str) -> list: Return pd.read_sql_table(table_name, db_path_to_url(db_path))ĭef file_url_to_path(file_url: str) -> str:
Mixxx sqlite code#
Here's the Python code to export the Clementine database: # main.pyĬlem_db = "/home/francois/.config/Clementine/clementine.db"ĭf = df.apply(file_url_to_path)ĭf = df.apply(lambda p: Path(p).exists())]ĭup_fields = ĭf = df.drop_duplicates(dup_fields, keep="first")ĭf = df.apply(lambda x: Path(x).name)ĭf = df.apply(lambda x: Path(x).parent.as_posix())ĭf = df.apply(lambda x: Path(x).stat().st_size)ĭf, db_path="custom_music_library.sqlite", table_name="library"ĭef open_table_as_df(db_path: str, table_name: str) -> pd.DataFrame: And it does… so all the fixes I tried were meaningless.įINAL EDIT: I went for pure SQL (sqlitebrowser on Linux is great) to edit the database and that is a success! I still used Python/pandas to export the database of y music player (Clementine), since it's way easier to handle the various paths needed (especially with bytes path found in Clementine). But no effect… EDIT: it actually mixed up the waveform as I hadn't paid attention to the track_analysis table.ĮDIT: Ooooooh… I forgot… I'm using sqlite/pandas libraries combo to handle the loading and writing of databasesĮDIT2: I finally did what I should have done from the start: a read-write test with pandas to see if that alone corrupts the database.

Note that I thought of updating the library:location field and the track_location:id field (which corresponds) so that they have continuous indices starting from 1. When I open the database again, the track is there but have no id value. I get the following error:Ĭritical : Invalid database identifier value: QVariant(int, 0) The auto-fix worked… but I somehow missed something as I cannot add new songs to the library. Then I create track_location using library merged with the track location from my music player. I remove duplicate or not found files from library by simply removing rows I make use of the information of my music player, which has the updated path: I merge this information with the library table, and from there (and some Python stuff to get the file size) I've got all the information needed to generate a new track_location table.
Mixxx sqlite download#
I've edited the mixxxdb.sqlite database, to auto-fix missing files, to handle change of extension when I download a better quality format for example.
