Xmp-justlog plugin

Started by sveakul,

sveakul

@Keltic Danor:  I started its own thread like you suggested  ;) .  Thanks for 1.1, which now appends as expected.  I use this plugin to keep track of Internet radio stream songs;  now when I hear something memorable to follow up on, I don't have to grab a notepad or trust my memory, the song will be logged.  I changed the logging format to reflect my own usage/preferences:

%y-%m-%d %h:%i:%s  %1%t%2
This produces log entries like the following:

2021-07-06 16:47:38  Saje - Lost Tonight   -
2021-07-06 16:48:05  Cathedral XIII   -
2021-07-06 16:48:06  Still Patient ? - Angeli   -
2021-07-06 16:48:13  Decennial Gothica Radio   -
2021-07-06 16:48:14  Canterra - A Lifetime   -
2021-07-06 16:49:59  Infy Snow - Sojourn at the Astrals   -
2021-07-06 16:52:37  Gothique13   -
2021-07-06 16:52:37  Draconian - Seasons Apart   -

One thing I find odd is that though the format code shows track title (%1) preceding artist (%2), the results get logged as artist preceding track title--which is actually what I wanted anyway, but for the heckuvit what is your take on that?

Keltic Danor

I guess that makes sense.

For streams every line has - at the end since that %2 would always return "-" since the tag won't ever exist (Probably?).
The %1 is being filled by the Track tag on the stream as "Saje - Lost Tonight" is all we get.

sveakul

Roger that.  So, just a play on how it interprets metadata from radio streams vs. tagged files.  At any rate, it's doing exactly what I needed it to do and thank you again for making it!

Keltic Danor

Happy to help out, was an interesting experience. :)

There is a new release out now which changes the following:

v1.2
  • Added option to ignore streams
  • Added option to ignore local files
  • Added option to ignore specific file types MP3;FLAC;MOD and so on
  • Changed the way the plug-in worked, originally it worked like the MSN plug-in using a window hook thing to catch title changes
    Instead it now uses NewTrack and NewTitle plug-in events from XMPlay itself
    It's all new to me so I'd recommend testing it for a good while before deleting 1.1 just in case, or I guess just keep with 1.1 if you don't need exclusions ;D
Just Log v1.2

sveakul

Thanks Keltic for 1.2!  Giving it a whirl right now. Even though I don't use the "exclusions" portion I notice that with radio streams the new way of pulling the events results in a track list that leaves out separate lines for the station name that sometimes appeared with 1.1.  I suppose that depended on how the metadata was being sent.  But I PREFER the cleaner track list of 1.2 without the station names--I don't care where the track came from only the artist/title and play time.

So I'm updating to 1.2 for sure--excellent!

piovrauz

Seems like this is becoming better and better, tomorrow wil have some more tests done. Thanks a lot :)

Small question: Exclude files, exclude streams... what's left? ;)

Keltic Danor

#6
Quote from: sveakulThanks Keltic for 1.2!  Giving it a whirl right now. Even though I don't use the "exclusions" portion I notice that with radio streams the new way of pulling the events results in a track list that leaves out separate lines for the station name that sometimes appeared with 1.1.  I suppose that depended on how the metadata was being sent.  But I PREFER the cleaner track list of 1.2 without the station names--I don't care where the track came from only the artist/title and play time.
Probably just a stream oddity, due to some voodoo XMPlay tells me about new title changes before it tells me a new track is loaded when you first open them up. That is fine but I need the Track data first since I use that to work out if it is a stream or not for exclusion purposes.

So that first title is being ignored, which I suppose has the side effect of what you are seeing? Glad you like it that way since I haven't the faintest idea how I would change that. :P

Quote from: piovrauzSmall question: Exclude files, exclude streams... what's left? ;)
Well then it's disabled entirely of course! ;D

piovrauz

#7
Question: is there a way to not write the "-" thing in the log if the previous value is empty?
It would be useful to me (I could consolidate local files and streams log to _look_ the same)

An even better option would be the ability to skip some %blocks if some condition happens, like them being empty - asking for too much? XD

Keltic Danor

Quote from: piovrauzQuestion: is there a way to not write the "-" thing in the log if the previous value is empty?
It would be useful to me (I could consolidate local files and streams log to _look_ the same)

An even better option would be the ability to skip some %blocks if some condition happens, like them being empty - asking for too much? XD
Not sure I'm clever enough to build the string like that as it goes... However, after doing the exclusion stuff though I think I've figured out enough that I could just have two string formatting fields, one for files and one for streams.

So presumably you could just format the streams one appropriately to match instead?

piovrauz

yes, that would work fine for me :)

one formatting for local files, one for streams. thakn you again.

sveakul

Keltic:  seeing as you're contemplating some mods, is it possible you could make the maximum log file size specifiable in KB instead of MB?  Thanks for your consideration.

Keltic Danor

Quote from: piovrauzyes, that would work fine for me :)

one formatting for local files, one for streams. thakn you again.

Quote from: sveakulKeltic:  seeing as you're contemplating some mods, is it possible you could make the maximum log file size specifiable in KB instead of MB?  Thanks for your consideration.

I think we can manage that.

v1.3
  • Added separate string for stream formatting
  • Changed the max file from MB to PB so to get 500 KB you just need to do some simple math and enter 4.547473508864641×10-10 KB, floating point was too complicated, maybe next update
Just Log v1.3

piovrauz

Seems to work perfectly here. More testing tomorrow. For now a big thank you! :)

sveakul

#13
Keltic:  thanks for 1.3 and the new KB file size increment!  I just noticed that when the size limit is exceeded,  if "Make New" is checked the maxed-out log is renamed with date/time and a *.old extension, while a new log.txt is created to re-start the process.  If "Make New" is not checked the whole log is wiped and re-created.

That behavior is just fine, but would it be possible to just begin deleting the oldest entries when a file size or entry/line limit is reached ("scrolling" them off the list)?  Hey you've done everything needed for a great plugin RIGHT NOW, but the problem with success is users wanting "tweaks", haha..  Just an idea, that's all!!  BTW the dual-format stream/file option is really nice, thanks.

Keltic Danor

Quote from: sveakulKeltic:  thanks for 1.3 and the new KB file size increment!  I just noticed that when the size limit is exceeded,  if "Make New" is checked the maxed-out log is renamed with date/time and a *.old extension, while a new log.txt is created to re-start the process.  If "Make New" is not checked the whole log is wiped and re-created.

That behavior is just fine, but would it be possible to just begin deleting the oldest entries when a file size or entry/line limit is reached ("scrolling" them off the list)?  Hey you've done everything needed for a great plugin RIGHT NOW, but the problem with success is users wanting "tweaks", haha..  Just an idea, that's all!!  BTW the dual-format stream/file option is really nice, thanks.

Yes, I mostly had it like that because I didn't know how to do it the other way without borking it, after a bit of googling I think I have a workable solution. But as usual try before you buy.  :P

v1.4
  • If make new is not checked the existing file will just remove the oldest lines
  • The old file doesn't have .s in the name anymore
Just Log v1.4

sveakul

Keltic:  What can I say?  Perfection!  The "scrolling off" older entries works great in 1.4.  Man I'd file this "Mission Accomplished" and just enjoy your weekend!  Thanks again for your responsiveness to users feedback.

Jace

Actually very handy for an unusual thing I'm trying to set up \o/

Just two things about it.
- Could you add filename (with path?) as a %X option?
- Also, the tab order in the dialog is a bit odd. For example, focus the local file string order, press tab to go to the next box.

Keltic Danor

Quote from: JaceActually very handy for an unusual thing I'm trying to set up \o/

Just two things about it.
- Could you add filename (with path?) as a %X option?
- Also, the tab order in the dialog is a bit odd. For example, focus the local file string order, press tab to go to the next box.
Hey mate, I've done quick fix for you.

v1.5
  • %0 filename added to string formatting
  • Tab order fixed a little bit ...probably
Just Log v1.5

Jace

Found a bug, I think. Nothing gets logged if an mp3/ogg file has no tags

Jo Li KMC

Hello!  I was directed here by sveakul in my search for, well... pretty much this!  I'm happy to say that this absolutely serves the purpose I wanted it for!  I do, however, have some critiques and/or recommendations, if I may?  I'll start with the biggest one.

Would it be possible to bring the customizable string formats up to parity with XMPlay's own title strings?  I'd love to see conditional formatting implemented!  That would be very handy for occasions like what Jace mentioned. (It affects modules without internal titles, too!)  I'm sure other people would find things like Track Number and Genre handy, too, maybe?

The other thing I'd like is some sort of alternate Filename function.  I know you just added a filename-with-path option in, but I'm thinking about an option to disable the path part of that?  Like, maybe in the form of a checkbox?  Just having the filename written could be handy to some people, like me.

Thank you for making this, Keltic Danor.  This is a very good thing to have handy, and I really hope you keep making little improvements and additions to it!