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 2494 times) previous topic - next topic
0 Members and 2 Guests 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)



Re: Playlist-Tools-SMP

Reply #35
Have updated the repository with the new menus to remap tags, an important change to harmonic mixing and pools which should greatly speed up (x1000) their use with large handle lists and new presets (masstagger).

If anyone want to test it, download the files directly from the repository not the releases. Please have in mind the relative path bug on SMP has not been solved yet, so I have no idea if it will work for you!
(it's recommended to also download the latest files from the rest of my scripts in that case, since I have changed all with major changes)


EDIT: Export your Playlist Tools preset list (at config menu) to have a backup if you added your own entries to the menus! The last update will break previous properties (and thus presets). Save them and re-import them after installing.

Re: Playlist-Tools-SMP

Reply #36
Maybe I misunderstand something but when I use:  Playlist tools - other tools - import track list - import from file \ url  , I get no result, using the example track_list_to_import.txt .

As you see in the pic, I put a song in the library Aretha Franklin - Respect, but it doesn't find anything.

Also, when I export a playlist from Spotify in txt. format I have this, for example :
Aretha Franklin - Respect

I tried to modify this [". ","%title%"," - ","%artist%"] from your example, but it didn't worked.

Re: Playlist-Tools-SMP

Reply #37
Error on my side. Missed some quotes somewhere on a last minute change so no query worked. Fixed, replace file at 'main\'. Now should work in all cases. Updated also github.

And it seems I also forgot to add it to the 'test tools' macro, which would have found the problem too automatically (both macros run all tools from menu for easy testing). Fixed it too (at github and requires restoring defaults on macro menu).
Thanks!

Re: Playlist-Tools-SMP

Reply #38
Yep, your example (that text file, track_list_to_import) is working now.
But now I think it's a error on my side :)
I made another txt file (a playlist exported from Sotify in txt format), track_list_to_import. It looks like this :

Cock Robin - Stumble and Fall
Joe Hisaishi - A Road to Somewhere
The Police - Every Breath You Take

You have this (for your txt file) : [". ","%title%"," - ","%artist%"]

What should I use for my case? I probably tried everything , except the good version :)

Btw, this is a nice little feature, now it's easier to import a playlist from Spotify to Foobar and vice versa. Also it will be cool if we can save more presets, not only your example

Re: Playlist-Tools-SMP

Reply #39
Yep, your example (that text file, track_list_to_import) is working now.
But now I think it's a error on my side :)
I made another txt file (a playlist exported from Sotify in txt format), track_list_to_import. It looks like this :

Cock Robin - Stumble and Fall
Joe Hisaishi - A Road to Somewhere
The Police - Every Breath You Take

You have this (for your txt file) : [". ","%title%"," - ","%artist%"]

What should I use for my case? I probably tried everything , except the good version :)

Btw, this is a nice little feature, now it's easier to import a playlist from Spotify to Foobar and vice versa. Also it will be cool if we can save more presets, not only your example
In fact I created it for online playlists found at random places: 'Top 100 guitar tracks', etc. It was a pain having to look for all the tracks  matching them manually in my own library! But yep, it may be used to sync spotify playlists and probably other use-cases.
This is an easy way to share playlists between users too, since they are path agnostic and may be loaded in anyone's library matching just what they got.

Uhm... I could make it remember the last "preset" used.  But not sure about adding a list or presets, it's unnecessarily complex.
I mean, if you download random lists from internet, you will need to edit it no matter what. And if you use it for an specific source (Spotify) then using the last one should be good enough, since it will always be the same.

Code: [Select]
["%artist%"," - ","%title%"]

You probably used the right one But it's a(nother) bug on my side. I didn't contemplate the first value being a tag (expected a number, etc.), so it always failed. Use the above code with the new file. Now it should work as expected in any case, no matter the tag positions.

Re: Playlist-Tools-SMP

Reply #40
Yeah, I used that too , good that it's solved :)
"Uhm... I could make it remember the last "preset" used.  But not sure about adding a list or presets, it's unnecessarily complex."

You're right . I only asked for presets because I didn't managed to get the results that I wanted (but now we know it was because of the bug) and I was thinking : "hmmm , maybe we need presets here, so next time I will have faster results with the playlist? " haha :)
No need for presets


Re: Playlist-Tools-SMP

Reply #41
Now it stores the last value used at Import track list\Import from file \ url...
The other entry uses the same (last) format mask value. No further changes.

Will update it on github later today.

 
SimplePortal 1.0.0 RC1 © 2008-2021