Jump to content

Some unique M3u8 problems as usual with me


Kloppstock

Recommended Posts

  • Replies 39
  • Created
  • Last Reply
6 hours ago, andrewilley said:

I'm not sure what you want me to do with that? As you say, the M3U8 file shows that all of your music files are stored inside a folder called /storage/sdcard1/Lotsen från Gädda/ . If you let me know where they have been moved to, it should just be a case of replacing that initial path with your new starting path.

As I said before, this does assume that you have not changed the actual filenames or subfolder names within your base music folder though - e.g. the following overall structure of folders/files must still exist in your new music folder:

Music 9/Jaki Graham - Love me tonight.mp3
Rick Astley/The Very Best/Rick Astley -Sleeping.mp3
Music/Hoola Bandoola Band - Juanita.mp3
Gloria Estefan/betcha say that (12'' version).mp3
Music 9/The Jones girls - All i want.mp3
Music/aladdin - en vän som jag.mp3
Musik 6/05 Lover's Paradise.mp3

Andre

I want you to edit it, with that batch search&replace method that i dont understand how that multiply 2000+ songs without doing the edit 2000+ times

I have splitted them between these 5 folders on the SD-card to make things worse for your edit,  i could offcourse move them to just one subfoldder if you want?

Del1, Del2, Del3, Del4, Del5, 

 /storage/sdcard1/Lotsen från Gädda/Del1

etc

Link to comment
Share on other sites

6 hours ago, Kloppstock said:

I want you to edit it, with that batch search&replace method that i dont understand how that multiply 2000+ songs without doing the edit 2000+ times

Then you'll have to tell me WHAT you want me to edit it to. We just seem to be going round in circles here, you have sent a huge playlist file (presumably with paths based on your old file system?) but you have not said what the NEW lines need to look like to point to the new locations of your files - i.e. what do you want as the new base path to your music folders? I'm happy to help if I can, but I can't do much when you keep posting half of the problem and then just telling me to fix your files for you.

Search and Replace is a fairly basic function in any decent text editor. Just load the M3U8 file into the editor, use the search feature to find whatever text that you want to replace on each line, and tell it to 'Replace All' with the appropriate new path details.

Assuming, as I keep saying, that you have not changed the rest of your subfolders layout and thus effectively broken the entries in the playlist completely. 

Andre

Link to comment
Share on other sites

On 5/16/2019 at 11:43 PM, andrewilley said:

Then you'll have to tell me WHAT you want me to edit it to. We just seem to be going round in circles here, you have sent a huge playlist file (presumably with paths based on your old file system?) 

Yes thats correct

 

"but you have not said what the NEW lines need to"

I have attempted to tell you that the new location are simply 5 new subfolders inside the paths based on my old file system

/storage/sdcard1/Lotsen från Gädda/Del1

/storage/sdcard1/Lotsen från Gädda/Del2
/storage/sdcard1/Lotsen från Gädda/Del3
/storage/sdcard1/Lotsen från Gädda/Del4
/storage/sdcard1/Lotsen från Gädda/Del5

"Assuming, as I keep saying, that you have not changed the rest of your subfolders layout and thus effectively broken the entries in the playlist completely. "

I dont know what you mean with "the rest"

Here is an example of an old subfolder that have ceased to exist    "/storage/sdcard1/Lotsen från Gädda/Music 2/06 Armed & Dangerous.mp3"

So obviosly you need to replace Music2  with a new subfolder to either of this "Del" folders

Alterernate i have offered in previous posts to move all my files from these 5 new subfolders to just  "/storage/sdcard1/Lotsen från Gädda/

to make is ismpler for you, and im waiting for your answer there.  That was part one

 

Part two  is that i stil don understand how you are going to use ".Search and Replace" here...so im need you practial examples probably but first we must past part 1

 

 

 

 

 

 

Link to comment
Share on other sites

So you have changed your first level of subfolders, previously titled in the format "Musik 1", "Musik 2", "Musik 3", etc to "Del1", "Del2", "Del3" instead ?

In which case, in a text editor, do a global Search for:
/storage/sdcard1/Lotsen från Gädda/Musik 1/
and replace each occurrence with:
/storage/sdcard1/Lotsen från Gädda/Del1/
and do the same again for each subfolder name change.

If the numeric digit pattern is the same across all of your subfolders (i.e. changing all "Musik x" to "Delx") then you could get away with just searching for /storage/sdcard1/Lotsen från Gädda/Musik  (with a trailing space at the end) and replacing all of those with /storage/sdcard1/Lotsen från Gädda/Del

All of this assumes that you have not changed anything else though, that you have merely altered one set of specific subfolder names to different names. If the patterns are more complex, you would need to do a series of carefully chosen search&replace operations to catch them all. 

Andre

Link to comment
Share on other sites

1 hour ago, andrewilley said:

So you have changed your first level of subfolders, previously titled in the format "Musik 1", "Musik 2", "Musik 3", etc to "Del1", "Del2", "Del3" instead ?

In which case, in a text editor, do a global Search for:
/storage/sdcard1/Lotsen från Gädda/Musik 1/
and replace each occurrence with:
/storage/sdcard1/Lotsen från Gädda/Del1/
and do the same again for each subfolder name change.

If the numeric digit pattern is the same across all of your subfolders (i.e. changing all "Musik x" to "Delx") then you could get away with just searching for /storage/sdcard1/Lotsen från Gädda/Musik  (with a trailing space at the end) and replacing all of those with /storage/sdcard1/Lotsen från Gädda/Del

All of this assumes that you have not changed anything else though, that you have merely altered one set of specific subfolder names to different names. If the patterns are more complex, you would need to do a series of carefully chosen search&replace operations to catch them all. 

Andre

Yes i have created new first level of subfolders named "Delx", i could have named the folders exactley the same...however the files that have been splitted out into each new subfolders are anyway totaly different from the last SD-cards counterpart (but the songs are the same), that was unavoidable in this case....which means i dont know any longer which "Del" folder each item have landed  into,  so i will have a double search and find project here...why its probably faster to create a new playlist

"and replace each occurrence with:"

The folder "Musik 5" only....contains 70 items  that i must change

I told you my playlist was big..i dont see how this will go fast yet ;) 

"Search and Replace is a fairly basic function in any decent text editor. Just load the M3U8 file into the editor, use the search feature to find whatever text that you want to replace on each line, and tell it to 'Replace All' with the appropriate new path details."

And here is what i dont understand that sounds like it would speed up the process.....this "replace all"  feat you talk about, i have never seen this technique in my life i think...

i dont get any visual picture in my mind, so could you please either post a screenhot or do my work for me as i offerered you to help with 

 

 

 

 

 

Link to comment
Share on other sites

If you use a global 'Search & Replace' operation, a text editor will change ALL occurrences that it finds of the "search" string into the "replace" string, as many times as it needs to throughout the whole file. It's really not very hard to do, and very quick.

If you had a file with one line for each date in a year for example, you could ask a text editor to replace all 365 occurrences of the year "2018" with "2019" to update a whole document, and it would do the entire file in one go. However it would not understand the reason behind the change, such as changing a date, or a folder path - it simply knows to swap one set of characters for another, completely automatically.

But as I keep saying, that will only work if the rest of the subfolder layout has not changed much, and all you need to do is change a few higher level words in the paths. If you've changed the entire structure with no logical way to tell it how to change the old to the new, you'll need to do it by hand (either that or change all the subfolder names back to what they were before).

Which method is least work for you depends on how much you've moved away from your old folder structure, and whether you can create some simple logical ways to change the pointers within the old M3U8 file to refer to your new folder/subfolder locations.

Andre

Link to comment
Share on other sites

On 5/23/2019 at 7:09 PM, andrewilley said:

If you use a global 'Search & Replace' operation, a text editor will change ALL occurrences that it finds of the "search" string into the "replace" string, as many times as it needs to throughout the whole file. It's really not very hard to do, and very quick.

If you had a file with one line for each date in a year for example, you could ask a text editor to replace all 365 occurrences of the year "2018" with "2019" to update a whole document, and it would do the entire file in one go. However it would not understand the reason behind the change, such as changing a date, or a folder path - it simply knows to swap one set of characters for another, completely automatically.

But as I keep saying, that will only work if the rest of the subfolder layout has not changed much, and all you need to do is change a few higher level words in the paths. If you've changed the entire structure with no logical way to tell it how to change the old to the new, you'll need to do it by hand (either that or change all the subfolder names back to what they were before).

Which method is least work for you depends on how much you've moved away from your old folder structure, and whether you can create some simple logical ways to change the pointers within the old M3U8 file to refer to your new folder/subfolder locations.

Andre

Thanks, now i got information enough to force myself  :) to google-discover the  "replace function" in notepad i have never used, and i cannnot use it just yet to solve this problem

Since  my files are splitted and into different subfolders...and since the files in each folders are different from the old M3U8 playlist...it wont help me to rename the folders on my SD-card to re-fit the old M3U8 directory anyway 

The only way out of this is to somehow create just a text-listing of all the items inside each new subfolder on the SD-card  so i can later copy those lines  into my M3U8 -notepad  and then use the replace function.

 When i browsed my SD-card and mass-highlighted all my files in a subfolder (but failed to copy their names into notepad)  i did find a right click feat  "create Sansa Playlist File" ...by doing so in Windows explorer instead of haning to manually re-create the large playlist inside PA just to be able to export a text-file out of it....however i dont have any Sansa unit and i also wanna use the M3U8-way...so i therefore tested to see if i could just paracite on it..by open such a playlist like PLA into a text-editor...but i didnt have notebook....i would have appretiated if PLA files would be convertable to M3U(8)?.... so i could then open it inside notepad

Do you have any workaround-tip here?

 

 

 

Link to comment
Share on other sites

As I have said numerous times before, if you have copied files into lots of different folders (rather than just changing high level overarching folder names that are easy to follow) then you will have broken any playlist files that referred to the old subfolder naming structure. Playlists are just pointers to where within a file system any given audio file can be found; if you move the file, there's no way for the playlist to find it again unless you edit each entry manually (or a folder at a time, but still very laborious).

PLA files are more messy than M3U, but you can convert them with a bit of effort. Tutorials or guidance are well beyond the scope of this forum though, but give it a try and see how you get on. Notepad is a fairly basic text editor (I use Notepad++) but it works and can do global search&replace.

Andre

Link to comment
Share on other sites

18 hours ago, andrewilley said:

As I have said numerous times before, if you have copied files into lots of different folders (rather than just changing high level overarching folder names that are easy to follow) then you will have broken any playlist files that referred to the old subfolder naming structure. Playlists are just pointers to where within a file system any given audio file can be found; if you move the file, there's no way for the playlist to find it again unless you edit each entry manually (or a folder at a time, but still very laborious).

PLA files are more messy than M3U, but you can convert them with a bit of effort. Tutorials or guidance are well beyond the scope of this forum though, but give it a try and see how you get on. Notepad is a fairly basic text editor (I use Notepad++) but it works and can do global search&replace.

Andre

Well i keep saying to you that im going to perform that laborious thing, and i have a vision clear  how to do it now ...so my probably last question is a step in that...

Do you know any tricks how i can copy this file-names (the songs) to be able to create similar list inside notepad?

nä.jpg

Link to comment
Share on other sites

On 5/31/2019 at 11:36 AM, Kloppstock said:

Do you know any tricks how i can copy this file-names (the songs) to be able to create similar list inside notepad?

I'm not familiar with an Android file explorer app that lets you copy a directory listing to a file, however you can do it in a Terminal Emulator (using command lines).

Open a terminal emulator app, navigate to your music folder using the cd command, then use

ls -1 > audiofiles.txt

You can use parameters after ls to specific the format (e.g. long or short details) and whether to crawl through subdirectories too (using -R for recursive mode) .

Personally though, I'd do it on a PC in Command Prompt (very much like old-fashioned DOS), much easier than messing around with entering fiddly (and exact) command lines on a phone. And if you're going to edit the results in Notepad on your PC anyway, might as well just do it all there.

Andre

Link to comment
Share on other sites

Explore ls-al at the linux command line and pipe this into a file, eg ls-al | textfile.txt

In good old dos dir /s/w/a/p > textfile.txt

To get to a linux command line you require adb (android debug bridge) so you will need to be a little bit comfortable with lower level command line stuff

Link to comment
Share on other sites

For what it's worth, in the Command Line Prompt on my PC (launched from WindowsKey + X) I build full recursive directory trees as text files using:

dir /b /S > outputfilename.txt 

The /b sets the output format to name (and directory) only, while /S scans through subfolders too. The results if issued inside a music folder are very M3U-like, e.g:

M:\MP3s\ABBA\Arrival\01 When I Kissed the Teacher - ABBA.mp3
M:\MP3s\ABBA\Arrival\02 Dancing Queen - ABBA.mp3
M:\MP3s\ABBA\Arrival\03 My Love, my Life - ABBA.mp3
M:\MP3s\ABBA\Arrival\04 Dum Dum Diddle - ABBA.mp3
M:\MP3s\ABBA\Arrival\05 Knowing Me, Knowing You - ABBA.mp3
M:\MP3s\ABBA\Arrival\06 Money, Money, Money - ABBA.mp3
M:\MP3s\ABBA\Arrival\07 That's Me - ABBA.mp3
M:\MP3s\ABBA\Arrival\08 Why Did It Have To Be Me - ABBA.mp3
M:\MP3s\ABBA\Arrival\09 Tiger - ABBA.mp3
M:\MP3s\ABBA\Arrival\10 Arrival - ABBA.mp3
M:\MP3s\ABBA\Voulez Vous\01 As Good As New - ABBA.mp3
M:\MP3s\ABBA\Voulez Vous\02 Voulez-Vous - ABBA.mp3
M:\MP3s\ABBA\Voulez Vous\03 I Have A Dream - ABBA.mp3
M:\MP3s\ABBA\Voulez Vous\04 Angeleyes - ABBA.mp3
M:\MP3s\ABBA\Voulez Vous\05 The King Has Lost His Crown - ABBA.mp3
M:\MP3s\ABBA\Voulez Vous\06 Does Your Mother Know - ABBA.mp3
M:\MP3s\ABBA\Voulez Vous\07 If It Wasn't For The Nights - ABBA.mp3
M:\MP3s\ABBA\Voulez Vous\08 Chiquitita - ABBA.mp3
M:\MP3s\ABBA\Voulez Vous\09 Lovers (Live A Little Longer) - ABBA.mp3
M:\MP3s\ABBA\Voulez Vous\10 Kisses Of Fire - ABBA.mp3

Andre

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...