|
|
|
08-05-2019, 06:57 AM
|
#1
|
Human being with feelings
Join Date: Nov 2014
Posts: 798
|
Rescan database in media explorer
Is there any way to force a rescan of a database in media explorer?
I'd like to refresh the database automatically after a file has been rendered to it, or after a version control update.
|
|
|
08-05-2019, 09:13 AM
|
#2
|
Human being with feelings
Join Date: Dec 2009
Location: Oblivion
Posts: 10,252
|
Right click the database. Don't know of a way to make it automatic tho.
|
|
|
08-05-2019, 09:34 AM
|
#3
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
@Travesty
Post that into my Ultraschall-API and I'll have a look at it.
Maybe I can do something about it..
|
|
|
08-05-2019, 10:42 AM
|
#4
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,874
|
My databases related scripts just close and reopen the media explorer. Works nicely.
|
|
|
08-06-2019, 07:36 AM
|
#5
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Do you mean by database refreshing the file-listview?
|
|
|
08-06-2019, 07:45 AM
|
#6
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,874
|
Oops I read too quickly,
What I meant is that refreshing a database file which have been altered can be done by closing and reopening media explorer,
but for the OP, who whant the file to be added to that database,
this means have a previous step: a script capable of adding a file to a database.
I have the code needed to do such things (database parser, file analysis etc) but I reserved to custom dev (it is not in free scripts).
Though, ricghtclick databse -> Rescan for new files is pretty fast so unless the database is really huge it may not worth it.
|
|
|
08-06-2019, 07:48 AM
|
#7
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Does this solve the issue? Needs Ultraschall-API to be installed:
Code:
function ultraschall.GetMediaExplorerHWND()
local translation=reaper.JS_Localize("Media Explorer", "common")
local auto_play=reaper.JS_Localize("Auto play", "explorer_DLG_101")
local vol=reaper.JS_Localize("vol", "explorer_DLG_101")
local navigate_backwards=reaper.JS_Localize("Navigate backwards", "access")
local count_hwnds, hwnd_array, hwnd_adresses = ultraschall.Windows_Find(translation, true)
if count_hwnds==0 then return nil
else
for i=count_hwnds, 1, -1 do
if ultraschall.HasHWNDChildWindowNames(hwnd_array[i],
auto_play.."\0"..
vol.."\0"..
navigate_backwards)==true then return hwnd_array[i] end
end
end
return nil
end
function ultraschall.UpdateMediaExplorer()
local HWND=ultraschall.GetMediaExplorerHWND()
if ultraschall.IsValidHWND(HWND)==false then ultraschall.AddErrorMessage("UpdateMediaExplorer", "", "Can't get MediaExplorer-HWND. Is it opened?", -1) return false end
return reaper.JS_Window_OnCommand(HWND, 40018)
end
Just run ultraschall.UpdateMediaExplorer() and it shows recently updated files in the Media Explorer.
Uses the refresh-action in MediaExplorer-section.
|
|
|
08-06-2019, 10:11 AM
|
#8
|
Human being with feelings
Join Date: Nov 2014
Posts: 798
|
I'll give that a go, thanks
|
|
|
09-11-2019, 08:42 AM
|
#9
|
Human being with feelings
Join Date: Nov 2014
Posts: 798
|
This script refreshes the media explorer. I would like to initiate a rescan of a particular database on startup.
|
|
|
09-11-2019, 12:44 PM
|
#10
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
How do you trigger the update by mouse currently?
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 01:53 AM.
|