Skip to main content

Topic: Customize Upnp Media Library Tree (Read 6344 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • vanMiez
  • [*]
Customize Upnp Media Library Tree
Hi guys,

i'm currently trying to improve my home media network where foobar (v 1.1) with foo_upnp (0.99.29) is my upnp music server. The problem is that the media library tree doesn't really fit my needs.

i want to achieve the following structure displayed in the connected media players (nokia hd-1):

- "Media Library"
    [blockquote]- "Album"[/blockquote]
        [blockquote][blockquote]- "A"[/blockquote][/blockquote]
            [blockquote][blockquote][blockquote]- %album% //all albums beginning with "a"[/blockquote][/blockquote][/blockquote]
        [blockquote][blockquote]- "B"[/blockquote][/blockquote]
            [blockquote][blockquote][blockquote]- %album% //all albums beginning with "b"[/blockquote][/blockquote][/blockquote]
        [blockquote][blockquote]...[/blockquote][/blockquote]
    [blockquote]- "Album Artist"[/blockquote]
      [blockquote][blockquote]- "A"[/blockquote][/blockquote]
          [blockquote][blockquote][blockquote]- %album artist% // first beginning with "a"[/blockquote][/blockquote][/blockquote]
                [blockquote][blockquote][blockquote][blockquote]- %album%[/blockquote][/blockquote][/blockquote][/blockquote]
                [blockquote][blockquote][blockquote][blockquote]- %album%[/blockquote][/blockquote][/blockquote][/blockquote]
          [blockquote][blockquote][blockquote]- %album artist% // second beginning with "a"[/blockquote][/blockquote][/blockquote]
                [blockquote][blockquote][blockquote][blockquote]- %album%[/blockquote][/blockquote][/blockquote][/blockquote]
          [blockquote][blockquote]...[/blockquote][/blockquote]
    [blockquote]- "Genre"[/blockquote]
        [blockquote][blockquote]- "Alternative"[/blockquote][/blockquote]
            [blockquote][blockquote][blockquote]- %album%[/blockquote][/blockquote][/blockquote]
            [blockquote][blockquote][blockquote]- %album%[/blockquote][/blockquote][/blockquote]
        [blockquote][blockquote]- "Rock"[/blockquote][/blockquote]
            [blockquote][blockquote][blockquote]- %album%[/blockquote][/blockquote][/blockquote]
        [blockquote][blockquote]...[/blockquote][/blockquote]
    [blockquote]- "Audiobooks" // %genre%=="audiobook" or "speech"[/blockquote]
        [blockquote][blockquote]- %album artist%[/blockquote][/blockquote]
              [blockquote][blockquote][blockquote]- %album%[/blockquote][/blockquote][/blockquote]
              [blockquote][blockquote][blockquote]- %album%[/blockquote][/blockquote][/blockquote]
        [blockquote][blockquote]- %album artist%[/blockquote][/blockquote]
              [blockquote][blockquote][blockquote]- %album%[/blockquote][/blockquote][/blockquote]
        [blockquote][blockquote]...[/blockquote][/blockquote]
    [blockquote]- %folders%[/blockquote]
- "Playlists"

So, is it possible to achieve this or at least something similar, or am i trying to get to much.
  • Last Edit: 08 October, 2010, 06:23:21 AM by vanMiez

  • bubbleguuum
  • [*][*][*][*][*]
  • Developer
Customize Upnp Media Library Tree
Reply #1
The Media Library tree is defined in file foo_upnp_ml_tree.xml found in your foobar2000 profile directory. This directory
can be in different location depending on the version of Windows an type of installation (let me know if you need instructions on how to find it).

Just create (or replace) file foo_upnp_ml_tree.xml with the following content:
Code: [Select]
<MediaLibraryTree>
    <SubTree label="Albums">
        <spec type="object.container.album.musicAlbum">%album%[ '['%album artist%']']</spec>
    </SubTree>
    <SubTree label="Album Artists">
        <spec type="object.container.person.musicArtist">%album artist%</spec>
        <spec type="object.container.album.musicAlbum">%album%</spec>
    </SubTree>
    <SubTree label="Genres">
        <spec type="object.container.genre.musicGenre">%&lt;genre&gt;%</spec>
        <spec type="object.container.album.musicAlbum">[%album artist% - ]%album%</spec>
    </SubTree>
    <SubTree label="Audiobooks" query="genre IS audiobook OR genre IS speech">
        <spec type="object.container.person.musicArtist">%album artist%</spec>
        <spec type="object.container.album.musicAlbum">%album%</spec>
    </SubTree>
    <SubTree label="Folders" type="filesystem"/>
</MediaLibraryTree>


To enable A-Z splitting you'll need to enable "Split nodes by first letter if more tha 0 items" in File>Preferences>Tools>UPnP>Server>Content.
You may also want to uncheck "Show Playback Stream Capture" if you do not want this in the root node.

After those modifications restart the server (or foobar2000).
  • Last Edit: 08 October, 2010, 06:58:38 PM by bubbleguuum

  • vanMiez
  • [*]
Customize Upnp Media Library Tree
Reply #2
GREAT!!!

thank you very much...
is it somehow possible to make the "split nodes" not global but for all subtrees except the audiobook subtree? problem is that the "split nodes" in the audiobook subtree would put all episodes of a series together in a folder "0-9" if the episodes are called eg: "01: the beginning", "02:sequel".
Or is it at least possible to define an entry point to the filesystem node, because that would make it possible to jump directly to the audiobooks folder wich is (in my case) structured very well and i could achieve it that way.

thx

  • bubbleguuum
  • [*][*][*][*][*]
  • Developer
Customize Upnp Media Library Tree
Reply #3
GREAT!!!

thank you very much...
is it somehow possible to make the "split nodes" not global but for all subtrees except the audiobook subtree? problem is that the "split nodes" in the audiobook subtree would put all episodes of a series together in a folder "0-9" if the episodes are called eg: "01: the beginning", "02:sequel".
Or is it at least possible to define an entry point to the filesystem node, because that would make it possible to jump directly to the audiobooks folder wich is (in my case) structured very well and i could achieve it that way.

thx


I'll make the split node option overridable per node, in the XML. Initially this option was a global toggle intended for use with the PS3
that is limited in the number of nodes it will list.
Btw 0 is not a valid value for the "Split nodes by first letter if more ..." option. You must set a value of 1 or greater.

  • vanMiez
  • [*]
Customize Upnp Media Library Tree
Reply #4
Quote
I'll make the split node option overridable per node, in the XML.


that sounds great and i can't wait to give it a try. thank you for this.

Am i right that media added new to the library won't show up on upnp devices until foobar is restarted?
Is there a list containing all commands usable with foo_upnp and explaining them  or a How-To?
  • Last Edit: 09 October, 2010, 01:59:18 PM by vanMiez

  • vanMiez
  • [*]
Customize Upnp Media Library Tree
Reply #5
cause i'm from germany i would rather use 'Hörbuch' instead of 'Audiobook' but i couldn't manage to get this to work.
it is definetly a problem with the 'ö' cause everything else is working fine. how can i get this to work?

please help me...  again 

  • bubbleguuum
  • [*][*][*][*][*]
  • Developer
Customize Upnp Media Library Tree
Reply #6
cause i'm from germany i would rather use 'Hörbuch' instead of 'Audiobook' but i couldn't manage to get this to work.
it is definetly a problem with the 'ö' cause everything else is working fine. how can i get this to work?

please help me...  again 


You can use this table to map chararcters > 127 to xml codes:

in your case, ö  is coded by & #246; (remove the space between & and #)
  • Last Edit: 11 October, 2010, 04:22:19 PM by bubbleguuum

  • John Doe
  • [*][*][*]
Customize Upnp Media Library Tree
Reply #7
This is a very old thread, but I think it's better than creating a new one.

My question:

I'd like to add a node that shows the %added% / $if2($cut(%added%,10)) value. But I can't manage to create it.

Does anyone know how to achieve that?

Thank you very much.

JD

  • John Doe
  • [*][*][*]
Customize Upnp Media Library Tree
Reply #8
Ok I managed myself. The problem was that for some reason the add-on did not update the xml file or used another one from my computer.
Well I reinstalled the add-on, deleted the old xml and added this line to the new xml file:

Code: [Select]
    <SubTree label="Added">
        <spec>$if2($cut(%added%,4),old|)</spec>
        <spec>$if2($cut(%added%,7),old|)</spec>
        <spec>[%album artist% - ]%album%</spec>
    </SubTree>


And that works well on my PS3.

Thanks for foo_upnp.

JD
  • Last Edit: 26 May, 2012, 05:56:37 AM by John Doe

  • bmcelvan
  • [*]
Customize Upnp Media Library Tree
Reply #9
I have a request and I don't know whether to start a new post or just ask here since it's very close to being the right place. Using the Media Server function of foobar, I want to be able to select "genre", then select the one I want and then like artists already do after you've selected one, select "All Tracks" so that all the tracks in the library with that genre will play regardless of artist, album, etc. It works fine on the PC itself using the foobar program but I am trying to do this over the server function from my receiver. When I select the Foobar media server, it gives me all the "normal" options, album, artist, album artist, yeah, genre, etc. I want to be able to select a certain genre and play them all. It seems like an easy thing to re-write the code for seeing that when you clikc on artist, and pick one it gives you the option "All tracks." However after looking at the "customize media library tree..." in the advanced settings in the content tab,  there isn't anything that says "all tracks."

I ended up starting a new post so if you want me to delete this post please tell me to do so.

Please help and thanks

Ben
  • Last Edit: 10 January, 2013, 08:38:18 PM by bmcelvan

Customize Upnp Media Library Tree
Reply #10
Hi guys,

I would like to add a new entry to the UPNP Media Library Tree

"Label" (for record labels, file tag "<label>" in foobar)

and under this entry should be viewed an artists sub entry and in this then the albums of this artist
or only
Label and then in it
artist - album

Any help or solutions would be very nice!

  • tommi_a
  • [*]
Re: Customize Upnp Media Library Tree
Reply #11
@bubbleguuum
I'd like to add a selection by Composer in the media library tree by adding those lines to foo_upnp_ml_tree.xml:
<SubTree label="Composers">
<spec type="object.container.person.composer">%composer%</spec>
<spec type="object.container.album.musicAlbum">%album%</spec>
</SubTree>
In the console I get this error message:
foo_upnp: 1319.1319846: media_tree_ml_filter_spec::parse(313)/3512: SEVERE: <spec> element in SubTree 'Composers' has unknown attribute type: object.container.person.musicComposer

How can I add the composer?
Seems I'm not aware of the possible attribute types. Is there a list of supported ones?

Your help is kindly appreciated.

Thanks

  • tommi_a
  • [*]
Re: Customize Upnp Media Library Tree
Reply #12
@bubbleguuum
I'd like to add a selection by Composer in the media library tree by adding those lines to foo_upnp_ml_tree.xml:
<SubTree label="Composers">
<spec type="object.container.person.composer">%composer%</spec>
<spec type="object.container.album.musicAlbum">%album%</spec>
</SubTree>
In the console I get this error message:
foo_upnp: 1319.1319846: media_tree_ml_filter_spec::parse(313)/3512: SEVERE: <spec> element in SubTree 'Composers' has unknown attribute type: object.container.person.musicComposer

How can I add the composer?
Seems I'm not aware of the possible attribute types. Is there a list of supported ones?

Your help is kindly appreciated.

Thanks
@bubbleguuum gave the answer to this:
replace object.container.person.composer by object.container.person.musicArtist

Thank you!

Re: Customize Upnp Media Library Tree
Reply #13
I'm still looking for a solution to add the Label (Tag & Rename) or Publisher (Foobar) tag to the Media Liibray Tree,
This is what I added:
<SubTree label="Labels">
<spec>%<publisher>%</spec>
<spec type="object.container.person.musicArtist">%artist%</spec>
<spec type="object.container.album.musicAlbum">%album%</spec>
</SubTree>

It isn't working, maybe this "publisher" line has to look different?

Any suggestions are appreciated
  • Last Edit: 03 May, 2016, 07:46:47 AM by belphegore

  • Qwghlm
  • [*]
Re: Customize Upnp Media Library Tree
Reply #14
what kind of files do you use?
maybe you have problem with "Tag field mappings"
for example http://help.mp3tag.de/main_tags.html

Re: Customize Upnp Media Library Tree
Reply #15
Mostly my files are in FLAC.
I have only a few MP3s and other.


 
  • Last Edit: 05 May, 2016, 11:27:53 AM by belphegore

  • Qwghlm
  • [*]
Re: Customize Upnp Media Library Tree
Reply #16
Something like this

FLAC has it's own native tagging system which is identical to that of Vorbis. They are called alternately "FLAC tags" and "Vorbis comments". It is the only tagging system required and guaranteed to be supported by FLAC implementations.

Check your tag editor properties => Advanced => Tags: Map APE/OGG "Label" tag...

It seems that Tag&Rename save your 'Label' value in ORGANIZATION field and it is default for the FLAC standart

1)
Try in foobar2000 'preferences' => Display => Properties dialog =>Standard fields:
and add mapping
Publisher=ORGANIZATION;
2)
or press button in properties => Advanced => Tags: Map APE/OGG "Label" tag
and use Label=LABEL; in foobar2000 'preferences'

You can see all metadata fields and their values in properties of file in foobar2000
  • Last Edit: 06 May, 2016, 04:45:35 AM by Qwghlm

Re: Customize Upnp Media Library Tree
Reply #17
It seems that Tag&Rename save your 'Label' value in ORGANIZATION field and it is default for the FLAC standart

Yes, that's right.
I changed it but I changed it also back because the label field is empty and I could not find any ORGANIZATION field.

1)
Try in foobar2000 'preferences' => Display => Properties dialog =>Standard fields:
and add mapping
Publisher=ORGANIZATION;

Done this in Foobar as you wrote.

2)
or press button in properties => Advanced => Tags: Map APE/OGG "Label" tag
and use Label=LABEL; in foobar2000 'preferences'

I could not find "Tags" under Foobar\Prefenrences\Advanced\
I can only find "Tagging" and then MP3, MP4 and Vorbis & FLAC
But 2) is only an alternative to 1) isn't it?

You can see all metadata fields and their values in properties of file in foobar2000

Okay now I see a field Publisher and <Publisher>.
  • Last Edit: 07 May, 2016, 06:07:38 AM by belphegore