Author Topic: Additional Tagging & Reporting Tools  (Read 1199956 times)

Messiaen

  • Jr. Member
  • **
  • Posts: 114
Just for the record, I begrudgingly "thank you" for deprecating my own carefully crafted <TimeToSeconds> and <DurationFromSeconds> routines:

Code
$If($Len(<Time>)>5,$Add($Mul($Split(<Time>,:,1),3600),$Add($Mul($Split(<Time>,:,2),60),$Split(<Time>,:,3))),$Add($Mul($Split(<Time>,:,1),60),$Split(<Time>,:,2)))

Code
$If(<h.Work Duration><3600,$RxMatch($Div(<h.Work Duration>,60),"\d+"):$Pad($Mod(<h.Work Duration>,60),2),$RxMatch($Div(<h.Work Duration>,3600),"\d+"):$Pad($RxMatch($Div($Mod(<h.Work Duration>,3600),60),"\d+"),2):$Pad($Mod($Mod(<h.Work Duration>,3600),60),2))

They served me well.  I hate progress.  :)

boroda

  • Hero Member
  • *****
  • Posts: 5307
actually, i wasn't going to support "full" durations, i was just expecting it should work "automatically". it doesn't.

boroda

  • Hero Member
  • *****
  • Posts: 5307
@Messiaen, using c# for custom function is much simpler than "constructing" complicated VT expressions  8)

Messiaen

  • Jr. Member
  • **
  • Posts: 114
Yeah, I know, but my functions served me well for years, you know how it is... why rewrite trusty old code?  Besides, I'm an old C programmer (not C++), so I have an affinity for punishing myself with "strings" and doing things the hard way.  I never quite adapted to the java-ness of C#... never trust something that takes care of the dirty-stuff by itself.  ;)

Messiaen

  • Jr. Member
  • **
  • Posts: 114
$DurationFromSeconds(seconds): should return minimal string representation of duration...
Given that you say "minimal", and both the stock MB columns <Time> and <Album Duration> conveniently do not show a leading '0' for hours < 10 or minutes < 10 (where there are no hours), shouldn't $DurationFromSeconds behave the same?  I'm assuming it's meant to be essentially a display result rather than a computational result, so it would be consistent, no?

It's obviously not difficult to just do a $CutLeft if the leading char is a '0', but in the interests of brevity...
Last Edit: June 16, 2024, 11:33:34 AM by Messiaen

hiccup

  • Hero Member
  • *****
  • Posts: 9166
$SentenceCase(string,sentence_separator) has only 2 parameters (i think all other parameters are senseless for it). i'check why simplest syntax (using only 1st parameter doesn't work for $TitleCase and $SentenceCase)

1.
I think it would be useful if there was an additional parameter where you can define a list of words (usually abbreviations) that should be in capitals.
(for things like BBC NYC USA III IV etc.)
Both $SentenceCase and $TitleCase should then have this.

2.
And a question about the possible variations of constructions:
Am I correct to understand that these would all be viable constructions:

$TitleCase(<Title>,param1,param2,param3,param4)
$TitleCase(<Title>,param1,param2)
$TitleCase(<Title>,param1,',param3,param4)
$TitleCase(<Title>,',',',',param5)

3.
Earlier I reported that the most basic variations: $SentenceCase(<Title>) and $TitleCase(<Title>) threw an exception.
It's working now, so there was probably something wrong on my side of things. Sorry for that.

4.
For anyone interested in testing this stuff, here's a silly title I currently use for testing that (I think) covers most challenges:

Code
adventures in the south of l.a.: the fight - a cat vs. the bee (guitar solo) {afx remix}
(I'm probably going to use this title as an example in the functions cheat sheet too, so please let me know if it's missing some specific 'challenge')
Last Edit: June 16, 2024, 10:07:08 PM by hiccup

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10283
I think it would be useful if there was an additional parameter where you can define a list of words (usually abbreviations) that should be in capitals.
(for things like BBC NYC USA III IV etc.)
Both $SentenceCase and $TitleCase should then have this.
+1
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

Dizza17

  • Full Member
  • ***
  • Posts: 192
    @Boorda,

I've come to realise the ASR window can only be resized to a certain smaller size. I'm not sure if its because im using a 15 inch laptop that causes this but the resulting small issue is i have to delicately resize the ASR window and move it to the right just enough to enable me to view the progress bar which displays the percentage complete of the current ASR task. My question, is it an error on my behalf in regards to scaling? and/or is there anyway the progress status of the ASR able to be displayed at the bottom of the actual ASR window? im aware that you can just click the 'hide" button, but during most ASR tasks i prefer to have the window open.

finally, this very small inconvenience is probably only affecting me and is probably my doing. but i've attached a screenshot as food for thought.
regards Aaron
https://imgur.com/a/edaPOFg
When the rich wage war, it’s the poor who suffer.

jan_axhell

  • Jr. Member
  • **
  • Posts: 71
Hello, I have an Out of Memory error using this plugin. I've seen on older comments that it was probably solved older versions of MB, but I'm using the latest beta of 3.6.8909 and the latest plugin build (re-downloaded today to be 100% sure).

I'm trying to export a Library Report to CSV to be used with this tool https://github.com/rombat/musicbee-navidrome-sync
The problem is that each time I launch a Preview scan, it crashes around 35%-37%.

I take note of the album on which it crashed, I check it with MP3Tag, there is never any sort of problem with track corruption or weird name encoding.
I retag it to change its CRC adding a note or changing cover size, and the next time Preview has no problem with that album, but crashes on another after that.
My PC has 32Gb of RAM and while I'm using MB, the whole RAM usage of OS and processes is around 33%, very far from Out of Memory.
MB itself peaks at about 1.2 Gb while scanning.
The library is on a samba share mapped as Windows letter.
So, since the albums seem to have no problem, but Preview scan crashes anyway, what can I do or check?

Code
MusicBee v3.6.8909.34028D  (Win10.0), 3 lug 2024 14:08:

System.OutOfMemoryException: Generata eccezione di tipo 'System.OutOfMemoryException'.
   in System.String.Join(String separator, String[] value, Int32 startIndex, Int32 count)
   in System.String.Join(String separator, String[] value)
   in MusicBeePlugin.LibraryReportsCommand.AggregatedTags.add(String url, String[] groupingValues, String[] functionValues, List`1 functionTypes, String[] parameter2Values, Boolean totals)
   in MusicBeePlugin.LibraryReportsCommand.previewTrackList()
   in MusicBeePlugin.PluginWindowTemplate.serializedOperation()
   in System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   in System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   in System.Threading.ThreadHelper.ThreadStart()

EDIT No, it's random. I've repeated the process and it crashed at 28% on albums that previously scanned with no problem. So the albums are not the problem.
Last Edit: July 03, 2024, 03:54:09 PM by jan_axhell

Dizza17

  • Full Member
  • ***
  • Posts: 192
@Jan_Axhell,
Are you trying to export your album art as well? If you don’t actually need to export your album art then try excluding it. May or may not help but I know from previous posts that any type of export with artwork adds quite a lot of complexity to it. Just a suggestion.
Cheers Aaron
When the rich wage war, it’s the poor who suffer.

jan_axhell

  • Jr. Member
  • **
  • Posts: 71
@Dizza17
I already tried to do that excluding album art, BUT after reading your comment I double-checked I realized I was still using an old version on the plugin, because when I installed the newer one, it went to
Code
c:\users\user\appdata\roaming\musicbee\plugins
. But I noticed that inside
Code
c:\program files (x86)\musicbee\plugins
the older version was still there. So I have manually overwritten it with the newer one, but now the UI is different and I don't know how to add the tags I want to the preset.



In the previous version there was a column with all the tags on the left, now only some tags appear horizontally depending on the preset I choose, but if I create a new one, I can't add any tags, I don't see any button to do that.
EDIT
I haven't used this plugin in years, so I can't remember if thickable tag column on the left existed by default, or I did something to make it appear. I have imported all presets from Advanced Search & Replace, but this showed no effect in Library Reports. I see an old ASR Presets folder full of files named like !{0a2ed6be-cb8d-452e-9f59-a48d5959da1c}.asr-preset, but the one I imported from has "clear" names like Example - Set creation date-time of music file to date-time, when track has been added to library.asr-preset.
I'm reading Library Reports section in ADDITIONALTAGGINGREPORTING.md on github, but I don't understand how to export all or some tags to a CSV, the option is not there anymore.

EDIT2
There is a graphic glitch that makes Add and Save buttons invisible. They do work if clicked, nevertheless the plugin crashes during Preview scan.



Last Edit: July 04, 2024, 03:57:47 PM by jan_axhell

Dizza17

  • Full Member
  • ***
  • Posts: 192
@Jan_Axhell,
You can add/configure the tags you want to add via the column definition tab next to the preview tab. Here you have a few options as to how you want each tag field to look on the report.
When the rich wage war, it’s the poor who suffer.

jan_axhell

  • Jr. Member
  • **
  • Posts: 71
@Jan_Axhell,
You can add/configure the tags you want to add via the column definition tab next to the preview tab. Here you have a few options as to how you want each tag field to look on the report.

Yes, but as you can see it crashes some time after starting Preview scan.

EDIT Realized it did crash for the 1.3 Gb RAM limit of Musicbee, applied the patch to extend to 4Gb and it barely made it (which means that repeating the same action sometimes blew MB to >4Gb and crash, sometimes <4Gb with no issue.
Last Edit: July 21, 2024, 04:25:00 PM by jan_axhell

Dizza17

  • Full Member
  • ***
  • Posts: 192
Hi  boroda,

Just wondering if there was a way to adapt the ASR preset  'sort performers by there roles' so it could be used to sort the 'involved people list' by there roles? I've had a play around with a copy of the preset but am yet to achieve any useable results.
As always any help/guidance is greatly appreciated.

regards
Aaron
When the rich wage war, it’s the poor who suffer.

boroda

  • Hero Member
  • *****
  • Posts: 5307
$SentenceCase(string,sentence_separator) has only 2 parameters (i think all other parameters are senseless for it). i'check why simplest syntax (using only 1st parameter doesn't work for $TitleCase and $SentenceCase)

1.
I think it would be useful if there was an additional parameter where you can define a list of words (usually abbreviations) that should be in capitals.
(for things like BBC NYC USA III IV etc.)
Both $SentenceCase and $TitleCase should then have this.

2.
And a question about the possible variations of constructions:
Am I correct to understand that these would all be viable constructions:

$TitleCase(<Title>,param1,param2,param3,param4)
$TitleCase(<Title>,param1,param2)
$TitleCase(<Title>,param1,',param3,param4)
$TitleCase(<Title>,',',',',param5)

3.
Earlier I reported that the most basic variations: $SentenceCase(<Title>) and $TitleCase(<Title>) threw an exception.
It's working now, so there was probably something wrong on my side of things. Sorry for that.
...

1. it's interesting. i think i'll do this.
2. yes, you are right.
3. yes, i'm not able to reproduce this issue.