|
-
Dec 25th, 2003, 03:13 PM
#1
Thread Starter
Registered User
media library
does anybody know how the library in windows media player was made (i mean the tree view thing on the left)??
it clearly dosn't read the tags from every file as you open the library, because that would take way to long.
what do they use? i want to make basically exactly the same thing for now and i don't know if i should use some kind of database (no idea how to do that) or xml or whatever. also, in wmp9 there is an option to monitor folders for changes (new files for example) and then it updates the media library automatically.
any ideas on how to create such a tree view that loads very very quickly when you start the application? oh, it should also be fast to sort and search.
please give me some ideas of the most practical way to do this.
-
Dec 25th, 2003, 03:48 PM
#2
Sleep mode
You can monitor folder activities that happen to files (deleting , editing , moving ...etc) by using FileSystemWatcher . Here's a good example :
http://abstractvb.com/code.asp?A=1081
-
Dec 25th, 2003, 04:14 PM
#3
Sleep mode
For the tree thingy , I'd suggest to store all information in categories and push them in db . For this you can apply advanced search queries and relations ..etc . Then you'll still have the option to write it to XML file with only one line of code .
-
Dec 26th, 2003, 07:06 AM
#4
Thread Starter
Registered User
Originally posted by Pirate
store all information in categories and push them in db.
Then you'll still have the option to write it to XML file with only one line of code .
what do you mean by store in categories and push them in db? can you explain this a bit? and what is the purpose of storing something in xml, if it is in a db?
-
Dec 26th, 2003, 07:47 AM
#5
Sleep mode
Originally posted by marvinklein
what do you mean by store in categories and push them in db? can you explain this a bit? and what is the purpose of storing something in xml, if it is in a db?
I mean : in categories like this :
1-Genre
2-Artist
-----male
-----female
3-Year between x and y .(pre 2000 or after 2000) .
etc .
You can mimic other program's db design or design it the way you like .
This way would give you more control and flexibility over the db . You will be able to create powerful queries on 1, 2 , 3 tables and get specific info from the db. a lot to mention but if you are interested , you should read about database design .
For XML files , when I stated that , I meant it to be second option . And it's available any time with only one line of code . XML files are portable , need no other programs (well , IE will be excellent) , readable text , hierarchy of data (tables , inside them columns inside them rows) , can be read easily off the net , serializable ,..read more here :
http://www.devarticles.com/c/a/XML/X...cs_-_Part_One/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|