View Issue Details

IDProjectCategoryView StatusLast Update
0006725MMW v4Framework: Scripts/Extensionspublic2013-07-11 02:07
Reporterzvezdan Assigned To 
PriorityhighSeverityfeatureReproducibilityN/A
Status feedbackResolutionopen 
Summary0006725: ISDBDevice::OnBeforeSync and ISDBDevice::OnAfterSync events needed
DescriptionWe need a possibility to do something programatically before and/or after synchronization with some device.
Additional InformationThere 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
TagsNo tags attached.
Fixed in build

Relationships

duplicate of 0010631 closedLudek SDBDevice: OnSynchComplete 
related to 0006708 feedbackjiri ISDBApplicationEvents::OnAfterTrackMove event needed 
related to 0010625 closedLudek SDBDevice cannot be controlled from VB/JS scripts 

Activities

jiri

2010-11-24 17:04

administrator   ~0021462

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)

zvezdan

2010-11-25 00:15

updater   ~0021466

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.

Ludek

2013-03-12 16:58

developer   ~0035348

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 [^]

zvezdan

2013-07-10 15:02

updater   ~0036792

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.

peke

2013-07-10 20:21

developer   ~0036793

@Zvezdan
Can you please elaborate difference with 0010631 and reason if both should be added

zvezdan

2013-07-10 22:36

updater   ~0036802

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.

peke

2013-07-11 02:07

developer   ~0036806

@zvezdan
I see your point. I'm asking Ludek for feedback