View Single Post
Old 11th November 2013, 03:18   #11
Junior Member
Join Date: Oct 2012
Posts: 35
Originally Posted by DrO View Post
that's a wonderfully inaccurate statement.

having a 'mimetype' value allowing for easier filtering by media type would likely help with things (and is the nearest that might happen), but preferential type & rollup of library items is not going to happen anytime soon (or at all) as it's a lot more than 3 lines of code (and not forgetting all of the time needed to make changes, test things, etc).
How is it more than:

MediaLibraryEntry existing;
if (existing = mediaLibrary.getEntry("%albumartist% == '" + current.albumArtist() +
"' && %albumtitle% == '" + current.albumTitle() + "' && "%title% == '" +
current.title() + "'"))
if (existing.bitrate() < current.bitrate())
addCurrent = false;

supposing all these methods exist, and not counting any escape code.

personally i despise having things rolled up as you then have to do a load of other things in the UI handling to make it possible to determine / switch between things (again which is why 3 lines of code is not realistic).
That is assuming you are going to keep all duplicates in the library and are going to depend on the UI code (which has all these different views) to facilitate switching and all kinds of UI functionality. What I propose is a simple filter in the library generation code that will just get rid of the duplicates (they will never enter the library or be replaced when a higher bitrate is found).

Of course you'd need to add at least some preferences ability to switch this on and off and if you'd really want to do it right you'd need an interface to select preferred formats and yadda yadda yadda but as a simple hack I'm sure I would be able to do it in an hour if I had the source. Granted, I would not want to put such an incomplete feature in a production version either, but this limited idea seems completely doable?

Question: is it possible to write an addon that will install this filter, OR, that will allow me to prune the library database of duplicates given a simple rule? The downside of the latter is that I will need to run that prune after every scan :-/.

A mimetype is really not going to help because I can already filter lossless. The point is that a smartview can only determine "is this file going to be shown" and it can only determine this based on the current entry, not what's in the library. Expanding that functionality is going to take a lot of work.

you both want a hefty overhaul on functionality which is not going to happen, there are means to achieve the filtering and yes it involves a bit more intervention but it's do-able
A filter with scarcely any configuration is not a hefty overhaul on functionality, and if you mean by do-able that I would go and add "[flac]" to the albumtitle tag of every flac album, or that I would keep a 'combined' hierarchy and a 'mp3s-i-don't-want-in-there' hierachy (like I'm doing now) only to run into problems again when I want to separate the mp3s from the flacs, well... it's not pretty.

(Now that I'm thinking about it, the cleanest way to do it is to create 3 hierarchies: one all FLAC, one all lossy (inclusive) and one all lossy (exclusive). Then I would just need a way to combine the inclusive and exclusive lossy trees into one view. In essence, a Windows Explorer smartview. The easiest way to do THAT is to create a 4th tree with symbolic links.)

I'm telling you, it's ugly. Smartviews don't solve this.

hence why if enabling the 'mimetype' field it would at least make it possible to order them by type so it's at least simpler to see them
You'd probably still see all duplicates in every album, so if you'd queue the album, you'd queue it twice - they would just be in the right order.

The tracks panel in the media library allows an "Extension" column to be added. Then you could at least group files by format.
Same. And we're not talking files, we're talking entries that will only be shown in the final view - which is usually the album view. So you'd get albums all the time with twice the entries.

I will agree that the UI overhaul that you considered, would be a major effort, not even knowing the code myself.

Btw, in that other thread we never debated the feasibility of this feature, MrSinatra just proposed ways to deal with the absence of it.
Xennex is offline   Reply With Quote