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: foo_playlist_revive (Read 74374 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_playlist_revive

foo_playlist_revive makes the dead items in the playlist alive again by replacing them with the matching ones in media library.
A handy util for those who often move or rename their media files/folders.

For foobar2000 v0.9.5.2 and upper.

Use main menu -> Edit -> Revive Dead Items to do the job.

Make sure the newly moved tracks have already been scanned into the media library or reviving will fail.

If the playlist is too long or the media library is too large, foobar2k may be unresponsive for several minute since this plug-in runs in the fb2k main thread.

v0.2: http://159.226.40.194/~Gu/fb/foo_playlist_revive_v0.2.rar

Changelog:
* Add progress bar.
* Fix crash caused by illegal file path.

Moderation: Rehosted here, due to broken link
[attachment=5807:foo_play...t_revive.zip]

 

foo_playlist_revive

Reply #1
foo_playlist_revive makes the dead items in the playlist alive again by replacing them with the matching ones in media library.
A handy util for those who often move or rename their media files/folders.

Make sure the newly moved tracks have already been scanned into the media library or reviving will fail.

Am I wrong? Till yet I thought starting foobar2000 would let it remove tracks from its playlists automatically if they are not longer found in its media library?

Or does your component block this automatic removal?

Sorry for this question, I am a little bit confused.
This is HA. Not the Jerry Springer Show.

foo_playlist_revive

Reply #2
Can you extend your component to cover also this: (find media library items from text files based on some title formatting criterion like: %artist% - %title%)

foo_playlist_revive

Reply #3
@robertina
foober2000 does that on autoplaylists, but surely not on static playlists
fb2k on OSX: flac q8 > rockboxed Sansa e280v1: Vorbis q5.0

foo_playlist_revive

Reply #4
Yes, this plugin is for static playlists. It's useless on autoplaylists.

Can you extend your component to cover also this: (find media library items from text files based on some title formatting criterion like: %artist% - %title%)


I am afraid this function is beyond the scope of my plugin...

foo_playlist_revive

Reply #5
Two issues:

If scanned playlist contains an entry added by foo_random then foobar will crash always.

Dead items wich are not revivable will be highlighted - but old selection before scanning will be kept


foo_playlist_revive

Reply #7
Two issues:

If scanned playlist contains an entry added by foo_random then foobar will crash always.

Dead items wich are not revivable will be highlighted - but old selection before scanning will be kept


updated and bug fixed. Thanks for reporting bugs

v0.2: http://159.226.40.194/~Gu/fb/foo_playlist_revive_v0.2.rar

Changelog:
* Add progress bar.
* Fix crash caused by illegal file path.

PS. i would like to update this into my original post but can't find the edit button. Is there a time limit for post edit?

foo_playlist_revive

Reply #8
PS. i would like to update this into my original post but can't find the edit button. Is there a time limit for post edit?
See the pinned topic in the Site Related Discussion forum.
Full-quoting makes you scroll past the same junk over and over.

foo_playlist_revive

Reply #9
hakase,

I need your help again to understand the handling of foo_playlist_revive correctly:

1.
I have a playlist with nine hundred entries in it.

If I perform a search for dead items with foobar's native function (Edit / Remove Dead Items) I see a progress bar and the search needs a few seconds.

I assume your component in the first instance looks for missing items in the playlist as well and then searches for them in the media library. But if I select all tracks and choose Edit / Revive Dead Items all tracks get unselected immediately, no progress bar pops up and it seems nothing to happen.

Is foo_playlist_revive's check for dead items so much faster than foobar's own function or am I doing something wrong?


2.
Your component generates a new entry in Preferences / Advanced: "Playlist Revive: Compare track title in reviving".

Would your component find items even in the case that the files are dead because they have been renamed if I untick this option?

Sorry for my questions, I admit that sometimes I am thinking a little bit complicated, but I am very interesting in using your plugin. 
This is HA. Not the Jerry Springer Show.

foo_playlist_revive

Reply #10
1.
I have a playlist with nine hundred entries in it.

If I perform a search for dead items with foobar's native function (Edit / Remove Dead Items) I see a progress bar and the search needs a few seconds.

I assume your component in the first instance looks for missing items in the playlist as well and then searches for them in the media library. But if I select all tracks and choose Edit / Revive Dead Items all tracks get unselected immediately, no progress bar pops up and it seems nothing to happen.

Is foo_playlist_revive's check for dead items so much faster than foobar's own function or am I doing something wrong?


Yes I just notice it is faster than the fb2k's native one.

My plugin uses filesystem::g_exists() method to check the dead items. It's fast and seems work well.
Maybe fb2k's Remove Dead Item function uses a more delicate algorithm to determine a dead item, though I don't known in what aspect it works better than filesystem::g_exists().

2.
Your component generates a new entry in Preferences / Advanced: "Playlist Revive: Compare track title in reviving".

Would your component find items even in the case that the files are dead because they have been renamed if I untick this option?


This option became meaningless as I modified the matching algorithm in v0.2. Please just ignore it :-)

Basically the mathcing is based on file size and track length. A matching title field is a positive factor but not determinative.

foo_playlist_revive

Reply #11
hakase,

your plugin is very helpfully for me, thank you again for it.

One thing I am missing is the listing of revived items in foobar's console.

What do you think about this proposal?

Robertina.


This is HA. Not the Jerry Springer Show.

foo_playlist_revive

Reply #12
hakase,

your plugin is very helpfully for me, thank you again for it.

One thing I am missing is the listing of revived items in foobar's console.

What do you think about this proposal?

Robertina.


I am not sure whether that info is helpful to user. I'll consider it.

foo_playlist_revive

Reply #13
I am not sure whether that info is helpful to user. I'll consider it.


I'm rather sure it is. I was about to download your plugin just because I've needed it a few times, and will be needing it again and again... but I didn't download. Because I will wait until I need it, sincerely hoping this feature will be there. But just highlighting them seems to me like a rather unpleasant status report...

The more control the better. A report when done, that seems obvious to me. I think it should state which items worked and weren't touched, which items were changed, last but not least any items that were broken but couldn't be found. If it could also show all new filepaths, that would be great. That way I could check that there hasn't been any mixing up of similar songs.
How short a signature am I allowed to have?

foo_playlist_revive

Reply #14
Hi,

Your component rocks, thank you so much !! I have entires albums and generally I only listen to 2 to 3 tracks in each of them  , when I use my external hard drive, if the letter change it breaks my playlist everytime  . I'm so glad to be able at last to have my playlists working while on holidays for instance.
However it is not perfect to me, I would need two things, second being optional, let me tell you about these suggestions :

1) I have several tracks that have the same name, yeah I know it's stupid but it's just that it's not the same version, it's cut or unmixed or whatever but it's the same name... And your component cannot load two tracks that have the same name. Would it be possible to have the component compare byte to byte the two versions of the same-nammed songs ? It seems difficult I know, I wish I could help... Anyways thanks for your consideration.

And 2) - optional - I'd like your component to automatically revive all playlists not just one and automatically when something's dead  .

Thanks again,

Thib

foo_playlist_revive

Reply #15
Awesome component, that's all I have to say.

foo_playlist_revive

Reply #16
I can't thank you enough for this plug-in.

What with my obsessive habit of tidying and sorting my library, and adding newly loaded MP3's into Foobar's playlists too soon, prior to allocating them to a their most appropriate folder. I never got to work with Foobar's file management tools fluently, I'd like it to be more drag-drop. So Playlist Revive is, to me, a totally essential and valuable plug-in.

foo_playlist_revive

Reply #17
What critera does this component use to match items? Does it consider only the filenames? It would be good to optionally use some additional criteria like filesize and date. I think such things are stored in the playlist.

foo_playlist_revive

Reply #18
What critera does this component use to match items? Does it consider only the filenames? It would be good to optionally use some additional criteria like filesize and date. I think such things are stored in the playlist.


I've no idea, but it seems to work and is adequately fast enough. I had given some thought to coding such a utility myself and in my case I planned to generate a CRC32 from the MP3 audio frames data portion of the file.  There are quite likely better methods of securing a unique identifier. I didn't get any further as I could not resolve how I would consistently handle the plethora of other audio formats: MPC, WAV, FLAC, APE et al, without giving myself a mamoth coding job! However, I was trying to find a method that would create a unique track identifier which would resist both filename and tag changes.

foo_playlist_revive

Reply #19
Thanks for the plugin.  I think it would be useful to add an option to ignore file format.  For example, if the old playlist contains mp3 files but you have since replaced them with FLAC files, it would still update the playlist entries.

foo_playlist_revive

Reply #20
Thanks for the irreplaceable plugin.  I've many static playlists that have been built over the years and just about died when I changed the location of my music to accommodate a filesystem expansion and none of the files could be found or rediscovered by foobar natively.  One part I find lacking, however, is preserving the original file's database info for the one in the new location.  When I revive my playlists I lose the playcount (foo_playcount), last played date, and rating (foo_quicktag) for all mp3's.  I understand that the decision to do this is by design, although it would be seamless if it could just include this info in the new entry.  Oddly, I'm not seeing that with my flac files, although I'm having a different problem with those - when I go to update the rating for a revived flac I get an error saying that the tag in the file must be updated, yet there is no actual tag in the file and when I click yes to this it fails to make the change at all.

To give a brief overview of my setup - my music collection is effectively a library; when content is added to it, the files should never be changed or rewritten to.  Each song/directory has an sfv and I'll periodically scan all sfv's in the library to verify its integrity.  I've had data corruption in the past, and this has in turn lead to failed conversions and playbacks (mostly while using Traktor resulting in an application crash) when I least expect it.  I have no need to sync a track's rating between Foobar2000 and Traktor or players (although the ability for Traktor to work with foobar's database would be seriously impressive).  Suffice to say, I'm happy to use foobar's database to keep all the details, like the number of times played, the time it was last played, and what the rating is I've given it separate from the file's own tag, and this has worked well for me over the past 6 years, even after migrating from foobar 0.8.3 to 1.0. 

Given that I'd like to keep my playlists updated with the new locations to my files when they change, and also retain the database tags I've given to them, can this ability be added to the componen?  Here's what I'm looking for:
1) If item needs to be revived, copy all database attributes from the orginal file, locate the new file, then add the stored attributes to the new database entry.
2) Do the same thing for flac, cue, and mp3 files.  Currently the new entry is clean for mp3 (and this is by design, I understand), but something is broken when reviving flac's, and/or flac's called from a cue.

foo_playlist_revive

Reply #21
.. When I revive my playlists I lose the playcount (foo_playcount), last played date, and rating (foo_quicktag) for all mp3's.

With the Playcount v3.0 for foobar2000 1.1.0 (or up) this will no longer happen.
In theory, there is no difference between theory and practice. In practice there is.

foo_playlist_revive

Reply #22
Thanks so much! Worked like a charm!

foo_playlist_revive

Reply #23
Any progress on title formatting features which 2E7AH suggested in post #3 ?

foo_playlist_revive

Reply #24
Hello,
This is almost exactly what I need, but I am wondering if you can add one more function: to revive multiple playlists at once.

Thanks.