automatic update of music database (1 Viewer)

JulianBuss

Portal Pro
November 14, 2004
136
2
If I add new music files to a music directory, it is not reflected in the music database. Currently I have to open configuration and manually do an update on the music database.

I suggest that MP does an automatic update of the music database periodically, for example at nighttime or once an hour or so.
 

JulianBuss

Portal Pro
November 14, 2004
136
2
yeah, that's ok for the moment. But we want MP to be smart, won't we?

Imagine some non-computer-aware family member; he just want to find the music he wants. He wants not to bother with the question if someone else just added new files (and if he has to press the scan button).
MP should have an up-to-date database automatically, so that I can just use it without thinking.

I can imagine that the music database update is an expensive operation, therefore I suggest to let the user decide on which time it happens. MP already have some kind of scheduling for TV recording, perhaps that code could be used to schedule these kind of events, too.
 

MrMario64

Retired Team Member
  • Premium Supporter
  • April 22, 2004
    822
    1
    50
    Home Country
    Netherlands Netherlands
    but we also want MP to be fast,
    It's annoying to have MP scan your music share everytime you enter it.

    And do not say "well you can look during startup, or once everyday" cause that will not really work for this feature as you want your music available after you put it there and not wait then till the next day.
    It will end up in you still pressing the scan button.
     

    samuel337

    Portal Pro
    August 25, 2004
    772
    0
    Melbourne, Australia
    Just a point: .NET does offer a convenient FileSystemWatcher that can be used to detect changes to a particular folder and then react accordingly. This is currently being used for detection of whether tvguide.xml has changed or not. If so, the tvdatabase is updated.

    If it can be done for the tvdatabase, I'm sure it can be for the music database as well, without a lot of performance problems...

    Sam
     

    JulianBuss

    Portal Pro
    November 14, 2004
    136
    2
    that would be perfect.

    Or another possibility could be to do the music scan in a background thread? I don't now how good support for threads is in .NET, but since it's a modern language, I assume the support is there :)
    But I know that it could be complicated to deal with multithreading - so if MP can watch changes in the music folder it would be the perfect solution from my point of view.
     
    A

    Anonymous

    Guest
    Just a thought, I think a combination of both would be good. For example have it scan automatically once a day, say when the computer is idle, and also have the button, so if I know i just added something and i want to play it right now, I can hit the scan button.

    Cheers
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    orphic2 said:
    Just a thought, I think a combination of both would be good. For example have it scan automatically once a day, say when the computer is idle, and also have the button, so if I know i just added something and i want to play it right now, I can hit the scan button.

    How about following sollution?

    - Automated task - MP scans selected music folders on specific times (i.e. wakes computer from suspend / hibernate in the midle of the night)

    - Use .Net to watch directory contents updates (only if this doesn't add too much overhead and cause lag/stutter etc.)

    - Keep that scan button, if user want's to manually make sure that database is up to date (this should be unneccesary if .net file watching works ok)
     
    A

    Anonymous

    Guest
    tourettes said:
    - Use .Net to watch directory contents updates (only if this doesn't add too much overhead and cause lag/stutter etc.)
    - Keep that scan button, if user want's to manually make sure that database is up to date (this should be unneccesary if .net file watching works ok)

    This fileSystemWatcher theory would only work, if you had MP running whenever you made a change to your music directory, otherwise it wouldnt pickup the change until you made another subsequent change while MP was running.
     

    Users who are viewing this thread

    Top Bottom