Duplicate content fixer

To discuss development of addons / skins / customization of MediaMonkey v5 / v2024

Moderators: jiri, drakinite, Addon Administrators

whipdancer
Posts: 11
Joined: Fri Sep 15, 2006 10:13 am

Duplicate content fixer

Post by whipdancer »

I would like to create an add-on to consolidate tracks found in the Files to Edit \ Duplicate Content list. I don't see a specific dialog for it or Files to Edit.

Can anyone point me to instructions/overview on figuring out how to determine when I'm looking at that list?

Also, according to the Wiki, I can enable developer mode under Help > About. I can't find anything there that allows me to enable developer mode. Am I missing something?

I appreciate any guidance.
Whip - MM user since 2006
Peke
Posts: 17899
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Duplicate content fixer

Post by Peke »

Hi,
Use latest debug build from https://www.mediamonkey.com/forum/viewt ... 86639&sd=d

and Image should contain Developer mode.

Then you can easily use Chrome Developer console to temper with MM
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
whipdancer
Posts: 11
Joined: Fri Sep 15, 2006 10:13 am

Re: Duplicate content fixer

Post by whipdancer »

Thank you. That's quite helpful.
Whip - MM user since 2006
whipdancer
Posts: 11
Joined: Fri Sep 15, 2006 10:13 am

Re: Duplicate content fixer

Post by whipdancer »

I've been going through the debug logs for MM5, trying to pick up on how to identify the "Files to Edit>Duplicate Content" node.

I ran across this in the debug log file:

Code: Select all

TreeView.setNodePath FROM root/collection:-1/filestoedit:-1/files_to_edit_duplicate_content:duplicate_content-1 TO root/collection:-1/filestoedit:-1/files_to_edit_duplicate_content:duplicate_content-1

Code: Select all

00024102	163.40045166	[20212] MM5 [27388](R) getNodeHandlerState(NODE_HANDLERS_STATE_COLLECTION_-1|files_to_edit_duplicate_content): {"viewAsId":"contentGroupedTracklist","baseViewType":"list"}
I've found where is performing the query to match songs.

I can't figure out how I would identify when it has the main view - assuming that's the best approach. Basically, I want to add a "Consolidate" button to the groupedListView when it is the Duplicate content view.

Unless there's a more reasonable way to approach the problem?

Thanks,
Whip
Whip - MM user since 2006
Ludek
Posts: 5028
Joined: Fri Mar 09, 2007 9:00 am

Re: Duplicate content fixer

Post by Ludek »

The best way for your script is to modify the nodeHandler for the node in question,
e.g.

Code: Select all

nodeHandlers.files_to_edit_duplicate_content = inheritNodeHandler('FilesToEditDuplicateContent', 'FilesToEditDefault', {
    tooltip: _('This node finds all content for which tracks have duplicate hashes or fingerprints.'),
    customizable: false,
    collapseSupport: false,
    viewAs: ['contentGroupedTracklist'],
    defaultColumnSort: 'none', // to respect order served by content
});
change to

Code: Select all

nodeHandlers.files_to_edit_duplicate_content = inheritNodeHandler('FilesToEditDuplicateContent', 'FilesToEditDefault', {
    tooltip: _('This node finds all content for which tracks have duplicate hashes or fingerprints.'),
    customizable: false,
    collapseSupport: false,
    viewAs: ['myContentGroupedTracklist'],
    defaultColumnSort: 'none', // to respect order served by content
});
And then you can (re)define /controls/myContentGroupedTracklist.js with ancestor of contentGroupedTracklist
whipdancer
Posts: 11
Joined: Fri Sep 15, 2006 10:13 am

Re: Duplicate content fixer

Post by whipdancer »

Awesome, thanks for the info.
Whip - MM user since 2006
Post Reply