HydrogenAudio

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: hakase on 2009-08-08 11:03:21

Title: foo_playlist_revive
Post by: hakase on 2009-08-08 11:03:21
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 (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]
Title: foo_playlist_revive
Post by: Robertina on 2009-08-08 11:40:18
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.
Title: foo_playlist_revive
Post by: 2E7AH on 2009-08-08 12:17:59
Can you extend your component to cover also this (http://www.hydrogenaudio.org/forums/index.php?showtopic=72068): (find media library items from text files based on some title formatting criterion like: %artist% - %title%)
Title: foo_playlist_revive
Post by: callisto on 2009-08-08 12:18:15
@robertina
foober2000 does that on autoplaylists, but surely not on static playlists
Title: foo_playlist_revive
Post by: hakase on 2009-08-08 14:24:09
Yes, this plugin is for static playlists. It's useless on autoplaylists.

Can you extend your component to cover also this (http://www.hydrogenaudio.org/forums/index.php?showtopic=72068): (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...
Title: foo_playlist_revive
Post by: q-stankovic on 2009-08-09 14:29:19
Two issues:

If scanned playlist contains an entry added by foo_random (http://foosion.foobar2000.org/components/?id=random&version=1.3.0) then foobar will crash always.

Dead items wich are not revivable will be highlighted - but old selection before scanning will be kept
Title: foo_playlist_revive
Post by: mazy on 2009-08-09 19:36:39
Amazing, I always wanted something like this. Thank you.
Title: foo_playlist_revive
Post by: hakase on 2009-08-11 03:36:24
Two issues:

If scanned playlist contains an entry added by foo_random (http://foosion.foobar2000.org/components/?id=random&version=1.3.0) 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 (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?
Title: foo_playlist_revive
Post by: Yirkha on 2009-08-11 11:23:49
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 (http://www.hydrogenaudio.org/forums/index.php?showtopic=72003) in the Site Related Discussion forum.
Title: foo_playlist_revive
Post by: Robertina on 2009-08-14 03:30:46
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. 
Title: foo_playlist_revive
Post by: hakase on 2009-08-14 10:03:57
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.
Title: foo_playlist_revive
Post by: Robertina on 2009-08-28 20:07:23
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.


Title: foo_playlist_revive
Post by: hakase on 2009-09-18 03:31:23
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.
Title: foo_playlist_revive
Post by: O8h7w on 2010-01-23 15:54:31
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.
Title: foo_playlist_revive
Post by: ThibWay on 2010-01-25 18:47:53
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
Title: foo_playlist_revive
Post by: Pickaxe on 2010-01-25 19:33:41
Awesome component, that's all I have to say.
Title: foo_playlist_revive
Post by: TimUK on 2010-02-19 22:31:51
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.
Title: foo_playlist_revive
Post by: RogerG on 2010-02-20 13:13:50
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.
Title: foo_playlist_revive
Post by: TimUK on 2010-02-22 20:41:46
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.
Title: foo_playlist_revive
Post by: progorp on 2010-03-29 08:38:24
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.
Title: foo_playlist_revive
Post by: dr_astral on 2010-05-02 01:28:43
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.
Title: foo_playlist_revive
Post by: GeSomeone on 2010-07-30 19:55:47
.. 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 (http://www.hydrogenaudio.org/forums/index.php?showtopic=82420) for foobar2000 1.1.0 (or up) this will no longer happen.
Title: foo_playlist_revive
Post by: Miralys on 2010-09-21 11:30:58
Thanks so much! Worked like a charm!
Title: foo_playlist_revive
Post by: s33m33 on 2010-10-26 16:33:22
Any progress on title formatting features which 2E7AH suggested in post #3 ?
Title: foo_playlist_revive
Post by: martin88 on 2011-03-12 22:42:26
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.
Title: foo_playlist_revive
Post by: mll on 2011-10-17 21:07:10
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.

I second this. Moreover, I see cases where the plugin fails to find an alternative (same artist, same title, but different codec).

Anyway, hakase seems to have dropped any development ont theis pretty plugin... Would anyone suggest an alternative ?
Title: foo_playlist_revive
Post by: TimUK on 2011-10-18 10:10:26
Anyway, hakase seems to have dropped any development ont theis pretty plugin... Would anyone suggest an alternative ?


I have looked but never found any better playlist fixers other then Hakase's plugin. Perhaps it could be open-sourced?

A change I would like to add would be for it to uniquely id the files based on the audio content portion of the file only. This would make it resistant against ID3 header, filename changes and the like.

You might want to look ats M3U Reviver (http://micro-source.ch/wwwerner/playlistrevisor.html) a standalone by Werner Staudacher but I found it quite a fiddle to use.

Another trick I tried was to use an in-built playlist repair facility of WinAmp but looking at my current version that option seems to be absent?

Perhaps there are other apps, I would be intrigued to know.
Title: foo_playlist_revive
Post by: mll on 2011-10-18 10:33:35
A change I would like to add would be for it to uniquely id the files based on the audio content portion of the file only. This would make it resistant against ID3 header, filename changes and the like.


Yeah, using MusicBrainz (http://musicbrainz.org/)'MUSICBRAINZ_TRACKID field would be very cool.
Title: foo_playlist_revive
Post by: ELITEeNergizer on 2011-12-19 21:14:06
It doesn't seem to work for some of my playlists, I'm trying to fix the location of a file that used to be in C:/Shared but is now in D:/Shared. I see it in my library but it still doesn't work.
Title: foo_playlist_revive
Post by: Vanav on 2012-01-17 17:17:17
Works perfectly, thank you!
Title: foo_playlist_revive
Post by: John Doe on 2012-10-01 21:19:56
Not working here.

It shows me the missing tracks but cannot revive them eventhough I definitely have the same file OR the same title in my Media Library.
Title: foo_playlist_revive
Post by: John Doe on 2012-10-12 10:39:16
Code: [Select]
Tracks that fail to update due to no or multiple candidates are selected in the playlist. Please make sure your media files have been scanned into the media library.


Any idea on this one?
Title: foo_playlist_revive
Post by: KLR on 2012-11-07 00:50:41
Great plugin!  I've only recently been creating dedicated playlists, had always used the autoplaylists, and have a general Music folder that I just toss new folders into as I obtain them.  Problem with playlists of course is when it's time to do some housecleaning the playlists become hopelessly screwed up; but this component fixes things in no time flat.  Thanks for your work!
Title: foo_playlist_revive
Post by: bulletproof2k on 2012-11-07 15:12:34
Very useful plugin, thanks! :]
Title: foo_playlist_revive
Post by: Arakura on 2012-11-08 04:55:14
How do you get it to run once you extract it? there is no revive dead files option... or am I just being stupid?
Title: foo_playlist_revive
Post by: marc2003 on 2012-11-08 11:02:34
or am I just being stupid?


it would seem so. from the opening post:

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


edit: just noticed you mentioned extracting. there's no need for that....

http://wiki.hydrogenaudio.org/index.php?ti...all_a_component (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:How_to_install_a_component)
Title: foo_playlist_revive
Post by: RonaldDumsfeld on 2012-11-08 12:05:07
Very useful little app. Works like a charm so far.

In theory it's not strictly vital as fileops within Foobar itself keeps playlists up to date but using revive is much more straightforward.
Title: foo_playlist_revive
Post by: compoopers on 2012-12-10 12:44:22
Brilliant.
Title: foo_playlist_revive
Post by: OOOOPS on 2013-02-26 14:32:01
Thanks!
Title: foo_playlist_revive
Post by: Mr Broly on 2013-03-14 09:41:07
Thanks.
Title: foo_playlist_revive
Post by: bulletproof2k on 2013-08-22 16:54:29
Great Thx.
Title: foo_playlist_revive
Post by: vogueblackheart on 2013-09-28 00:18:29
Same issue as ELITEeNergizer reported--On a couple different PCs, I've had the plugin fail to find items, usually when I'm porting foobar and my music collection to a new PC with a different combination of drive letters. I'm guessing the problem is related to drive letters, since we're talking the exact same set of MP3s whose paths would previously be updated. I'll test this some more if there's any indication the plugin is still under development.
Title: foo_playlist_revive
Post by: Hamburger help us on 2013-12-07 20:17:35
Not working here.

It shows me the missing tracks but cannot revive them eventhough I definitely have the same file OR the same title in my Media Library.

Have same issue too. Though sometimes.
https://imgur.com/pmeUOjZ (https://imgur.com/pmeUOjZ)
Title: foo_playlist_revive
Post by: ChronoSphere on 2014-01-22 14:58:28
Doesn't seem like there was any development on this recently, a pity.

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.
The case this scenario doesn't take into account is when you convert the tracks to a different format (for lossless tracks). Alternatively matching by tags would help with that.
Title: Re: foo_playlist_revive
Post by: stevehero on 2017-08-25 15:49:43
Many thank for this one click solution.

For any stubborn tracks that can't be found that I've changed to FLAC, exporting the playlist and using this works a treat.
listFix() https://sourceforge.net/projects/listfix/?source=typ_redirect (https://sourceforge.net/projects/listfix/?source=typ_redirect)


Title: Re: foo_playlist_revive
Post by: w0witworked on 2017-09-21 19:43:40
worked thanks!  8)  8)  8)  :o  :D have my updoot
Title: Re: foo_playlist_revive
Post by: BlackRitus on 2018-09-19 11:22:25
@Moderation: Please remove the dead link from the first post completely.
No one benefits from it and it's confusing.
There are constantly users claiming they couldn't find it / it's offline, especially when they look at the date.
And then they think
Code: [Select]
[attachment=5807:foo_play...t_revive.zip]
is the new link, which also doesn't work...

Please just edit it, no one will be mad at you.
Title: Re: foo_playlist_revive
Post by: C87P66 on 2019-06-29 03:20:44
Doesn't work with drive letter changes and cue files... listFix also doesn't work with cue files since they are not properly supported in m3u(8) format. Fb2k also doesn't provide path edit capability... Does anyone have the source code to this plugin? It's looking really hopeless right now...
Title: Re: foo_playlist_revive
Post by: C87P66 on 2019-06-29 04:01:49
Maybe it's because of the new fb2k playlist format? I guess I should be glad that I only have to manually add 30G worth of files this time...
Title: Re: foo_playlist_revive
Post by: C87P66 on 2019-07-05 20:43:32
Update: I forgot to turn off playlist replace item restriction... Some items still can't be revived automatically but generally works well now
Title: Re: foo_playlist_revive
Post by: szabi on 2021-01-24 13:51:20
Hi
I started editing my old playlist manually and it was ggrrrr...
This component is amazing.
Thanks.
regards
Title: Re: foo_playlist_revive
Post by: odysseusart on 2022-05-23 09:58:54
Awesome job, works like a charm. THANKS!!!
Title: Re: foo_playlist_revive
Post by: TakuSkan on 2022-08-17 04:17:35
I've had foo_playlist_revive installed for years, and have successfully used it from time to time.

But today I moved several complete artists' albums (mp3s) from:

Code: [Select]
<genre> \ <artist - album>
To:
<genre> \ <artist> \ <year - album>

Where <xxxxx> and <xxxxx - xxxxx>  are all folders. I didn't rename any of the mp3 files, or change any of their tags. But when I ran Edit > Revive Dead Items ... foo_playlist_revive failed to find the missing tracks.

FB2K refreshed the library, and the tracks all appear in Album List Panel properly.  Is this a flaw in the component, or am I doing something wrong?

Thanks.  :)
Title: Re: foo_playlist_revive
Post by: KthugS on 2022-09-15 19:55:51
This has been a really useful plugin for me.
Title: Re: foo_playlist_revive
Post by: hideyahn on 2023-08-11 06:53:42
I hope x64 version plz :)
Title: Re: foo_playlist_revive
Post by: Air KEN on 2023-08-11 07:10:49
Playlist Fix (foo_playlist_fix)
https://www.foobar2000.org/components/view/foo_playlist_fix

Does this help?
Title: Re: foo_playlist_revive
Post by: Gggggas on 2023-08-12 18:25:13
Playlist Fix (foo_playlist_fix)
https://www.foobar2000.org/components/view/foo_playlist_fix

Does this help?

It's working perfectly bro