Post Reply 
Select for empty field in indexTags?
03-11-2020, 18:28
Post: #1
Select for empty field in indexTags?
I use the CATEGORY field to separate large or special libraries in my collection, and I leave CATEGORY empty for most of my non-classical music in order to avoid adding an extra tag for my general music collection.

I learned today that I can set "CATEGORY=Classical:Classical Library" under indexTags so that I can browse my classical collection directly.

But is there a way to do something like "CATEGORY=<none>:Non-Classical Library", so that it only selects files that lack that field?

Also, I have another question about multidisc album sorting, but I'm not sure whether the answer is on the library end or the control point end:

Is it possible to make DISCSUBTITLE separations on album tracklists expandable, and show up as collapsed by default?

I have some large classical anthologies, some with over 100 CD's, and right now the only options I know of are to give each disc a different album tag (frustrating for browsing all albums by a composer), or to tag the collection as a single album with many discsubtitle fields, which results in long track listings for that anthology which are difficult to browse.

If the album tracks started as a collapsed list with discsubtitle as the headers, it would be much easier to browse through the contents of these large anthologies.

Thanks in advance. Smile
Find all posts by this user
Quote this message in a reply
03-11-2020, 21:10
Post: #2
RE: Select for empty field in indexTags?
(03-11-2020 18:28)Airman Wrote:  But is there a way to do something like "CATEGORY=<none>:Non-Classical Library", so that it only selects files that lack that field?

I think it would be possible to add something like this. I will investigate and post back here.

Quote:Is it possible to make DISCSUBTITLE separations on album tracklists expandable, and show up as collapsed by default?

Collapsing and uncollapsing would be need to be implemented by the control point as this controls the user interface. The UPnP protocol limits the server to sending containers with predefined contents.

I have considered the possibility of adding something like an "album set". In the containment hierarchy, this would be a level above album, so the hierarchy would be

album set (optional)
---album
------disc (optional)
---------group (optional)
------------track

The album level would be for an album with a small number of discs (perhaps up to 3 or 4). An album set would be for anthologies that contain perhaps 50 to 100 discs. An album set would be shown as a collapsed list of albums. The user could click on one of these albums to reveal the contents. These contents would be sent to the control point as a new container, so all the other albums in the album set would not be shown.

When browsing the library, album sets would be shown alongside other albums, so the user would only see the top-level album set until they click on it to see what it contains.

Does this sound like a good solution for your requirements?
Find all posts by this user
Quote this message in a reply
04-11-2020, 17:27 (This post was last modified: 04-11-2020 17:29 by Airman.)
Post: #3
RE: Select for empty field in indexTags?
Hi Simon,

Another thought that crossed my mind for selecting empty fields is that it might be possible to create a "troubleshooting" profile with various index tags to catch any untagged items/fields in one's collection and make it easy to go through and fill in gaps. Just a side thought. Smile

As for the Album Set level, it sounds like a perfect solution for what I need.

I already have an existing "collection" field that I just arbitrarily used to lump these anthologies together for the sake of browsing them (minus the extra album integration and hierarchical features you're suggesting of course). I think I could easily copy the contents of the "collection" field to whatever field ends up acting as "Album Set", and then append the disc number or subtitle to the Album field to add the Album level of organization. Should be a pretty smooth process.

Being able to still use disc and group underneath the album level would allow a lot of flexibility in choosing how to organize classical collections as well. The possibilities are exciting. Smile

Thanks for the reply!
Find all posts by this user
Quote this message in a reply
07-11-2020, 13:49
Post: #4
RE: Select for empty field in indexTags?
(03-11-2020 18:28)Airman Wrote:  But is there a way to do something like "CATEGORY=<none>:Non-Classical Library", so that it only selects files that lack that field?

Unless simoncn is going to modify the MinimServer syntax we've only ever been able to accomplish something like this by using the tagUpdate functionality.
My original post was actually about adding 'Studio Album' to files that didn't have a value for ALBUM_RELEASE_TYPE, but it's the same principal.

Create a tagUpdate file to add a virtual (only within the scope of MinimServer) tag containing the value 'Non-Classical' for every file in your collection.

In MinimServer 2 you could use something like:
Code:
@#AudioFormat=FLAC
.. add extra as necessary
+NON_CLASSICAL_CONSTANT=Non-Classical

In MinimServer 1 you might want to use '@DISCNUMBER=01, @DISCNUMBER=02' e.t.c.

Then add to itemTags: NON_CLASSICAL_CONSTANT


At this point you have two options:
  1. Use CATEGORY as a simple tagIndex where you'd select between the two values.

    add to tagValue: CATEGORY.default={NON_CLASSICAL_CONSTANT}
    change indexTag: 'CATEGORY=Classical:Classical Library' to just 'CATEGORY'

    This adds the value 'Non-Classical' (or whatever you've chosen in the tagUpdate file) to the tag CATEGORY where there isn't already a value.
  2. Specify multiple filters e.g. Classical Library and Non-Classical Library.
    Here there's a little more work as you can't specify CATEGORY twice in the tagIndex setting i.e. you can't have "CATEGORY=Classical:Classical Library, CATEGORY=Non-Classical:Non-Classical Library".

    add to tagValue: FULLCATEGORY.default={CATEGORY, NON_CLASSICAL_CONSTANT}
    This creates the new virtual tag FULLCATEGORY containing the values 'Classical' (from CATEGORY) and 'Non-Classical' (from NON_CLASSICAL_CONSTANT) where there isn't a value in CATEGORY.

    You can then add:
    indexTags: FULLCATEGORY=Non-Classical:Non-Classical Library

Hope this helps.
Find all posts by this user
Quote this message in a reply
09-11-2020, 07:09 (This post was last modified: 09-11-2020 08:55 by Airman.)
Post: #5
RE: Select for empty field in indexTags?
Update: see edit below

(07-11-2020 13:49)simbun Wrote:  Here there's a little more work as you can't specify CATEGORY twice in the tagIndex setting i.e. you can't have "CATEGORY=Classical:Classical Library, CATEGORY=Non-Classical:Non-Classical Library".

This helps a lot because I actually wasn't aware of this limitation, so I originally thought it would be a bit more simple to specify separate indexTags for the different values I have for CATEGORY, and have a top-level option to browse directly into them.

But from there, I can try your idea of using tagUpdate to give all files in my collection the virtual tags.

I'm wondering if it would also be possible to extend the tagUpdate idea and add more choices, something like:

@Category=Soundtrack
+CATEGORY_SOUNDTRACK=Soundtrack

@Category=ETC
+CATEGORY_ETC=Etc

and so on

then add:

indexTags=CATEGORY_SOUNDTRACK=Soundtrack:Soundtrack Collection, CATEGORY_ETC=Etc:Etc Collection, and so on

Thanks a lot for the help Smile

Edit:

So I was able to use tagUpdate to assign various CATEGORY values to new fields such as CATEGORY_SOUNDTRACK, and then add those new fields to indexTags. Great!

The only thing left is that I wasn't able to assign a default value to the files with no CATEGORY value.

I have it set up like this:

tagValue=Category.default={DEFAULT_CATEGORY_CONSTANT}

with this in my tagupdate.txt:

@#AUDIOFORMAT=FLAC
@#AUDIOFORMAT=a few other formats
+DEFAULT_CATEGORY_CONSTANT=Default

But so far, "Default" isn't showing up in the list of categories.
Find all posts by this user
Quote this message in a reply
09-11-2020, 10:15
Post: #6
RE: Select for empty field in indexTags?
(09-11-2020 07:09)Airman Wrote:  But so far, "Default" isn't showing up in the list of categories.

Sorry the one thing I missed was that if you want to reference AUDIOFORMAT in the tagUpdate file then you need to specify it in itemTags.

itemTags:#AudioFormat
Find all posts by this user
Quote this message in a reply
09-11-2020, 23:45 (This post was last modified: 10-11-2020 01:23 by Airman.)
Post: #7
RE: Select for empty field in indexTags?
(09-11-2020 10:15)simbun Wrote:  
(09-11-2020 07:09)Airman Wrote:  But so far, "Default" isn't showing up in the list of categories.

Sorry the one thing I missed was that if you want to reference AUDIOFORMAT in the tagUpdate file then you need to specify it in itemTags.

itemTags:#AudioFormat

Awesome, that works perfectly. Smile

So just to recap in case anyone else has a similar situation, here's a generalized example of the setup:

indexTags to set top-level browsing libraries:

Category=Default:Uncategorized Library,
CATEGORY_CLASSICAL=Classical:Classical Library,
CATEGORY_ETC=etc:any_name_you_want,
^ you can add as many of these as you have CATEGORY fields set in your collection's metadata

tagupdate.txt is as follows:

@#AUDIOFORMAT=FLAC
@#AUDIOFORMAT=MP3
@#AUDIOFORMAT= ... other oddball formats each on a new line
+DEFAULT_CATEGORY_CONSTANT=Default

@CATEGORY=Classical
+CATEGORY_CLASSICAL=Classical

@CATEGORY=anything_else
+CATEGORY_ETC=any_name_you_want

also set:
tagValue=Category.default={DEFAULT_CATEGORY_CONSTANT}
itemTags=#AudioFormat, DEFAULT_CATEGORY_CONSTANT

Thanks again for all the help! Big Grin
Find all posts by this user
Quote this message in a reply
10-11-2020, 10:46
Post: #8
RE: Select for empty field in indexTags?
This is an ingenious workaround for the current limitations of the indexTags property. It works but is not very easy to understand or set up. A better solution would be to add support in indexTags for something like:

Category=Classical:Classical Library^etc:any_name_you_want^:Default

I will look into adding this support.
Find all posts by this user
Quote this message in a reply
11-11-2020, 02:12
Post: #9
RE: Select for empty field in indexTags?
(10-11-2020 10:46)simoncn Wrote:  This is an ingenious workaround for the current limitations of the indexTags property. It works but is not very easy to understand or set up. A better solution would be to add support in indexTags for something like:

Category=Classical:Classical Library^etc:any_name_you_want^:Default

I will look into adding this support.

I'm very pleased with the way this workaround has worked out for me, but yes, it was a bit involving to set up, and it also included a search through my collection for all the various music formats.

I look forward to future updates on both this and the Album Set functionalities. Smile
Find all posts by this user
Quote this message in a reply
11-11-2020, 10:09
Post: #10
RE: Select for empty field in indexTags?
(11-11-2020 02:12)Airman Wrote:  included a search through my collection for all the various music formats.

If you want an easy way to see all the tags and values you have in your music collection, use the writeAllTags option.

This doesn't however include the special index/item MinimServer tags e.g. #AudioFormat, the easiest way to see those would be to put them into indexTags and view the values from the control point.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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