Author Topic: Xmp-justlog plugin  (Read 1000 times)

sveakul

  • Posts: 121
Xmp-justlog plugin
« on: 6 Jul '21 - 22:07 »
@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:

Code: [Select]
%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

  • XMPlay Support
  • Posts: 829
Re: Xmp-justlog plugin
« Reply #1 on: 7 Jul '21 - 03:13 »
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

  • Posts: 121
Re: Xmp-justlog plugin
« Reply #2 on: 7 Jul '21 - 03:26 »
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

  • XMPlay Support
  • Posts: 829
Re: Xmp-justlog plugin
« Reply #3 on: 7 Jul '21 - 10:42 »
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

  • Posts: 121
Re: Xmp-justlog plugin
« Reply #4 on: 7 Jul '21 - 20:26 »
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

  • Posts: 996
Re: Xmp-justlog plugin
« Reply #5 on: 7 Jul '21 - 21:36 »
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

  • XMPlay Support
  • Posts: 829
Re: Xmp-justlog plugin
« Reply #6 on: 8 Jul '21 - 07:41 »
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.
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

Small question: Exclude files, exclude streams... what's left? ;)
Well then it's disabled entirely of course! ;D
« Last Edit: 8 Jul '21 - 14:16 by Keltic Danor »

piovrauz

  • Posts: 996
Re: Xmp-justlog plugin
« Reply #7 on: 8 Jul '21 - 15:27 »
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
« Last Edit: 8 Jul '21 - 15:34 by piovrauz »

Keltic Danor

  • XMPlay Support
  • Posts: 829
Re: Xmp-justlog plugin
« Reply #8 on: 8 Jul '21 - 15:48 »
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
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

  • Posts: 996
Re: Xmp-justlog plugin
« Reply #9 on: 8 Jul '21 - 19:37 »
yes, that would work fine for me :)

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

sveakul

  • Posts: 121
Re: Xmp-justlog plugin
« Reply #10 on: 9 Jul '21 - 00:22 »
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

  • XMPlay Support
  • Posts: 829
Re: Xmp-justlog plugin
« Reply #11 on: 9 Jul '21 - 04:37 »
yes, that would work fine for me :)

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

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.

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

  • Posts: 996
Re: Xmp-justlog plugin
« Reply #12 on: 9 Jul '21 - 21:47 »
Seems to work perfectly here. More testing tomorrow. For now a big thank you! :)

sveakul

  • Posts: 121
Re: Xmp-justlog plugin
« Reply #13 on: 10 Jul '21 - 00:46 »
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.
« Last Edit: 10 Jul '21 - 01:06 by sveakul »

Keltic Danor

  • XMPlay Support
  • Posts: 829
Re: Xmp-justlog plugin
« Reply #14 on: 10 Jul '21 - 09:05 »
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.

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

  • Posts: 121
Re: Xmp-justlog plugin
« Reply #15 on: 10 Jul '21 - 19:40 »
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

  • Posts: 841
Re: Xmp-justlog plugin
« Reply #16 on: 16 Sep '21 - 22:07 »
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

  • XMPlay Support
  • Posts: 829
Re: Xmp-justlog plugin
« Reply #17 on: 27 Sep '21 - 08:35 »
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.
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

  • Posts: 841
Re: Xmp-justlog plugin
« Reply #18 on: 7 Oct '21 - 17:59 »
Found a bug, I think. Nothing gets logged if an mp3/ogg file has no tags

Jo Li KMC

  • Posts: 26
Re: Xmp-justlog plugin
« Reply #19 on: 10 Nov '21 - 07:22 »
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!

Keltic Danor

  • XMPlay Support
  • Posts: 829
Re: Xmp-justlog plugin
« Reply #20 on: 15 Nov '21 - 11:30 »
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.
I can add some more tags to the string format but conditional stuff is a bit above my ability with strings and such, but you never know perhaps in future. But for now I've done a couple of tweaks.

v1.6
  • New option to remove path from %0 filename
  • New option to include even if there is no title
Just Log v1.6

Jo Li KMC

  • Posts: 26
Re: Xmp-justlog plugin
« Reply #21 on: 18 Nov '21 - 01:35 »
Very cool!  This works exactly as it should!  Thank you so much!  ;D

Now, I do have one more question / recommendation…  Do you think it would be hard to implement a string specifically for streams which displays the stream name?  If it's any help, the string gets written to .PLS files as "title1=[stream title]" and in M3U files, the string is "#EXTINF:-1,[stream title]".

Title already works exactly as expected (for example, "Ultrasyd - Worthless"), but there doesn't seem to be a way to get the stream name (in this example, "Nectarine Demoscene Radio") to show up in the log unless the stream doesn't have "now playing" information.  For example, "Radio Margaritaville" has a 96KB/s stream which doesn't show the current song, so the plugin just writes "Radio Margaritaville" as the title.

Once again, thank you for this great plugin!  And… I'm sorry for being greedy.  I'm a bit of a "power user" when it comes to things like this, ha hah…

Keltic Danor

  • XMPlay Support
  • Posts: 829
Re: Xmp-justlog plugin
« Reply #22 on: 18 Nov '21 - 06:00 »
Now, I do have one more question / recommendation…  Do you think it would be hard to implement a string specifically for streams which displays the stream name?  If it's any help, the string gets written to .PLS files as "title1=[stream title]" and in M3U files, the string is "#EXTINF:-1,[stream title]".
I can't dig into the playlist much but most streams return the name as the title and the song/track title is in a separate field, I've added %z so it will get the title field there if there is a track title so in theory it should do what you want. I guess give it a shot and see how it goes.

v1.7
  • %z tag for stream title if present
Just Log v1.7

Jo Li KMC

  • Posts: 26
Re: Xmp-justlog plugin
« Reply #23 on: 20 Nov '21 - 00:24 »
It is, indeed, working exactly as expected!  After adding the new variable to the Stream Title, the log file now generates both the current song and the stream title, where applicable!  Otherwise, it just displays "Stream title" followed by a dash, since missing variables do that with this plugin.  Hee hee.

Now, I have to correct myself from my previous post…  I said v1.6 was doing exactly what it was supposed to.  Well, I was kind of wrong.  For some reason, when files without titles are played and the "excluded untitled" toggle is disabled (meaning that it logs untitled files), this causes XMPlay to crash.  It doesn't seem to matter whether or not the plugin is set to log this data; if the file it's trying to play is capable of having a title, and doesn't have one, the plugin just makes XMPlay quit.  I can't imagine why this would happen if it's not even set to log the non-title…  Very odd.

100m0t0log

  • Posts: 6
Re: Xmp-justlog plugin
« Reply #24 on: 22 Nov '21 - 07:23 »
Hey!
This is a great plugin.
I would like to see more such features in your plugin:
1. Show track number.
2. Add the ability to line break. (Example:%2%line break%1).
Your plugin works great.
Maybe the new opportunities will be useful not only for me.
Thanks.