View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006725 | MMW v4 | Framework: Scripts/Extensions | public | 2010-11-22 12:06 | 2013-07-11 02:07 |
Reporter | zvezdan | Assigned To | |||
Priority | high | Severity | feature | Reproducibility | N/A |
Status | feedback | Resolution | open | ||
Summary | 0006725: ISDBDevice::OnBeforeSync and ISDBDevice::OnAfterSync events needed | ||||
Description | We need a possibility to do something programatically before and/or after synchronization with some device. | ||||
Additional Information | There are many requests for such events, for example: http://www.mediamonkey.com/forum/viewtopic.php?f=19&t=44868 http://www.mediamonkey.com/forum/viewtopic.php?f=2&t=33630 http://www.mediamonkey.com/forum/viewtopic.php?f=2&t=33067 http://mediamonkey.com/forum/viewtopic.php?f=4&t=33072 http://www.mediamonkey.com/forum/viewtopic.php?p=176545#p176545 http://www.mediamonkey.com/forum/viewtopic.php?p=162318#p162318 http://www.mediamonkey.com/forum/viewtopic.php?f=12&t=31190 http://www.mediamonkey.com/forum/viewtopic.php?f=2&t=12455 http://www.mediamonkey.com/forum/viewtopic.php?f=2&t=9843 | ||||
Tags | No tags attached. | ||||
Fixed in build | |||||
|
These events could have parameters: 1. Drive letter (if any for the device). 2. Device ID from MM database (just in case some more DB queries are needed) |
|
I am not sure what we could do with Device ID, but I think that the suggested events should have at least two SDBSongData or SDBSongList parameters as well - one for input song(s) and another for output song(s), so that we could do tags modifications on the fly. The output song(s) parameter should be input/output, i.e. read/write - on the enter of the event handler it should contain modifications of the tags planned by MM (e.g. if Use only the first Genre option is checked), and on the output it could also contain modifications made by script (e.g. to assign Album Artist to Artist tag as some users requested). If you add those two parameters, then we don't need Drive letter as parameter since it would be included in the output SDBSongData (SDBSongList) parameter inside of its Path property. |
|
Added: SDBApplicationEvents::OnDeviceSyncStart( DeviceHandle As Long) SDBApplicationEvents::OnDeviceSyncCompleted( DeviceHandle As Long) http://www.mediamonkey.com/wiki/index.php/SDBApplication [^] http://www.mediamonkey.com/wiki/index.php/ISDBApplicationEvents::OnDeviceSyncStarted [^] http://www.mediamonkey.com/wiki/index.php/ISDBApplicationEvents::OnDeviceSyncCompleted [^] |
|
I don't understand how this issue is duplicate of [10631] when my request is completely different. I am sorry for my ignorance, but could you tell me how could I use your new events and its device handle to get the list of songs that would be synchronized and to be able to do some modification of their tags before (or after) the actual synchronization? I see that you added GetDeviceContent property, but the description says "Returns the list of tracks on the device as SDBSongList object". You see, I don't want to get the list of all tracks on some device, but only the list of (to be) synchronized tracks. Also, I am just curious, what would happen if I change tags for some or all tracks from that list in the OnDeviceSyncStarted event handler? I am sorry, maybe your new events already could be used for my purposes, but your description is very scarce without any example. |
|
@Zvezdan Can you please elaborate difference with 0010631 and reason if both should be added |
|
I don't know how I could make it clearer than I already wrote. Why don't you try to answer to my questions instead? Well, here is simple a answer, your suggestion and those new added events returns DeviceHandler object. My reuest was to add events that would have two SongList object as arguments instead, one for input and one for output in a similar way as we have OnBeforeTracksMove event (http://www.mediamonkey.com/wiki/index.php/ISDBApplicationEvents::OnBeforeTracksMove). In that way a script could be able to modify tags in synchronized tracks before or after they are actually synchronized. As I said, I don't have any idea how I could do that with DeviceHandle and its GetDeviceContent property, especially since your description of those events is very short. |
|
@zvezdan I see your point. I'm asking Ludek for feedback |