INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Replace songs in playlists...  (Read 2617 times)

stiv32

  • World Citizen
  • ***
  • Posts: 162
Replace songs in playlists...
« on: December 31, 2013, 04:07:47 am »

I have 3600 files spread in 100 playlists.

I check each of those files at my database for better quality (listen to the track) and higher bitrate versions. (This had to be done manually)

Then I peak the better quality track and replace it at the playlists.

My question:

Since I know both the track that will be replaced and the track that will replace it (in the playlists only), is there a way to automate this process?

Regards
Logged

stiv32

  • World Citizen
  • ***
  • Posts: 162
Re: Replace songs in playlists...
« Reply #1 on: January 02, 2014, 05:42:51 am »

Anyone?
Logged

Ninouchka

  • World Citizen
  • ***
  • Posts: 149
Re: Replace songs in playlists...
« Reply #2 on: January 02, 2014, 09:23:29 am »

Good question, as i am busy re-ripping my cd music collection. I have a lot of mp3s quality of 128 kbps (used to be the norm
years ago), and I want everything to be FLAC.
It would really be handy to have an automatically change in my playlists too.
And even would have deleted the mp3s at the same time.
Is this possible?

thanks
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Replace songs in playlists...
« Reply #3 on: January 03, 2014, 11:10:53 pm »

There are a number of techniques you can use to help you here, but they won't be quite automatic.  If your better quality rips are in the same folder as the lower-quality tracks, you might use views or smartlists to help show or sort the better quality ones above the lower quality ones.  A view might indicate which albums have both sets.

But to describe how to do it, we'll need to know something about your metadata.  Will the album names, artist names, and track names be *exactly* the same, or just close (in which case, perhaps only track numbers can be used as a basis for comparing lower-vs-higher quality).  Or will the files be in the same album folders?

Anything you can share about your organization will help.  Or if you're open to suggestions, and can move your files around to suit the workflow, let us know...
Logged
The opinions I express represent my own folly.

Ninouchka

  • World Citizen
  • ***
  • Posts: 149
Re: Replace songs in playlists...
« Reply #4 on: January 05, 2014, 05:18:25 pm »

My mp3 albums are in an album folder named like, Alice Cooper - Constrictor - year, all these folders reside in a big folder called
MP3s. My flac albums is the same in one big folder named FLAC WAV. Everything is tagged as it should.

Your suggestion about ripping the new FLACs inside the mp3 album folder is a good idea, tagging will be the same,
this will make it easier to remove the mp3s afterwards.
But this doesnt change my playlists..
I dont get what you exactly means.
Logged

stiv32

  • World Citizen
  • ***
  • Posts: 162
Re: Replace songs in playlists...
« Reply #5 on: January 07, 2014, 04:15:48 am »

Me neither...

the point would be, since we know both the track with the better quality and the one in playlists,
to automatically replace the old song with the new one in the playlists only. Not in the folders.

In any case, thank you MrC for trying to help us :)
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Replace songs in playlists...
« Reply #6 on: January 07, 2014, 11:44:03 am »

Playlists are just lists of files from the library, and each file, be it lossy and lossless, are entirely different entities.

I can't think of a simple way to replace tracks for better quality tracks, short of manually removing / adding tracks.  My initial comments above were to help you create views to spot where there might be candidates for replacement.

Playlists can be exported, and then externally massaged to include the new tracks and remove the old.  Having the LOSSY and LOSSLESS in the same directory makes this easier, or they can be in separate directories but there must be a reliable mapping between the folders or tracks.  These playlists could then be re-imported, but they will not be sorted or grouped in any meaningful way (you'll have to manually move them from Playlists > Imported Playlists).
Logged
The opinions I express represent my own folly.

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Replace songs in playlists...
« Reply #7 on: January 07, 2014, 01:49:18 pm »

My add on has a utility that can help with a lot of this stuff.  MCFileIngester can replace existing files based on a playlist source list:  http://yabb.jriver.com/interact/index.php?topic=76147.msg528833#msg528833

There are some bugs in the Stack Swap mode, but the others work fine.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Replace songs in playlists...
« Reply #8 on: January 07, 2014, 01:55:38 pm »

I should add, ask if you want help.  And if the buggies bother you, let me know what you find in my thread.

I'd probably be motivated to fix things if I got more trouble reports.  ;)
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

stiv32

  • World Citizen
  • ***
  • Posts: 162
Re: Replace songs in playlists...
« Reply #9 on: January 08, 2014, 01:44:46 am »

Thank you MrC for helping us.

Glynor, correct me if I am wrong here. With this add on I can make a playlist of all files which need to be replaced in my playlists. Also another playlist with the files that will replace them. Then, I can replace all files from the second playlist with all the files at the first playlist (pairing the first from playlist A with the first from playlist B, the second from playlist...)Correct?

Is there an option not to replace the file but just rename it, keeping both files? In this way some recordings that are not the same (but similar with lower quality) won't be deleted?

I think your add on will be of great help to me. Thank you Glynor

Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Replace songs in playlists...
« Reply #10 on: January 08, 2014, 07:44:14 am »

Yup.  You've got it.

Basically, you need two playlists: source files and new files (for "regular" playlist mode).

The source playlist contains the existing files that contain the "source" metadata.
The new files playlist contains the new, not-yet-properly tagged files.
They have to be in the same order (so, item 6 in the source playlist will be matched up with item 6 in the "new items" list).  It doesn't care if the lists are "manual" playlists, or smartlists, and will work with either.  Be careful if you're generating them as smartlists though, because order counts.

It can operate on these lists in a variety of "types" of processing:

Ingest Types:

1. Clone:  This ingests the New File as a new, separate entry in MC, and clones all of the existing metadata over from the (old) Source File.  The Source File is left untouched.
2. Stack With Source:  This ingests the New File as a new, separate entry in MC, and then Stacks it with the given Source File.  You can optionally clone the source metadata and add the new file as the Stack Top.
3. Replace:  This ingests the New File as a replacement for the given Source File.  All metadata (including [Date Imported], [Number of Plays], etc) is cloned over to the new file, and then the old file is removed.  You can optionally also remove the (old) Source File from disk when complete.

For the Clone Operations, you can optionally limit the metadata clone only to "Play Stats".  This includes the following fields:
[Date Imported], [Skip Count], [Last Skipped], [Number Plays], [Last Played], [Rating]

It can also operate with just a single source playlist (and no "new" list) if you use it in Change Extension mode.  In that case, the filenames must all match exactly, except for with a different file type extension (swapping from MP3 to FLAC, for example), and it can go through and do the same things without building a "destination" list.

Make a Library backup before you run it, and do a few before you do a lot.

Like I said, it works pretty well.  I have seen some issues with my fancy Stack Swap mode, so I'd probably avoid that (despite it being a cool way to solve this exact problem).  It doesn't "eat files" or anything, but I've seen some crashiness there when I've used it in Playlist mode.  I think I know why, but I've been too busy/lazy to fix it thus far.  Let me know if you have any trouble in the other thread, and I'll actually launch Visual Studio and take a look.  ;)
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Replace songs in playlists...
« Reply #11 on: January 08, 2014, 08:08:37 am »

I should also note:

In Replace mode, it actually replaces the MC file record of the old file with the new file.  This is brilliant because existing playlists remain intact, referencing the new files instead!  This does then require that the "old" files are completely removed from MC.  Of course, there's nothing to prevent you from re-importing them afterwards.

In the other two modes, the "new" files are new discreet database entries in MC, so any Playlists that contain the files when you start will still point to their original entries.  It clones over metadata, but doesn't replace the file records.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Ninouchka

  • World Citizen
  • ***
  • Posts: 149
Re: Replace songs in playlists...
« Reply #12 on: January 08, 2014, 06:50:06 pm »

This is really interesting, Glynor. I am setting up a media server now, than will backup it, and use your program when I start ripping
my cds on the server. Thanks a lot, this seems a good solution.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Replace songs in playlists...
« Reply #13 on: January 09, 2014, 12:53:05 am »

Darn.  You made me test it, and I found a bug.

The Replace Type isn't working quite right.  It works right for Video files, but with Audio files for some reason some, but not all, of the metadata from the new files is being "sticky".  For example, [Date Imported] and [Rating] and stuff like that is all working correctly, but [Name] is carrying over altered.  Maybe because of in-file tags?  I'm not sure.

But it should be trivial to fix.  As I mentioned, Replace Type is a bit different and actually replaces the Library records.  That works, and Playlists come over and stuff.  The other type, Clone Type, works differently and clones the metadata over itself to the new record.  This works fine, and the metadata goes over without a hitch.  So, I can change the Replace Type to just run a clone first, and then do the fancy Library insertion trick.  It should do the best of both worlds, and probably only take a line of code or two to implement.

Sorry for the trouble.  Hold off for now.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Replace songs in playlists...
« Reply #14 on: January 10, 2014, 11:06:43 am »

Interesting.  This looks like it is due to a bug (or changed behavior) in the current builds of MC19.

I noticed something related recently when trying to remove files from my library.  The Deleted Items Database is acting funny.  I'll do more testing.  My workaround, however, is safer so I'm going to implement it anyway.  But it looks like something is broken, or changed substantially, with the way MC tracks deleted files.

Almost done.  I'll have a new build this weekend at some point.

I also fixed a few other little things while I was in there.  New error handling of background threads (like the one used to launch MC) should make it more reliable when used multiple times in succession when MC isn't running as a Media Server (or, at least, when it crashes, it'll report the errors properly).

That bit needs more work, but doesn't apply to just using the MCFileIngester tool by itself at all.  That only applies to when you are automating it and it is going to run over and over and over.  The fix for Replace Type ingesting is basically done, and I just need to rebuild the project and repackage it.  While I'm in there, though, I want to see if I can figure out the weirdness I've seen with the StackSwap mode.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

stiv32

  • World Citizen
  • ***
  • Posts: 162
Re: Replace songs in playlists...
« Reply #15 on: January 10, 2014, 03:03:19 pm »

Hi,

I am at the process of creating the playlists, that will replace each other. Fortunately it will take some more days, so I am gonna use the latest build. Of course I will do some testing before implementing the whole playlists. I will keep you informed about bugs or other problems that might arise.

Thanks for helping out
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Replace songs in playlists...
« Reply #16 on: January 10, 2014, 03:49:33 pm »

Yep.  It is done, and built.

I just need to test it (and make sure the fix worked) and get it packaged into my installer.  I have plans tonight, but I'll probably do it tomorrow afternoon.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Replace songs in playlists...
« Reply #17 on: January 11, 2014, 04:06:13 pm »

Fixed.  Found one other bug in there in testing the other Ingest Types, and quashed it.  All of the Ingest Types are tested and work properly in single-file and playlist modes, as far as I can tell, so you should be good.  Make sure to get the latest version (which is always in the first post of the thread, in addition to with the build notes for the build).  That should be MCAutoQueue 0.9.7 and MCFileIngester 0.9.2.

http://yabb.jriver.com/interact/index.php?topic=76147.0
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

stiv32

  • World Citizen
  • ***
  • Posts: 162
Re: Replace songs in playlists...
« Reply #18 on: January 12, 2014, 04:23:59 am »

I tested MCFileIngester. It works fine. I used Standard mode, and "Replace", showing progress while processing.

My problem is that, both Source File and New File, are in different Playlists. I need the resulting file to be included in all the playlists. What I get with these options is the New File with the Playlists of the Source File.

I understand there is a work around in order to keep (add) all the playlists in one file, but I can't think of a possible solution to this.

Next step after getting this done is to process the playlists I have created with Source Files and New Files accordingly.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Replace songs in playlists...
« Reply #19 on: January 12, 2014, 06:09:10 pm »

I'm not sure what you're asking for...

The idea of the Replace Type ingester is that the files in the "New Files" playlist replace the files in the "Old Files" playlist (which are then completely removed from MC).  No metadata, or additional playlists, from the New files is preserved.  It is assumed that they are, well, brand new files.

It is, essentially, a scripted version of carefully doing a Find and Replace on the [Filename] tag.

Perhaps try to explain more with examples.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

stiv32

  • World Citizen
  • ***
  • Posts: 162
Re: Replace songs in playlists...
« Reply #20 on: January 13, 2014, 02:28:29 am »

Lets take for example track A and track 1. When I initially got track A I categorized it at playlists, according to my knowledge of its metadata and the feeling when was listened, as

"Buzón" (composer), "Buzon, Lyrical" , "40's"

Then I acquired track 1, which was a better rip (from vinyl), and maybe of higher bitrate version of the same recording. Unaware of the existence of Track A, and also the knowledge of Track's 1 metadata, I also categorized  this track at playlists as

"Falcon" (the singer), "Falcon, lyrical" "40's"

Now that I recheck my collection I find out that I need to keep Track 1 with its playlists and also replace it at Track A's playlists. So I need track 1 to be at playlists:


"Falcon" (the singer), "Falcon, lyrical" "40's" , "Buzón" (composer), "Buzon, Lyrical"

Of course I can do it manually, but when it comes to more than 3500 files (which I use more frequently at this time), I would prefer if possible a quicker method...

Also, today I am finishing the two playlists "Source" and "New", which means that I have found of each track its best replacement.
Logged

stiv32

  • World Citizen
  • ***
  • Posts: 162
Re: Replace songs in playlists...
« Reply #21 on: February 10, 2014, 02:32:25 am »

I am sorry for revisiting this post, but my problem hasn´t been solved.

Is there a way to merge the PlayStat so my Playlist Entries are intact?

Thanks
Logged
Pages: [1]   Go Up