[HOW TO] Library Node Examples

  Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
DaveBlake Offline
Team-Kodi Member
Posts: 2,145
Joined: Jun 2015
Reputation: 56
Location: South West England
Post: #61
So sorry Govnah, path is only available as a rule for albums type smart playlists and custom nodes in Kodi 17.

I did the one line code change that added this back in Sept 2015, but it turns out that it didn't get merged into Jarvis. I have been looking at dev code so much I can't remember clearly what is available when.

As a consolation guys I will add path as a rule for artists type playlists and nodes too (in 17, as 16 under RERO is now frozen). So jam tomorrow as always. For now in 16 all you can do is sort the songs by album Sad
find quote
Govnah Offline
Senior Member
Posts: 105
Joined: Nov 2010
Reputation: 0
Post: #62
(2016-06-02 19:06)DaveBlake Wrote:  So sorry Govnah, path is only available as a rule for albums type smart playlists and custom nodes in Kodi 17.

I did the one line code change that added this back in Sept 2015, but it turns out that it didn't get merged into Jarvis. I have been looking at dev code so much I can't remember clearly what is available when.

As a consolation guys I will add path as a rule for artists type playlists and nodes too (in 17, as 16 under RERO is now frozen). So jam tomorrow as always. For now in 16 all you can do is sort the songs by album Sad

Tested in Krypton and works fine. I understand that Jarvis is frozen which means no more code changes, but is this something that could be added via a config file (advancedsettings.xml i.e)?

Thanks

NP, thanks for the help and will wait for Krypton.
(This post was last modified: 2016-06-03 14:49 by Govnah.)
find quote
docwra Offline
Fan
Posts: 440
Joined: Nov 2014
Reputation: 16
Post: #63
Did the path rule get added for artists in the end?

I was looking at this and couldnt find it the other day.

[Image: cook.png] Formally chef Zag
find quote
BobCratchett Offline
Posting Enthusiast
Posts: 1,450
Joined: Jan 2015
Reputation: 148
Post: #64
You can certainly use the node editor to create artist-based-path-nodes (e.g. musicdb://artists/), or use artistid as a component for a path-based node (e.g. ?artistid=x) - I don't use Kodi for music, though, so can't say I've actually tested it.

What happened to Zag Huh
find quote
Don_black00 Offline
Junior Member
Posts: 29
Joined: Jan 2015
Reputation: 0
Post: #65
How can I create a music node from a addon for a weekly release.



https://github.com/michaelfdeberry/plugin.audio.datpiff
find quote
BobCratchett Offline
Posting Enthusiast
Posts: 1,450
Joined: Jan 2015
Reputation: 148
Post: #66
For video nodes, you can set 'Date Added' 'Within the last' x days, however, I'm not aware of any equivalent for music nodes - I suspect such would need adding to core.
find quote
DaveBlake Offline
Team-Kodi Member
Posts: 2,145
Joined: Jun 2015
Reputation: 56
Location: South West England
Post: #67
(2016-12-02 12:30)docwra Wrote:  Did the path rule get added for artists in the end?

I was looking at this and couldnt find it the other day.
Yes, you can add a path rule to an "artists" smart playlist in v17. An example filter type node would be

Code:
<?xml version='1.0' encoding='UTF-8'?>
<node order="2" type="filter" visible="Library.HasContent(Music)">
       <label>Artists Path Bax</label>
       <content>artists</content>
       <order direction="ascending">artist</order>
        <rule field="path" operator="startswith">
          <value>N:\MusicClassical\Bax\</value>
        </rule>
</node>

But I have to say I am a bit confused how to do that with the node editor. Bob Cratchett's comment relates to editing folder type custom nodes - they have a <path> entry, but that is totally different to a path rule in filter type nodes.

Edit: ah, "path" as a field when editing rules for an "artists" filter type node needs adding to the editor. Could you do that Bob? Similar to how content of songs and albums rules can have field path.
(This post was last modified: 2016-12-06 13:26 by DaveBlake.)
find quote
DaveBlake Offline
Team-Kodi Member
Posts: 2,145
Joined: Jun 2015
Reputation: 56
Location: South West England
Post: #68
(2016-12-05 23:40)Don_black00 Wrote:  How can I create a music node from a addon for a weekly release.

Unfortunately you can't without core changes, the file datetime ( what gets stored in "dateadded" regardless of when the music was first added to the library, because of the delete/insert approach) is not available as a playlist rule.

An addon could maybe use a JSON API call to get the RecentlyAdded... songs or albums, but not sure of the details to get that working.
find quote
docwra Offline
Fan
Posts: 440
Joined: Nov 2014
Reputation: 16
Post: #69
One from DaveBlake in another thread:

Show all albums but exclude any classed as a compilation
Code:
<?xml version='1.0' encoding='UTF-8'?>
<node type="folder">
    <label>Albums (No Compilations)</label>
    <icon>DefaultMusicAlbums.png</icon>
    <path>musicdb://albums/?compilation=false</path>
</node>

[Image: cook.png] Formally chef Zag
(This post was last modified: 2017-03-16 11:23 by docwra.)
find quote
leepenny Offline
Posting Freak
Posts: 779
Joined: Jul 2010
Reputation: 30
Post: #70
OK so I used zags very useful node for A to Z - brilliant BTW - added some icons and it looks really cool
[Image: screenshot133.png]

only problem I see is that movies with an article - e.g. 'A' or 'THE' aren't sorted correctly

Here is a screenshot of the movies beginning with 'T' - it would be nice to be able to have movies beginning with 'THE' or 'A' to be distributed correctly throughout the database

[Image: screenshot134.png]

I have 'ignore articles' turned on in settings so I'm not sure what to do - the rest of my database is cool and nicely spread out but the 'T' section is still a little large for quick browsing (315 items) - any ideas ?

Check out my Fanart.tv stuff!
...........I also accept disc requests if image not on fanart.tv database !!!!
find quote
poul_l322 Offline
Junior Member
Posts: 9
Joined: May 2017
Reputation: 0
Post: #71
thankyouuu for this,
find quote
clemmy Offline
Junior Member
Posts: 1
Joined: Jun 2015
Reputation: 0
Post: #72
Nice information here. Didn't know the existence of nodes but they look cool, I'll start experimenting over the next days.

However, I have already a question: how do they play with a library shared between multiple devices using MySQL database? Do I need to copy my custom XML over each device?
find quote
docwra Offline
Fan
Posts: 440
Joined: Nov 2014
Reputation: 16
Post: #73
(2017-05-10 08:10)clemmy Wrote:  Nice information here. Didn't know the existence of nodes but they look cool, I'll start experimenting over the next days.

However, I have already a question: how do they play with a library shared between multiple devices using MySQL database? Do I need to copy my custom XML over each device?

Yes you do

[Image: cook.png] Formally chef Zag
find quote
Post Reply