v15 big smartplay list are not random in partymode
#1
Dear forum,

this is my setup

system
-----------
kodi 14.2 helix
rasberry pi B
OE 5.08
collection
--------------
100k flac / mp3 music collection
17k music within popular genre


smartplaylist
------------------
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="songs">
<name>Popular</name>
<match>all</match>
<rule field="genre" operator="startswith">
<value>Popular</value>
</rule>
<rule field="time" operator="lessthan">
<value>06:00</value>
</rule>
<rule field="rating" operator="lessthan">
<value>1</value>
</rule>
<rule field="lastplayed" operator="notinthelast">
<value>2days</value>
</rule>
<order direction="ascending">random</order>
</smartplaylist>


Problem:
------------
Normally I play in party mode the popular smartplaylist continuously.
(I like mu popular kodi radio station without news or dj)

The problem
------------------

I noticed that if i do not limit the number of items ; kodi takes a long time to switch between songs
In stead of a nice crossfading I have a blank of easily 10 seconds
To be able to crossfade I must have at most 50 perhaps 100 items.
But then I noticed that the selection is not random any more;

From the filling glasses and mixing drinks image metaphor I imagine that the glasses are filled with 50 à 100 files that are first in the DB and then there is a mix and the first is picked and added ?

I have a crontabs that already generates basic m3u playlists using find and randomizing them.
However this is file based. And I need the metadata to filter on rating, duration, ...
Unfortunately you cannot go from m3u to smartplaylists to do the flitering

Any ideas how I can solve this ?
- am i overseen something with the random problem ?
- could i generate a basic m3u from the kodi db via crontab jobs ?

Already a big thank you for your ideas, help, support

µarc
Reply
#2
Moved to general forum as I don't know much about this, and any solution won't be Pi specific.
Reply
#3
Just an update;

I reconstructed the sql query from the smart playlist directly in sqlite
Copied the (random) result into a m3u file.

For performance reason i automatically select (randomly again) a 1000 songs after reboot from this list and use autoplay (confluence) to launch tihis reduced playlis.

The result is a good :

3 minutes to generate m3u from sql
20 seconds to get the reduced playlist
Good crossfading (no blanks)

And ...

Music is really random !


PS : I've done some code (kodi) reading; And as far as i could understand the random() from sqlite is used.
So it is a mystery why smartplaylists are not random


Comments ? anybody ?

thx in advance !
Reply
#4
I can't provide any answer to your issue on Pi, but if it's any help I replicated your smart playlist on both my windows laptop and AFTV, except of course that I don't have genre = popular so omitted that. I access songs from a NAS using wifi and the total playlist I created was just over 23,000 tracks. I didn't limit the track count in the party mode playlist. On both machines it took about 15 seconds to start playing the playlist in party mode and about 30 seconds to display the playlist if I wanted the full list. There's absolutely no delay between tracks once playback is underway.
So, I would suggest it has got something to do with your hardware set up.

You're not really clear about whether this used to work for you but has somehow changed behaviour, and it may help if you explain how you store and access your songs.
Reply
#5
Thank you for your answer.
It started me testing again and finally I restarted from scratch

to anwer your questions :
- raspberry pi is about 8x times slower then AFTV
- the cpu indicated 95 cpu
- media are on a local usb disk

It used to work but once I noticed the non-randomness I started testing I made modifictions to skins, smartplaylists and add-ons....

So best to start from scratch and try to reproduce :

- I installed OE 6.0 which uses kodi 15.2
- rsync add-on added
- Confluence is the only skinn
- partymode and slideshow are started via autoexec.py
(their content is setup using shell scripts scheduled with cron)

CPU is about 40% with peaks to 70% during crossfading
Slideshow has practically no effect on cpu


Compared to previous installation there are no extra skinns and also no fanart.
Probably this fanart drives the cpu to and over 100% exactly at the moment of crossfading.

I'm not willing to install fanart (or another skinn) for the moment, as I'm not sure I will be able to remove everything after.

In each case it works fine now and I was complaining about the non-randomness


Well I was wrong, the partymode or smartplaylists work fine if you accept the limitations of notinthelastdays query partymode

lastplayed" operator="notinthelast"> <value>X days</value> does not behave as expected.
Tracks that never have been played (null value for lasplayeddate ?) are excluded from the result where semantically you should expect them to be present
this feels like something that has to be reported as (a bug/an issue)

The result is that my smartplaylist only played a few 1000 songs already played manually.

During tests I rescanned the media folder probably resetting the lastplayedate to null and making things worse


Thank you for your help once again.
Reply

Logout Mark Read Team Forum Stats Members Help
big smartplay list are not random in partymode0