Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Playlist-Tools-SMP (Read 2232 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Playlist-Tools-SMP

Reply #25
Was a one line problem.

Line 56 -> (filter empty queries)
Code: [Select]
const query = query_join(queryArr.filter(Boolean), "OR");

Feel free to totally delete the AUDIOMD5 tag if you don't use it. It's not required at all.

And this will be the readme, hope it's clearer now.
Quote
Alternative to foo_playlist_revive.
Playlist Revive makes dead items in a playlist alive again by replacing them with the matching ones in media library.
A handy utility for those who often move or rename their media files/folders.

Querying:
   - TITLE
   - AUDIOMD5 (tag from foo_md5 if found) (*)
   - MD5 (tag from foo_md5 if found) (*)

Matching (rules by order):
   - Audio MD5 (file info) (Exact Match) (*)
   - AUDIOMD5 (tag from foo_md5 if found) (Exact Match) (*)
   - MD5 (tag from foo_md5 if found) (Exact Match) (*) (**)
   - TITLE + Length + Size (Exact Match)
   - Tags (Similarity)

Usage:
   - Select the tracks in the relevant playlist.
   - Apply script (using a button, menu entry, main menu SMP, etc. associated to it).
   - The tools allow to only replace with exact matches or by some similarity threshold.
   - 'Simulate' options just simulates the processing, does nothing but reporting you -planned- changes.
   - The console always reports the tracks changed and info, contrary to what foo_playlist_revive plugin did.

(*) Audio MD5 is a feature of some formats which store audio checksums as part of their file info.
That's different, although similar, to a tag named AUDIOMD5 (or MD5) by foo_md5 plugin.
On the first step -querying-, the tag is used if available (it's not a requisite).
On the second step -matching-, the file info is used if available (for some formats), if it's not found
then it tries the tag counterpart. If it's not found it tries the next rule, ...
(**) foo_md5 plugin lets you configure the tag name. I use those 2 as possible names to look for.
Plugin can be found here: https://foobar.hyv.fi/?view=foo_audiomd5
Note that for formats having CRC checks (like flac), you can also get an md5 tag with mass tagger scripts:
$info(md5) -> copy -> AUDIOMD5
You can find such preset at '.\presets\Masstagger'


Re: Playlist-Tools-SMP

Reply #26
 Yes, now it makes sense, thanks for explaining. I downloaded the file and I tested again, this time it works ( even without  AUDIOMD5, as you said) but another problem appears : the other songs in the playlist disappear,  only the fixed song remains.

Re: Playlist-Tools-SMP

Reply #27
Songs not "dead" are removed or the dead songs not revived are removed from the list?

Can't reproduce any of those cases. Have tried with a playlist with:

- Tracks on library.
- Dead items but with alternative on library.
- Dead items with no match.

After reviving playlist, with selection or entire playlist, all items are the same on the playlist. Dead ones are substituted, but that's all. The one without match is left, the same than the other tracks

Re: Playlist-Tools-SMP

Reply #28
A problem about playlist revive.....When I move a file from a partition to another partition , let's say D\music to E\music (obviously the folders are included in the media library) or when I rename a folder this is what happens

Playlist Tools - Other Tools - Playlist Revive - Replace dead items on selection (or if I use Replace dead items on current playlist), I have this kind of errors :

Query not valid. Check query:
(title IS I Will Always Love You) OR (undefined)

I don't know why but I can't revive dead items in a playlist....

Problem number 2.
Most played tracks from.....from last -- 1 week (for example)
It seems that songs that have a high playcount are favoured, so they get at the top of the playlist
I'll give you this example: Let's say that in the last week I have listened Bon Jovi - Always , ONLY once, BUT the total playcount for this song is 30.
This week I also listened Madonna - Frozen , 10 times BUT the total playcount for this song is 12.
The conclusion:  Most played tracks from last week will look like this :
Bon Jovi - Always (playcount in a week :1 , total playcount : 30)
Madonna - Frozen (playcount in a week :10 , total playcount : 12)
I think it should be exactly the opposite, like this :
Madonna - Frozen (playcount in a week :10 , total playcount : 12)
Bon Jovi - Always  (playcount in a week :1 , total playcount : 30)

I tested on a few songs and it's the same. This way Most played tracks from.....from last -- 1 week (or other period) it's a bit useless because I'll see songs with high playcount at the top (obviosly if I played those songs with high playcount in the selected period), it doesn't reflect the reality. Maybe you can fix it
As I said in the other post , I used the last version of the scripts, portable Foobar 1.6.6 , clean install, only SMP ( vers. 1.4.1) installed

Revising the code of top tracks from... everything seems to be right. They are indeed sorted by playcount, but the count is taken from the period.

Could you send me 2/3 tracks with those tags (with play timestamps) to check? I'm currently on a system without enhanced statistics, so can not check that part!

Re: Playlist-Tools-SMP

Reply #29
This is what I do : I make a playlist with songs from library
Then I move a song in a new folder that I create (the created folder is in library, on the same drive) , or I just simply move a song from one drive (let's say D\Music) to another drive (E\Music), both on library

Songs not "dead" are removed . The only song that remains in the playlist is the revived item( song) . So, the ''dead" song is successful
revived, BUT the other not dead songs are removed . All songs are in library,


"- Dead items with no match.""

If I try this all songs remain in the playlist , but obviously it's useless
I've sent you a message with a gif


Yes, I'll send you 2 tracks in 20-30 minutes

Re: Playlist-Tools-SMP

Reply #30
The playlist revive is done now. Thanks for the gif... you see selecting the culprit or all changed totally the behavior, would have not found the problem without it.

Check latest file :)

PD: has also fixed another related bug
Quote
- Other tools\Playlist Revive: undefined queries when file didn't had AUDIOMD5 tag (from foo_md5) are now skipped. The plugin was never a requirement, but an extra to find faster matches by query. If you use the plugin, their tags will also be used; otherwise, the tool queries by title and compares md5 file info first (if avalaible) or file size (for exact match) and then all tags to compute similarity.

- Other tools\Playlist Revive: reviving selection (instead of entire playlist) no longer outputs only the selected items, but recreates the entire playlists; dead items with matches are replaced and dead items without a match or other items are left untouched. Current item selection will also remain selected after processing.

- Other tools\Playlist Revive: bug on reviving All playlists which made only active playlist to be actually changed (the rest was analyzed but not touched).

Re: Playlist-Tools-SMP

Reply #31
This week I also listened Madonna - Frozen , 10 times BUT the total playcount for this song is 12.
The conclusion:  Most played tracks from last week will look like this :
Bon Jovi - Always (playcount in a week :1 , total playcount : 30)
Madonna - Frozen (playcount in a week :10 , total playcount : 12)
I think it should be exactly the opposite, like this :
Madonna - Frozen (playcount in a week :10 , total playcount : 12)
Bon Jovi - Always  (playcount in a week :1 , total playcount : 30)

I tested on a few songs and it's the same. This way Most played tracks from.....from last -- 1 week (or other period) it's a bit useless because I'll see songs with high playcount at the top (obviosly if I played those songs with high playcount in the selected period), it doesn't reflect the reality. Maybe you can fix it
As I said in the other post , I used the last version of the scripts, portable Foobar 1.6.6 , clean install, only SMP ( vers. 1.4.1) installed

Solved. Was a really stupid typo I made at some point while refactoring the code at a later release... I was substracting current date to played dates, instead of doing the opposite. So it was in fact reporting tracks less played -but at least played once- in the given period hahahaha (*). Resulting in playcounts -within the given period- from low (top) to high (bottom). Having an absolute playcount track at top was just a coincidence on your library.

Btw the files did not prove useful at all because the statistics are saved within foobar config and not the files. But anyay it's solved now.

Replace at .\main\top_tracks_from_date.js

(*) Not sure if such function has any utility btw. Usually we want to find the most played tracks... but maybe it has some use to revisit tracks played less on a given period (?)

Re: Playlist-Tools-SMP

Reply #32
Yay, great that it's solved :) Well, I remember that I saw Moya Brennan - Show Me , at the top of the list, I accidentally listened this song only once and I knew it was the song with the most playcounts in the library (but lately I didn't listened at all) so I said "hmm something is wrong here" :) So I tested again with other 2 songs with high playcount , I listened them only once .
So now it makes sense why they were at the top of the list :) Good that it's solved, I tested again and everything seems ok

Re: Playlist-Tools-SMP

Reply #33
Have updated the repository with all the latest changes and all bugfixes.  There are major changes, HTTP control integration, some new tools, readme for all tools, auto-show readmes when adding buttons, etc. If anyone want to test it, download the files directly from the repository not the releases.

(it's recommended to also download the latest files from the rest of my scripts, since I have changed all with major changes)

Changelog is up to date on github. Check unreleased.

 

Re: Playlist-Tools-SMP

Reply #34
Since someone asked for it, to change key tag on Playlist tools (for harmonic mixing) change this variable at: xxx-scripts\main\playlist_tools_menu.js (line 21)
X

(it will be configurable on next release)



 
SimplePortal 1.0.0 RC1 © 2008-2021