v14 Smart Playlist for Music Problem
#1
Hi everyone,

I'm quite new to Kodi and (after several days of tinkering) I am finally closing in on finishing my first Kodi setup. The problem is there's one thing left I want to achieve and I can't quite find a solution for it. So, I decided to bring it here to find any possible solutions.

The issue is with creating SMART PLAYLISTS for MUSIC. All I wanted was to create a smart playlist for songs "Last Played in the past X days". Like a 'history" playlist. But it seems I can't create a Smart Playlist that would follow the rules I set. I have tried many but not all settings for the Smart Playlist in the gui and all of them would give me the same output. And what's weird is when I check the contents of the default "recent played albums" it shows the same thing.

For my video smart playlists, everything's working fine. Another thing I noticed (related to music library) is that the error: "Script Failed!: Library Data Provider" shows up when I browse a particular music folder I added to my library. Could this be related to my smart playlist problem?

I really hope somebody can help me with this. This is the only thing left to finish my setup. Just tell me what you need me to provide for diagnosing this issue.

Thank you, in advance.
Reply
#2
Could you perhaps provide a little more background.

Firstly, I take it you have created a playlist that looks something like this:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="songs">
    <name>Test Last Played 30 Days</name>
    <match>all</match>
    <rule field="lastplayed" operator="inthelast">
        <value>30</value>
    </rule>
</smartplaylist>

What other rules are you trying to achieve? What exactly happens when you run that playlist - does it find anything? You say "all of them would give me the same output" - what does that mean, what output?

You could of course easily check if the failing folder is causing problems by removing it from the library and seeing if the playlist then works as you wish. I would suggest trying to solve one problem at a time.

As ever, attaching a debug log will probably help people to help you.
Reply
#3
Hi, WelshPaul. First off, Thank you for the quick response.

Yes, you're right. That's almost exactly what I was trying to create. The only difference is the value and I set Order by "Last Played/descending".

Okay, here's all the relevant (I think) background information much for my setup.


1) This is how I set up my music files for Kodi: I have two main folders for my music files which both are in my network storage (NAS). One is "Karaoke Colllection" and the other is named "MUSIC COLLECTION". They both have, at most, 2 levels of sub folders. Both of are added as two separate sources and scanned into my library.
Thus, their paths look like these:

(smb://TOWERCLOUD/Volume_1/Karaoke Collection)
(smb://TOWERCLOUD/Volume_1/MUSIC COLLECTION)

But I don't really know if all their contents are indeed scanned properly into the library because I'm still a bit confused as to how it exactly works. I'm saying this, because whenever I browse and check my music files in Kodi, the option "scan into library" is still shows in the context menu. (is it supposed to be that way?)

2) All contents of Karaoke Collection folder and most of the contents of MUSIC COLLECTION folder have modified tags (File Names, Title & Artist, Album info, Thumbnails). This is just how I want my media organized.

3) What I'm trying to achieve is to -- First, create a "last played" playlists for MUSIC COLLECTION, that I can add to the main menu for easy access. Some sort of a history list. Second, is to create also a "last played" playlist for Karaoke Collection. So, one for each folder/collection.

Here's what happened:

At first, after researching on how smart playlists work, I figured that aside from the Last Played rule I needed to add a Path rule (such as "Path is" or "Path starts with") to each so that the songs won't get mixed up. Then I wanted both of them "Ordered by last played, descending".

I played a couple of songs to test it but when I open the smart playlist it only shows a single ALBUM (named Tower One Karaoke Collection - The Beatles) from my Karaoke Collection folder which I didn't play. (or maybe I played it but I'm sure it was before I even created the smart playlist). And I didn't even set the playlist's "Type" to Albums, but Songs.

So, I removed the Path rule reverting it to just the Last Played rule thinking that it might be the reason for the error. Still, it shows the same thing -> "Tower One Karaoke Collection - The Beatles"

Not understanding what's happening, I deleted my smart playlist and checked the default lists in the kodi music library. When I opened the default "Recently played albums", again it showed the same album.

4) Just a few moments ago, like you suggested, I tried removing the folder/source "Karaoke Collection" (which seems to be the culprit) from the library. Ran the "Clean Audio Library" command, then the "Update library" command. Then did the process over, creating a new smart playlist with just the Last Played rule. Ran it and this time it showed nothing.

For safety, I removed the MUSIC COLLECTION folder/source as well, cleaned then updated library. Then I re-added one sub folder from MUSIC COLLECTION, scanned into library, repeated the smart playlist creation. Still, no luck.


That's the whole story, I guess. Sorry for the long post. I wanted to add every possible information I could to help solve the issue. I hope my explanation is understandable. Let me know if there's anything else I can provide.

Here's the debug log, BTW: http://xbmclogs.com/pekco2snt

Thanks a lot!
Reply
#4
OK, there's a few things to clarify here. First off, you're doing everything pretty much the same as me. I do my own tagging, use a couple of drives on a NAS like you, etc. So, nothing is too wrong.

Regarding your points:
1. Yes, scan to library will always show up, so don't worry about that. I use it when I've changed something off Kodi - such as rating tracks, I then just scan the album to library again to update it in Kodi without having to add folders again. So long as things show up in artists and albums view you're good to go.
2. That's fine, I do my own thing when it comes to tagging too, though at some stage you will want to check your tags as it does seem as if you have got Tower One Karaoke Collection set as the album artist (see line 4749 of the log).
3. No problem - should work.
4. You evidently did play the Beatles, per the log entry mentioned above. Of course when you remove a folder and clean the library it will lose the history of when you last listened to something, so it's not surprising the playlist is empty when you re-scan.

Now, what may be wrong. Can you confirm whether you are accessing the playlist from a home screen shortcut you've set up in Aeon Nox, or are you going through the music library the regular long way. If it's the former would you mind temporarily changing the skin back to the default confluence playing a few tracks. and then running the smart playlist via music library. The reason I'm asking this is I know that the homescreen shortcut method is not working properly in Aeon MQ6 (I reported it but never got a reply http://forum.kodi.tv/showthread.php?tid=...pid2080704). Wondering if maybe it's the same problem in Aeon Nox Silvo.

If you could try that and let us know if the playlist works in basic Confluence mode.If not, we'll try something else.
Reply
#5
Thanks! It's good to know I'm not doing anything with the folders' setup.

I did check the tags, as suggested, and everything seems in place."Tower One Karaoke Collection" set as the Album Name, "The Beatles" as the Artist, and left Album Artist blank.

About number 3., I forgot to mention that the log was recorded after I found out about the issue so I could attach it here as reference. I replicated the previous actions and processes for the purpose of logging the errors, including running the playlist with the Beatles album. That's why it appears in the log.

Regarding the empty playlist, what I did was remove the folder, clean the library, re-loaded the folder and scanned it to the library then created a new Last Played smart playlist, after which, I tested it by playing a few songs from that re-added folder. I opened the smart playlist to check if the songs I played were registered in the list, but it doesn't show anything.

(2015-08-26, 16:10)WelshPaul Wrote: Now, what may be wrong. Can you confirm whether you are accessing the playlist from a home screen shortcut you've set up in Aeon Nox, or are you going through the music library the regular long way. If it's the former would you mind temporarily changing the skin back to the default confluence playing a few tracks. and then running the smart playlist via music library. The reason I'm asking this is I know that the homescreen shortcut method is not working properly in Aeon MQ6 (I reported it but never got a reply http://forum.kodi.tv/showthread.php?tid=...pid2080704). Wondering if maybe it's the same problem in Aeon Nox Silvo.

If you could try that and let us know if the playlist works in basic Confluence mode.If not, we'll try something else.

Actually, both. I've tried accessing it through a home screen shortcut, and the regular long way. Another thing to consider, I guess, is that I've successfully created a similar smart playlists for my movies and tv shows. I even added them as shortcuts and widgets on the home screen and they work perfectly.

Okay, I'll try changing the skin to Confluence and see what happens. I'll give an update right away.

Really appreciate your help.
Reply
#6
Sorry, misunderstood about the log. Someone cleverer than me will be able to confirm, but I think the last played field in the music database only gets populated if you've listened to the whole of the track. I guess it's a bit like the 'watched' tick mark on a film or tv show only appearing if you've watched the whole thing and not ducked out before the end of the credits. At the end of playing a track you should get a message in your log (if debugging is enabled) saying something like:
Code:
Marking audio item musicdb://albums/1923/35171.mp3?albumid=1923 as listened
So, this is I think why in your re-run after cleaning the database nothing is showing up in the playlist. Could you let a few tracks run through completely and then have another look to see what's happening.

Paul
Reply
#7
(2015-08-27, 20:01)WelshPaul Wrote: Sorry, misunderstood about the log. Someone cleverer than me will be able to confirm, but I think the last played field in the music database only gets populated if you've listened to the whole of the track

It's less than 100%, maybe >80% but just guessing. Also agree running Confluence skin removes a lot extraneous data from log.

scott s.
.
Reply
#8
Hi WelshPaul, scott967! Sorry for taking so long to reply.

Never thought about that. Thanks for pointing out. I didn't have any idea that it works that way. BTW, just an update, I have tried what Welsh previously suggested > reverting the skin to Confluence. It gave out the same results.

Anyway, okay, I'm gonna try playing a few tracks to the end. I hope this one solves it. I'll give an update soon.

Again, thanks so much for helping me out, guys! TBH, this is my first time to join a forum and I really really appreciate how responsive the community is.
Reply

Logout Mark Read Team Forum Stats Members Help
Smart Playlist for Music Problem1