Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Feature Request: trim whitespace
26-04-2012, 15:33
Post: #1
Feature Request: trim whitespace
Hi

once i had a problem with files that had in the front of some metadata whitespace and then the music didn't show up as expected.
e.g. "Madonna" vs " Madonna" .. the second one will be sorted according to the first character, a space, and will show up at the top of the list.
would it be possible to add a trim function that removes whitespace at the beginning of all metadata fields? so that misspelled fields won't mix up the lists? thanks.

KoS
Find all posts by this user
Quote this message in a reply
26-04-2012, 16:12
Post: #2
RE: Feature Request: trim whitespace
(26-04-2012 15:33)KoS Wrote:  Hi

once i had a problem with files that had in the front of some metadata whitespace and then the music didn't show up as expected.
e.g. "Madonna" vs " Madonna" .. the second one will be sorted according to the first character, a space, and will show up at the top of the list.
would it be possible to add a trim function that removes whitespace at the beginning of all metadata fields? so that misspelled fields won't mix up the lists? thanks.

KoS

I think this is a good idea. I'll also put a warning in the log so that people will know this has happened and can fix the metadata if they want.

You didn't mention trailing spaces. I think these should also be trimmed (with a warning), as this will produce a duplicated entry in the artist index.
Find all posts by this user
Quote this message in a reply
26-04-2012, 16:51
Post: #3
Thumbs Up RE: Feature Request: trim whitespace
(26-04-2012 16:12)simoncn Wrote:  
(26-04-2012 15:33)KoS Wrote:  Hi

once i had a problem with files that had in the front of some metadata whitespace and then the music didn't show up as expected.
e.g. "Madonna" vs " Madonna" .. the second one will be sorted according to the first character, a space, and will show up at the top of the list.
would it be possible to add a trim function that removes whitespace at the beginning of all metadata fields? so that misspelled fields won't mix up the lists? thanks.

KoS

I think this is a good idea. I'll also put a warning in the log so that people will know this has happened and can fix the metadata if they want.

You didn't mention trailing spaces. I think these should also be trimmed (with a warning), as this will produce a duplicated entry in the artist index.
perfect, thanks.
could you extend the log-file to have some timestamps? otherwise i never know which messages are new or if the log file has changed.
Find all posts by this user
Quote this message in a reply
26-04-2012, 17:10
Post: #4
RE: Feature Request: trim whitespace
(26-04-2012 16:51)KoS Wrote:  perfect, thanks.
could you extend the log-file to have some timestamps? otherwise i never know which messages are new or if the log file has changed.

That option is already available. Currently most (but not all) messages are timestamped. In the next release, all messages will be timestamped. To enable timestamping, you need to add the option
Code:
--prefix time
on the command to start MinimServer.
Find all posts by this user
Quote this message in a reply
26-04-2012, 17:40
Post: #5
RE: Feature Request: trim whitespace
(26-04-2012 17:10)simoncn Wrote:  
(26-04-2012 16:51)KoS Wrote:  perfect, thanks.
could you extend the log-file to have some timestamps? otherwise i never know which messages are new or if the log file has changed.

That option is already available. Currently most (but not all) messages are timestamped. In the next release, all messages will be timestamped. To enable timestamping, you need to add the option
Code:
--prefix time
on the command to start MinimServer.

ups. sorry for bothering. haven't seen that option on the website. so the date can also be added to the stamps?
Find all posts by this user
Quote this message in a reply
26-04-2012, 21:46
Post: #6
RE: Feature Request: trim whitespace
(26-04-2012 17:40)KoS Wrote:  ups. sorry for bothering. haven't seen that option on the website. so the date can also be added to the stamps?

It's currently undocumented because it was intended as a debugging feature.

I can add another prefix value 'dateTime' that includes the date. I'll do this in the next release.

The next release will include a number of changes to how logging works. I'll document the timestamp facility as part of describing those changes.
Find all posts by this user
Quote this message in a reply
27-04-2012, 16:18
Post: #7
RE: Feature Request: trim whitespace
(26-04-2012 21:46)simoncn Wrote:  
(26-04-2012 17:40)KoS Wrote:  ups. sorry for bothering. haven't seen that option on the website. so the date can also be added to the stamps?
It's currently undocumented because it was intended as a debugging feature.
i would enable it by default as log-files without timestamps mostly aren't very useful.

Quote:I can add another prefix value 'dateTime' that includes the date. I'll do this in the next release.
could you also add a message as soon the server finished the startup (e.g. inital music scan) and is available on the network. i just had thought that i have a problem with my setup becuase the server didn't show up in kinsky, just to realize that it was still doing the inital scan :-)
Find all posts by this user
Quote this message in a reply
27-04-2012, 17:01
Post: #8
RE: Feature Request: trim whitespace
(27-04-2012 16:18)KoS Wrote:  could you also add a message as soon the server finished the startup (e.g. inital music scan) and is available on the network. i just had thought that i have a problem with my setup becuase the server didn't show up in kinsky, just to realize that it was still doing the inital scan :-)

I noticed this recently, and it will be fixed in the next release.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)