<div dir="ltr"><div><div><div>Hi,<br><br></div><div>* tl;dr *<br></div><div>There is new refactored code in fabian-refactoring-shantanu which should be functionally same as master. Please take some time, test it and report if it works fine, or if a major feature is broken.<br>
<br></div><div>* Long version *<br></div><div><br></div>Thanks to Fabian, we had started refactoring Plasma Media Center's media browsing code so as to create more reusable components. Finally this is complete with all major functionality working.<br>
<br></div>The code for this lies in the branch fabian-refactoring-shantanu . The salient features are-<br><br></div>1. Backends can now expose multiple models instead of just one. The media browser is smart enough to understand how to display these. See #2. There is 100% backwards compatibility in the sense that older backends with only one model will continue to work, internally stored as a list of just one model.<br>
<br><div><div>2. We now have the following reusable components throughout PMC-<br>* GridBrowser - as the name says, give it a backend/model and it will show items in a grid<br>* ListBrowser - same as above, but a list<br>
</div><div>* SplitBrowser - can show two browsers side-by-side for two models<br></div><div></div><div>* TabBrowser - takes a backend and list of models and shows a browser for each model in tabs<br>* SmartBrowser - give it a model or a list of models, and it figures out which of the above browsers to use<br>
</div><div><br>3. Due to these changes, method calls like expand, search etc now take a parameter to the model on which they need to operate. There is 100% backwards compatibility where if the parameter is not present, the first model is picked up.<br>
<br></div><div>4. Search can now operate on individual models, giving you support to search any model in your backend. See #3<br><br></div><div>5. *Best of all* We can throw all the custom/duplicated code for All Music backend as generic browsers in #2 take care of that. (1006 less lines of code!)<br>
<br></div><div>What do we need? Well if you get some time, please checkout the branch fabian-refactoring-shantanu , test it to make sure no major features are broken. Note, there are still few minor keyboard/UI issues which I will create bug reports for once merged to master.<br>
<br></div><div>What next? I eagerly wait for comments on how the new browsers work, and unless some major feature is broken, I will go ahead and merge with master this weekend, or earlier if people try out and find no issues.<br>
<br></div><div>Thanks!<br></div><div><div><div><div><div><div><div><br>-- <br>Shantanu Tushar (UTC +0530)<br><a href="http://www.shantanutushar.com" target="_blank">http://www.shantanutushar.com</a>
</div></div></div></div></div></div></div></div></div>