esa wrote:
>
> If I understand, I should disable the MusicBrainz (MB) parameter to
> avoid duplicates in "Last played Song"?
>
Yes, I think the musicbrainz setting in TrackStat is causing this.
And if you want to get rid of existing duplicates it's not enough to
just uncheck it, you need to go through the backup, clear, restore
procedure I explained previously to get rid of any existing duplicates.
esa wrote:
>
> Actually, I use it to :
> 1) avoid playing the same song twice (I use SQLPLaylist). So, if I
> understand, I need to tag my file with a unique ID and I need to enable
> this parameter.
>
The musicbrainz setting in TrackStat doesn't have any effect on this, in
fact, as far as I can see in the source code musicbrainz tags shouldn't
have any effect on this at all. The logic to avoid adding the same song
twice only looks at the path/url and not on the musicbrainz tag.
However, if you are talking about the "Ignore songs played recently"
settings in SQL Playlist or "Not recently played" playlists in
TrackStat, that might actually be working (by accident) through
musicbrainz tags as described below.
esa wrote:
>
> I also use MB to manage deletion of duplicates files but it will take a
> very long time with more than 40000 songs.
>
There is no problem to have musicbrainz tags in the files, you just need
to disable the trackstat settings so they won't be used by TrackStat.
I'm not sure how you manage deletion of duplicates but I'm guessing it's
done through the musicbrainz tags in the files and not through the
TrackStat plugin ?
esa wrote:
>
> 2) Rate the duplicate songs based on this unique ID (if I play only one
> instance of a duplicate song, then the two files are rated). Is it
> correct?
>
Correct, here musicbrainz tags are used, but the fact that it works is
pure luck because most of the logic has been designed on the fact that
musibrainz is globally unique, so it probably also have some unexpected
side effect which we haven't realized yet. Musicbrainz tags were
globally unique for a certain track on a specific album previously but a
few years back musicbrainz.org change the definition to make it identify
the recording rather than the track, which results in that the same
recording which exists both on a compilation album and a normal album is
no longer globally unique. If this had been the case when TrackStat
functionality was implemented I would never have used it in TrackStat,
but this part of TrackStat was implemented before this change and at the
moment there isn't any good alternative to switch to instead of using
musicbrainz tags.
esa wrote:
>
> So, I think I must keep this parameter enabled if I want the
> functionalities?
>
If you get a lot of duplicates, I would suggest that you disable it, the
duplicates are mostly likely going to cause you more trouble than then
benefits you get by having it active.
esa wrote:
>
> The most important, is that I thought it will avoid duplicates listening
> of the same song (based on this unique ID), but I'm no more sure of
> that.
> I think I have misunderstood that point.
>
> I created a DynPlaylist to play a folder but I don't want to hear twice
> the same song (ifnull(track_statistics.playcount,0)=0).
>
> Maybe should I add into the query a condition "NEVER rated song" in
> combination with the "automatic rating" in TrackStat? In this case a
> rated song (including the duplicates) will not be played twice. Is it
> what I must do?
>
> I would also limit the period to 2 year. The song can play if the song
> was played 2 year ago. How can I do this?
>
If you with "same song" mean that you consider a song that exists both
on a compilation album and a normal album as the same song, it means
that you need to rely on musicbrainz tags.
The best way to realize something like this would be to use SQL Playlist
plugin and create a playlist where you have customzied the SQL to your
liking.
The "Random Songs" playlist template in SQL Playlist plugin should get
you fairly close as it has a parameter to ignore songs played recently
(within 1 year maximum) and if you customize the SQL you can configure
it to more than a year.
A playlist like this in SQL Playlist would play random songs which
haven't been played within 2 years:
Code:
--------------------
-- PlaylistName:Random songs not played within 2 years
-- PlaylistGroups:
select tracks.url from tracks
left join dynamicplaylist_history on
tracks.id=dynamicplaylist_history.id
left join track_statistics on
tracks.url=track_statistics.url
where
audio=1
and dynamicplaylist_history.id is null
and
ifnull(track_statistics.lastplayed,0)<(unix_timestamp()-63072000)
order by rand()
limit 10;
--------------------
But this will be based on the track url/path so it will still play both
the track from a normal album and a compilation album when you disable
the musicbrainz setting in TrackStat.
It might be possible to join with track_statistics using musicbrainz_id
somehow, but I'm not sure if that's going to do the right thing if there
are multiple entries of the track, especially since you will have
multiple entries with different lastplayed values in case you have
musicbrainz setting in TrackStat disabled.
esa wrote:
>
> Other question about duplicate : In SQL query into Trackstat, would it
> be possible to add the command "DISTINCT" to avoid duplicate on song
> title ?
>
Maybe, but it won't really solve the problem because the database will
be filled with duplicates and this will result in performance issues
after a while if you have a lot of duplicates.
The only solution for the duplicate problem I can provide at the moment
is to disable the musicbrainz setting in TrackStat according to my
previous post.
Erland Isaksson ('My homepage' (http://erland.isaksson.info))
(Developer of 'many plugins/applets (both free and commercial)'
(http://wiki.slimdevices.com/index.php/User:Erland).
If you like to encourage future presence on this forum and/or third
party plugin/applet development, 'consider purchasing some plugins'
(http://license.isaksson.info))
You may also want to try my Android apps 'Squeeze Display'
(https://play.google.com/store/apps/details?id=info.isaksson.squeezedisplay)
and 'RSS Photo Show'
(https://play.google.com/store/apps/details?id=info.isaksson.rssphotoshow)
*Interested in the future of music streaming ? 'ickStream - A world of
music at your fingertips'
(http://forums.slimdevices.com/showthread.php?98467-Pre-Announcement-ickStream&p=743516)*.
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=49483
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins