How can i get the selected songs through api ?
Using the well-known SDB.SelectedSongList return no result
HowTo get selected songs
Moderators: jiri, drakinite, Addon Administrators
-
- Posts: 934
- Joined: Sat Jan 26, 2013 6:00 am
- Location: Friedberg / Hessen / Germany
- Contact:
HowTo get selected songs
Metal up your ass !
-----------------------------------------------
I added my first 2 videos on youtube. The language is german.
Discogs Autorisierung: https://www.youtube.com/watch?v=oryxKKtnEnc
Discogs Tagger Bedienung: https://www.youtube.com/watch?v=85Wk-5rd-W0
-----------------------------------------------
I added my first 2 videos on youtube. The language is german.
Discogs Autorisierung: https://www.youtube.com/watch?v=oryxKKtnEnc
Discogs Tagger Bedienung: https://www.youtube.com/watch?v=85Wk-5rd-W0
Re: HowTo get selected songs
Code: Select all
var tracklist = uitools.getSelectedTracklist();
How to make a debuglog - step 4b: viewtopic.php?f=30&t=86643
Re: HowTo get selected songs
An example can be found in the SampleScript "fixTrailingThe", local.js, line 234, that also Show how to handle the Situation, if nothing was selected
Regards,
Dieter
Code: Select all
trackList = uitools.getSelectedTracklist()
if (!trackList || trackList.count == 0) {
trackList = uitools.getTracklist()
}
if (!trackList || trackList.count == 0) {
res = messageDlg("Select tracks to be updated", 'Error', ["btnOK"], {}, function(){})
return
}
Dieter
-
- Posts: 934
- Joined: Sat Jan 26, 2013 6:00 am
- Location: Friedberg / Hessen / Germany
- Contact:
Re: HowTo get selected songs
Thank you for your answers.
Is it possible with the COM interface, too?
Is it possible with the COM interface, too?
Metal up your ass !
-----------------------------------------------
I added my first 2 videos on youtube. The language is german.
Discogs Autorisierung: https://www.youtube.com/watch?v=oryxKKtnEnc
Discogs Tagger Bedienung: https://www.youtube.com/watch?v=85Wk-5rd-W0
-----------------------------------------------
I added my first 2 videos on youtube. The language is german.
Discogs Autorisierung: https://www.youtube.com/watch?v=oryxKKtnEnc
Discogs Tagger Bedienung: https://www.youtube.com/watch?v=85Wk-5rd-W0
Re: HowTo get selected songs
From COM interface you can get the tracks as JSON string using asJSON property (will be introduced in next build):
Code: Select all
tracks = SDB.runJSCode('function(){ var list = uitools.getSelectedTracklist(); if(!list || !list.count) list = uitools.getTracklist(); if(list) return list.asJSON; return ''; }();')
How to make a debuglog - step 4b: viewtopic.php?f=30&t=86643
-
- Posts: 934
- Joined: Sat Jan 26, 2013 6:00 am
- Location: Friedberg / Hessen / Germany
- Contact:
Re: HowTo get selected songs
I try to convert the Discogs Tagger using Autoit3 scripting language - the script interact with MM using the COM interface. Works perfect with MM4. To get the script working with MM5 i need a COM interface as in MM4. This script is already finished.
Using the following code didn't return a object, so i would have to change the whole script.
I try to convert the script using the VBS2JS converter, too... But i don't know, if i can get it work sometime.
Using the following code didn't return a object, so i would have to change the whole script.
Code: Select all
tracks = SDB.runJSCode('function(){ var list = uitools.getSelectedTracklist(); if(!list || !list.count) list = uitools.getTracklist(); if(list) return list.asJSON; return ''; }();')
I try to convert the script using the VBS2JS converter, too... But i don't know, if i can get it work sometime.
Metal up your ass !
-----------------------------------------------
I added my first 2 videos on youtube. The language is german.
Discogs Autorisierung: https://www.youtube.com/watch?v=oryxKKtnEnc
Discogs Tagger Bedienung: https://www.youtube.com/watch?v=85Wk-5rd-W0
-----------------------------------------------
I added my first 2 videos on youtube. The language is german.
Discogs Autorisierung: https://www.youtube.com/watch?v=oryxKKtnEnc
Discogs Tagger Bedienung: https://www.youtube.com/watch?v=85Wk-5rd-W0
Re: HowTo get selected songs
Re: Discogs Tagger
You might want to look at [MM5 install folder]/SampleScripts/customWebTagger.mmip (after install the sources will be in [MM5 install folder]/Scripts/customWebTagger/)
You might want to look at [MM5 install folder]/SampleScripts/customWebTagger.mmip (after install the sources will be in [MM5 install folder]/Scripts/customWebTagger/)
Re: HowTo get selected songs
As i wrote, asJSON property will be introduced in next release.
How to make a debuglog - step 4b: viewtopic.php?f=30&t=86643