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

sveakul

  • Posts: 117
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: 820
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: 117
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: 820
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: 117
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: 994
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: 820
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: 994
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: 820
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: 994
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: 117
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: 820
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.54747350886464110-10 KB, floating point was too complicated, maybe next update
Just Log v1.3

piovrauz

  • Posts: 994
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: 117
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: 820
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: 117
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: 838
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: 820
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: 838
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