getmusicbee.com

General => MusicBee Wishlist => Topic started by: phred on January 08, 2022, 01:23:08 PM

Title: Clickable URLs
Post by: phred on January 08, 2022, 01:23:08 PM
Currently I put notes and other information in the comments field of many tracks. This will often include a URL to where the information came from or some other information related to the track.

The URL is displayed when viewing the comments but it is useless. I have to open the Tag Editor and copy the URL from the comments, close the Tag Editor, open a browser, and paste in the URL.

Making the URL clickable directly from the displayed comments would be great. OR make it possible to select/highlight the URL in the displayed comments so it can at least be copied directly from the comments without having to open the Tag Editor.

Thanks for considering.
Title: Re: Clickable URLs
Post by: The Incredible Boom Boom on January 08, 2022, 02:57:45 PM
Notwithstanding @hiccup's excellent workaround, this could actually be a new function for v3.5?

Code
The most awesomest music manager ever made is $URL(<Tag>,"https://getmusicbee.com","MusicBee") and best of all it's free!
The most awesomest music manager ever made is MusicBee (https://getmusicbee.com) and best of all it's free!
Title: Re: Clickable URLs
Post by: phred on January 08, 2022, 04:38:21 PM
Auto Hotkey portion of thread split to Beyond MusicBee
https://getmusicbee.com/forum/index.php?topic=36013.0
Title: Re: Clickable URLs
Post by: phred on January 08, 2022, 05:18:30 PM
Specifically I'm referring to the URL as displayed in Track Information (1 or 2) as shown. In this case, Details (2) is set to only display comments.
(http://i.imgur.com/OsB8b51l.jpg) (https://i.imgur.com/OsB8b51.jpg)
Title: Re: Clickable URLs
Post by: hiccup on January 08, 2022, 05:26:21 PM
Me repenting for derailing this wish earlier:

+2
Title: Re: Clickable URLs
Post by: phred on January 08, 2022, 06:52:49 PM
Notwithstanding @hiccup's excellent workaround, this could actually be a new function for v3.5?
What's wrong for including it in a patch release for 3.4?
Title: Re: Clickable URLs
Post by: The Incredible Boom Boom on January 08, 2022, 08:07:57 PM
What's wrong for including it in a patch release for 3.4?

Nothing.
Just assuming @Steven might be winding down cool new features for v3.4 at this point and focusing on issues.
I have nothing to base this off of, however.
Title: Re: Clickable URLs
Post by: phred on January 08, 2022, 09:10:43 PM
Ahhh .. thanks for clarifying, BB.
Title: Re: Clickable URLs
Post by: vzell on January 08, 2022, 10:34:11 PM
+1
Title: Re: Clickable URLs
Post by: Steven on January 11, 2022, 09:29:30 AM
I will look at this request.If some text starts with http:// or https:// then it could be made clickable but for multi-line text such as comments that wraps around, it would only be feasible for me to do this if a line starts with the http text ie. this wouldnt be supported
Code
xxx http://aaa.com xxx
but this would:
Code
xxx
http://aaa.com
xxx
Title: Re: Clickable URLs
Post by: phred on January 11, 2022, 01:28:25 PM
I will look at this request.
Thanks Steven.

I don't think what you're proposing would be an issue for my use case. As long as it will work with both http: and https:
Doing a random check on the links in my comments, I couldn't find one instance where there was a <space> and variable after the actual URL.

This is typical:
(http://i.imgur.com/i71jDmsl.jpg) (https://i.imgur.com/i71jDms.jpg)
Title: Re: Clickable URLs
Post by: mrbenn on January 12, 2022, 02:48:51 AM
FWIW, Bandcamp downloads consistently have a comment in the URL in the format

Code
Visit http://artistorlabel.bandcamp.com

Some artists/labels use their own custom domain but the comment format itself is the same.
Title: Re: Clickable URLs
Post by: Steven on January 12, 2022, 09:06:49 AM
Unfortunately there are some complications so I wont be able to do the request as stated. However what I have done is add a new data type: Url
So if you assign a custom tag or virtual tag the data type: Url (in the Tags(2)/ Fields Configuration dialog) then the field will be treated as a clickable link in the track info panel. Of course that wont work if the link is embedded in the middle of a comment (for example) as the entire field value is treated as the link
Title: Re: Clickable URLs
Post by: phred on January 12, 2022, 01:22:53 PM
Of course that wont work if the link is embedded in the middle of a comment (for example) as the entire field value is treated as the link
My first thought is that Advanced Search & Replace might be able to make the move. If it doesn't I can do a simple search for "http" in comments and manually move them. At this point I'd guess I have less than 100, but there are more that I'd like to add and have been holding off.

Bottom line is that this should do what I've been asking for.

Thank you.
Title: Re: Clickable URLs
Post by: hiccup on January 12, 2022, 03:41:40 PM
My first thought is that Advanced Search & Replace might be able to make the move. If it doesn't I can do a simple search for "http" in comments and manually move them.
Wouldn't a virtual tag be easier?
Could you for example give this one a test drive?:

Code
$RxMatch(<Comment>,"(^|\s)https?\:\S*|(^|\s)www\.\S*")
Title: Re: Clickable URLs
Post by: phred on January 12, 2022, 04:33:23 PM
Code
$RxMatch(<Comment>,"(^|\s)https?\:\S*|(^|\s)www\.\S*")
Seems to work nicely. There may be a few "http:\\" floating around. I changed your code to
Code
http?\:\S*|
And it didn't show anything. I tried with
Code
http*?\:\S*|
and
Code
http*?\:\S*|
and again nothing.
And it did find one that had no protocol, but simply "www.website.com" so that was a nice touch.
My thinking is that the ? after http in your original is a single character wildcard and therefore should show both "http" and "https". Is that correct? If so, and it's not turning up any "http:\\" then perhaps I have none.

Thanks for putting this together.
Title: Re: Clickable URLs
Post by: hiccup on January 12, 2022, 04:46:32 PM
The 's?' part in https? means that the letter s may or may not be present, and so both http and https will be matched.
(same as e.g. "bees?" would match both one bee and a swarm of the little f*ers)

I first looked on da webz for examples of url-finding regexes. But pretty much all of them were quite complicated, and I couldn't even get them to work.
So I built something simpler. Probably too simple ;-)

Can you post a couple of comments containing url's that fail using this formula?
Perhaps I (or somebody else more talented with regex) can create a better regex.

edit:
Having read your comment again, and now probably digesting it a bit better, I suspect that the regex/formula is actually working perfectly fine?
Title: Re: Clickable URLs
Post by: phred on January 12, 2022, 05:37:16 PM
(same as e.g. "bees?" would match both one bee and a swarm of the little f*ers)
Ah HAH!!
I have finally found a mistake you made. "bees?" would -not- match "bee" but would match "bees" and "bees" plus one other character. To match both "bee' and "bees" it should be "bee?".

I may not know RegEx, but I know my wildcards.

Quote
Having read your comment again, and now probably digesting it a bit better, I suspect that the regex/formula is actually working perfectly fine?
Yes, it's working fine. Your confusion may have come from my statement that I -think- there are some "http:\\" strings out there, but so far I haven't been able to find them. So if your RegEx isn't finding them, and I'm not finding them, then they don't exist. And to proof it to myself (and to you) I changed one instance of "https:" to "http" and it showed up.

A tip of the ol' phred hat to Mr. Hiccup.
Title: Re: Clickable URLs
Post by: hiccup on January 12, 2022, 05:42:05 PM
"bees?" would -not- match "bee"
It surely would ;-)

Quote
I may not know RegEx, but I know my wildcards.
It is kind-of-a wildcard, but a special one that only looks one step back.
(don't you have leftfield members in your family that do weird things?)
Title: Re: Clickable URLs
Post by: phred on January 12, 2022, 06:36:07 PM
"bees?" would -not- match "bee"
It surely would ;-)
I'm not convinced. My understanding in the use of the question mark as a wildcard is that where the question mark is, it will allow any one character. So in said example, "bees?" would return the first four characters (bees) plus any other -one- character in the fifth position. Whereas " bees* would return "bees", "beeshit", or "beeswax".


Quote
It is kind-of-a wildcard, but a special one that only looks one step back.
Again, I think not. Unless RegEx is different from BASIC. But lookee here:
Quote from: https://support.cleo.com/hc/en-us/articles/360027263194-Using-Wildcards-and-Regular-Expressions
Wildcards
Wildcards are represented by * or ?, where * matches multiple characters and ? matches only a single character.  For example, assume the outbox has the following files.
ab1.edi
ab2.edi
ab11.edi
ab12.edi
The following commands produce the following results.
Command Result
PUT ab*.edi Sends all four files from the outbox
PUT ab?.edi Sends only ab1.edi and ab2.edi

Quote
(don't you have leftfield members in your family that do weird things?)
I'm the only member of my family that does weird things. I'm not left-handed and I'm not out of left field.
Title: Re: Clickable URLs
Post by: hiccup on January 12, 2022, 07:15:34 PM
https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference
"? Matches the previous element zero or one time."
Also, doesn't my formula by itself prove that this is how it works?

But this has drifted off-topic:
Does my suggested virtual tag extract any url present, in all the comment fields that you have tested it on?
If not, please share an example of a specific comment where it fails, so that I (or someone else) can try to improve it.
Title: Re: Clickable URLs
Post by: phred on January 12, 2022, 08:27:52 PM
Does my suggested virtual tag extract any url present, in all the comment fields that you have tested it on?
If not, please share an example of a specific comment where it fails, so that I (or someone else) can try to improve it.
Yes, it works. I stated as such in Reply #17.
Upon further review, my understanding of ? and * as wildcards comes from DOS and BASIC. RegEx is different. Yes, I'm old.
Title: Re: Clickable URLs
Post by: Steven on January 12, 2022, 09:16:02 PM
This has the change:
https://getmusicbee.com/patches/MusicBee35_Patched.zip
unzip and replace the existing musicbee application files
Title: Re: Clickable URLs
Post by: hiccup on January 12, 2022, 09:49:36 PM
Yes, it works. I stated as such in Reply #17.
That reply mentioned 'it seems to work'.
Followed by other things you tried editing the regex.

It's probably me (sometimes being a bit too Aspergic about words) but I didn't read that as a definite confirmation that the regex/formula is functioning to complete satisfaction.
But I now guess the conclusion is that it does? Which frees up the assigned brain cells to other tasks. (such as dreaming sweat dreams)
Title: Re: Clickable URLs
Post by: phred on January 12, 2022, 10:26:26 PM
This has the change:
https://getmusicbee.com/patches/MusicBee35_Patched.zip
Thanks Steven. It works great and is a real time-saver.

Onward and upward to 3.5!
Title: Re: Clickable URLs
Post by: phred on January 14, 2022, 03:23:18 AM
Using 3.5.8048 P

I set up a custom tab and named it "Link" and set it to new URL type.

When I do a custom search and set the first field to "Link" the second criteria field has nothing in its dropdown. At the very least I was expecting "has a value" or "has no value" but it would be nice if all the options available for the other first field tags were available here. This feels more like an oversight than a bug, which is why I've added it to this thread.
(http://i.imgur.com/WSDb8NFl.jpg) (https://i.imgur.com/WSDb8NF.jpg)
Title: Re: Clickable URLs
Post by: Steven on January 14, 2022, 11:27:22 PM
thats fixed now:
https://getmusicbee.com/patches/MusicBee35_Patched.zip
Title: Re: Clickable URLs
Post by: phred on January 15, 2022, 01:25:29 AM
thats fixed now:
https://getmusicbee.com/patches/MusicBee35_Patched.zip
Thanks for the quick fix.
Title: Re: Clickable URLs
Post by: Nighthawk_NL on January 17, 2022, 04:08:47 PM
Great, when this is possible can anyone explain to me how I can add a clickable link so I can also choose a YouTube video instead of the local MP3 file.
Title: Re: Clickable URLs
Post by: phred on January 17, 2022, 04:25:47 PM
It's available in the latest 3.5 patch. See my signature for link and instructions.

- Preferences > Tags (1) > custom tags > name the tag (I used "Link") and save it as a tag you're not, and will not, be using for anything else. This keeps the tag embedded in the music file and not in MB's database.

- Preferences > Tags (2) > tag handling > fields: configure fields > find your newly created custom tag > set the type to "URL." Note that you will not find the newly created tag in alphabetical order. It will be under CustomX, where X is the number of the custom tag.

- Select the file(s) where you want to have the link appear > Tag Editor > Tags (2) > find the custom tag you created in step 1 > enter the link

- Make sure you have the Track Information panel showing in your layout > click on the header where it says "Details" > Customize Panel > in the fields section add the custom tag you created in step 1 > save

You're all set.
Title: Re: Clickable URLs
Post by: Nighthawk_NL on January 17, 2022, 04:37:45 PM
Many thanks phred
Title: Re: Clickable URLs
Post by: Nighthawk_NL on January 17, 2022, 05:20:43 PM
Hi phred,

I have followed your guide and everything is set up but the link is not clickable in the way that I can directly open the youtube link for instance. I can cut and paste the link of course but that is not what I meant. Please see below what I mean:

I have entered the link of Queen - Bohemian Rhapsody in MusicBee.

https://www.hitnoteringen.nl/hitlijsten/radio-10-top-4000/2021

If would be very nice if the new link field could just show a youtube play icon for instance so you can directly see that the MP3 file has also has a videolink attached and when you click on it it automatically opens youtube.

Looking forward on your thoughts about this.

Thanks Nighthawk_NL
Title: Re: Clickable URLs
Post by: phred on January 17, 2022, 08:15:10 PM
If would be very nice if the new link field could just show a youtube play icon for instance so you can directly see that the MP3 file has also has a videolink attached and when you click on it it automatically opens youtube.
That's not the way it works. You need to have the link displayed in a custom tag so that it becomes clickable. It doesn't show any icons.

(http://i.imgur.com/XyiJpddl.jpg) (https://i.imgur.com/XyiJpdd.jpg)

(http://i.imgur.com/JBoDYLUl.jpg) (https://i.imgur.com/JBoDYLU.jpg)

(http://i.imgur.com/VZNaHCUl.jpg) (https://i.imgur.com/VZNaHCU.jpg)
Title: Re: Clickable URLs
Post by: Steven on January 17, 2022, 10:17:51 PM
did you set the data type for the field to Url in Tags(2)/ Fields Configuration ?
Title: Re: Clickable URLs
Post by: phred on January 17, 2022, 11:01:18 PM
did you set the data type for the field to Url in Tags(2)/ Fields Configuration ?
Thanks for catching that, Steven. I've updated my instructions.
Title: Re: Clickable URLs
Post by: phred on January 21, 2022, 11:00:06 PM
If I were to send one of my tracks which has a clickable link tag (embedded) to someone who uses MB, but hasn't set up the custom tab, what would they see?

Obviously if I sent it to someone who doesn't use MB they wouldn't see the link at all, correct?
Title: Re: Clickable URLs
Post by: Steven on January 22, 2022, 03:05:03 AM
they can see it in the tag inspector, any mp3 tagging tool or as a tag if they have a custom tag defined with the same name you are using
Title: Re: Clickable URLs
Post by: phred on January 22, 2022, 03:31:17 AM
they can see it in the tag inspector, any mp3 tagging tool or as a tag if they have a custom tag defined with the same name you are using
Thanks Steven.
Title: Re: Clickable URLs
Post by: Nighthawk_NL on February 06, 2022, 03:36:16 PM
Hi phred, thanks again for all your help and insights but whatever I do I still can't find a clickable link in MusicBee. Obviously I have missed something but I really don't know what to do to see the clickable link.
Title: Re: Clickable URLs
Post by: phred on February 06, 2022, 04:07:43 PM
Post screenshots of the following making sure to include the new tag in the screenshot:
- Your custom tags configuration from Preferences > Tags1
- Your configure fields configuration from Preferences > Tags2 > fields
- The Tags (2) screen from the tag editor
- The configuration of your track information/details panel

What is the name of your custom tag?