View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0019268 | MMW 5 | Extensions framework | public | 2022-07-21 13:20 | 2022-07-22 17:08 |
Reporter | zvezdan | Assigned To | |||
Priority | none | Severity | minor | Reproducibility | N/A |
Status | feedback | Resolution | open | ||
Summary | 0019268: app.db.ProcessPaths method needed | ||||
Description | I need the mentioned method to force update of folders in the Folders table and Songs.IDFolder field after changes of Songs.SongPath, which are caused by update_songs_songpath trigger and stored in the PathProcessing table. I am using a workaround to that in my add-on, but the problem with any workaround is that: 1. maybe there are situations when it could not work, and/or 2. it is unofficial and, if you change something in your program related to that workaround, it could be broken and unusable for my add-on. You already have the requested code for the mentioned method, you only need to expose it to the scripts. | ||||
Tags | No tags attached. | ||||
Fixed in build | |||||
|
FYI: If you use existing method app.filesystem.renameFiles : https://www.mediamonkey.com/docs/api/classes/Filesystem.html#method_renameFiles Then it will do all the necessary DB updates to the changed path (together with moving/copying the files). If the files are already deadlinks then you can change the path property of a track(s) directly and then call commitAsync. e.g. fastForEach(tracklist, function (track) { track.path = newPath; }); tracklist.commitAsync(); // does all the necessary DB upgrades Or is there a good reason to not use the methods above? |
|
I already explained it here: https://www.ventismedia.com/mantis/view.php?id=19156#c68828 "I don't want to use renameFiles because it cannot move non-media files, which I have already reported (https://www.ventismedia.com/mantis/view.php?id=19103), and that doesn't resolve a requisite to update paths after moving files outside of the program." I am using SQL to bulk update paths, not one by one track using tracklist methods. There is a very good reason for that, called speed. And even simplicity. |