freedbSubmitter 2.6 [Updated 2021/07/06]

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Tippon
Posts: 32
Joined: Fri Nov 03, 2017 7:02 pm

Re: freedbSubmitter 2.5 [Updated 2021/01/25]

Post by Tippon »

gbilley wrote: Tue Jun 29, 2021 11:18 am OMG, I think I committed the worst rookie coding mistake in the book! And once again, it was your latest screen shot that showed me the errors of my ways.

My error was assuming (or worse, not even considering) that everyone uses a one-word Windows user name (which just shows you how old-school I am).
I can guarantee that it's not as bad as the mistakes I've been making recently :oops: :D

I know what you mean about the usernames though. I never used my real name, let alone my full name, everything was Tippon. It's only since Windows 10 linked the licensing to Microsoft accounts that it changed. I didn't even realise until after setup finished and I hadn't put in a username.
gbilley wrote: Tue Jun 29, 2021 11:18 am If my realization is correct, using the following script in freedbSubmitter.vbs should fix the problem:

Code: Select all

Sub launchSubmitter
	Dim objShell, htaPath, cmd
	htaPath = "freedbSubmitter\freedbSubmitter.hta"
	Set objShell = CreateObject("WScript.Shell")
	cmd = """" & SDB.ScriptsPath & htaPath & """"
	objShell.Run cmd, 1, False
	Set objShell = Nothing
End Sub
If this fix works, my apologies to you and all the others who've wasted time on my faulty scripts. But my thanks and appreciation to you for sticking things out and helping me find a solution.

If the above fix doesn't work, then I'm totally befuddled.
Just to confirm, the new code replaces this bit, yeah?

Code: Select all

Sub launchSubmitter
	Dim objShell, htaPath
	htaPath = "freedbSubmitter\freedbSubmitter.hta"
	Set objShell = CreateObject("WScript.Shell")
	objShell.Run SDB.ScriptsPath & htaPath, 1, False
	Set objShell = Nothing
End Sub
gbilley
Posts: 32
Joined: Tue Aug 02, 2016 9:13 am
Location: United States

Re: freedbSubmitter 2.5 [Updated 2021/01/25]

Post by gbilley »

Quite correct.

I should have said to replace just the Sub launchSubmitter subroutine in freedbSubmitter.vbs with the revised code. The rest of the .vbs file remains the same.

Thanks.
Tippon
Posts: 32
Joined: Fri Nov 03, 2017 7:02 pm

Re: freedbSubmitter 2.5 [Updated 2021/01/25]

Post by Tippon »

We're definitely getting there!

I updated the vbs file and saved, then restarted MMW. I followed your guide to make sure I was doing everything correctly:
gbilley wrote: Sat Jun 26, 2021 11:21 am At this point, to submit the CD, you'd need to put the CD back in the drive; download track data from MusicBrainz; edit any data that needs fixing or enhancing; save the CD to the MM library (press the Insert key); then run freedbSubmitter (making sure the selected node is "CD:Pilgrim - Pilgrim").
and the freedbSubmitter window opened. It's identified the disc, and querying returns the expected error that the disc was not found. I selected the category, rock, and that's where it stops. Clicking either Preview Submission or Submit gives a script error.

Code: Select all

An error has occurred in the script on this page.
Line: 655
Char: 3
Error: Type mismatch: '[string: "<p><a href='#' oncli"]'
Code: 0
URL: file:///C:/Users?Ryan%20Davies/AppData/Roaming/MediaMonkey/Scripts/freedbSubmitter/freedbSubmitter.hta
Do you want to continue running scripts on this page?
Clicking yes or no makes no difference. The error message closes and nothing seems to happen.

I tried another CD, a commercial CD that should be in the database, and it worked. I used the 1996 compilation album, Go Ahead Punk, Make My Day. It's got two entries, and one of them is completely capitalised, with the year added to the album name. I corrected the capitalisation and album name, then went through the steps to submit the corrections. The preview and submission worked perfectly.

I've uploaded the screenshots here:

https://imgur.com/a/biidMcV
gbilley
Posts: 32
Joined: Tue Aug 02, 2016 9:13 am
Location: United States

Re: freedbSubmitter 2.5 [Updated 2021/01/25]

Post by gbilley »

Thanks so much for leading me to a solution for the username-with-spaces issue. I'll get new and improved versions of freedbSubmitter, MonkeyBrainz, and DiscogsCSV online as soon as I can. But first, on to my next bone-head scripting error.

I think the solution will be to change line 655 to:

Code: Select all

temp = temp & "<p><a href='#' onclick='searchDiscid(" & category & "/" & discid & ")' hidefocus>View Details</a></p>"
The faulty code checks for disc collisions and is left over from the syntax used by the freedb.org website. When I switched to gnudb.org, I fixed the event handler, but not line 655 which calls the event handler. Part of the reason is because it's hard for me to check disc collisions.

Be that as it may, is the Pilgrim CD a commercial disc, or has it been burned? If it's the latter, you may not want to submit that disc. Most music databases discourage or prohibit submitting burned CDs. You could submit it to MusicBrainz as a digital music release. After I fix the username bug in MonkeyBrainz, it should work for you.

FYI, I checked the Pilgrim discid in gnudb.org. It collides with an EP by a group called Pantera called Mouth of War. If you do submit it, you'll need to give it another freedb category (but you can leave the MM genre as Rock).

Thanks again for helping me track down my scripting bugs.
Tippon
Posts: 32
Joined: Fri Nov 03, 2017 7:02 pm

Re: freedbSubmitter 2.5 [Updated 2021/01/25]

Post by Tippon »

gbilley wrote: Sun Jul 04, 2021 11:21 am Thanks so much for leading me to a solution for the username-with-spaces issue. I'll get new and improved versions of freedbSubmitter, MonkeyBrainz, and DiscogsCSV online as soon as I can. But first, on to my next bone-head scripting error.

I think the solution will be to change line 655 to:

Code: Select all

temp = temp & "<p><a href='#' onclick='searchDiscid(" & category & "/" & discid & ")' hidefocus>View Details</a></p>"
The faulty code checks for disc collisions and is left over from the syntax used by the freedb.org website. When I switched to gnudb.org, I fixed the event handler, but not line 655 which calls the event handler. Part of the reason is because it's hard for me to check disc collisions.
It's working :)

I changed the code and launched MMW, and went through the steps to submit a CD. Everything worked as it should, and I had the option to submit the three discs I tried.

gbilley wrote: Sun Jul 04, 2021 11:21 am Be that as it may, is the Pilgrim CD a commercial disc, or has it been burned? If it's the latter, you may not want to submit that disc. Most music databases discourage or prohibit submitting burned CDs. You could submit it to MusicBrainz as a digital music release. After I fix the username bug in MonkeyBrainz, it should work for you.

FYI, I checked the Pilgrim discid in gnudb.org. It collides with an EP by a group called Pantera called Mouth of War. If you do submit it, you'll need to give it another freedb category (but you can leave the MM genre as Rock).
It's a professionally produced disc from an unsigned band, as is one of the others I tried. The main reason that I want to add discs is to put albums like these on, but I'm going to have to look into it more.

Both had conflicts, so I didn't submit them just in case. I tried the corrected version of Go Ahead Punk ...Make My Day, and was given the choice of the correct version or the incorrect version, so I selected the incorrect version and uploaded the changes. I've just checked, and the changes are showing on the site.

gbilley wrote: Sun Jul 04, 2021 11:21 am Thanks again for helping me track down my scripting bugs.
No problem :)

I'm just starting to learn Python and JavaScript, and I've needed plenty of help already, so it's nice to be able to help in some way, even if it's just going 'nah, that didn't work!' :D
gbilley
Posts: 32
Joined: Tue Aug 02, 2016 9:13 am
Location: United States

Re: freedbSubmitter 2.5 [Updated 2021/01/25]

Post by gbilley »

You helped a lot more than just saying 'nah, that didn't work!' The "missing file" bug was reported three years ago, but I never got enough information about the user's environment to discover what my mistake was. Your patience with the debugging process was essential to getting the problem solved. Same with the id collision bug. I truly appreciate your assistance.

Best of luck with your Python and JavaScript studies. Soon you'll be able to write your own MM5 addons!
Post Reply