Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1

    Moving/migrate LMS from Win to Linux keeping all stat's & settings in Erlands plugin

    Hi everyone

    As in title, I've been thinking about this for a long time since I'm getting more and more annoyed with Microsoft. Sadly been MS user since Win 3.1 ...(yes I'm "old" ...) not very good with Linux but getting better little by little.
    Anyone done it succesfully and would like to share the experiences of how and what to avoid? Using ; TrackStat, Custom Browse, Custom Scan. My main concern is Trackstat. Know how to use Trackstat backups for restoring but wondering about how to "transform" the windows URL 's for all the file locations to something that Linux understand? Like Linux isn't using "drive letter" in filepaths as windows does. Keen user of Notepad ++, is there any way I could use it or any other tool to do a "search and replace" of a whole backup file? If anyone gone this path I would be very grateful if you have any tips you could share of what to do and not.

    Cheers
    Last edited by doggod; 2020-06-28 at 12:23.

  2. #2
    Junior Member
    Join Date
    Mar 2020
    Location
    Bristol, UK
    Posts
    27
    Hi,
    Good move - I am sure you will enjoy that.
    For modifying contents of text files I would personally use bash scripts in linux, using special tools like awk, sed etc.
    But notepad++ is quite good as well, and you can use regular expressions in search/replace for more tricky cases. I am not particularly good but I'm happy to help if you have examples of patterns you want to change in your files. I am sure plenty of other people in this forum will do the same...

  3. #3
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    1,043
    Quote Originally Posted by doggod View Post
    Using ; TrackStat, Custom Browse, Custom Scan. My main concern is Trackstat. Know how to use Trackstat backups for restoring but wondering about how to "transform" the windows URL 's for all the file locations to something that Linux understand? Like Linux isn't using "drive letter" in filepaths as windows does. Keen user of Notepad ++, is there any way I could use it or any other tool to do a "search and replace" of a whole backup file? If anyone gone this path I would be very grateful if you have any tips you could share of what to do and not.
    In the TrackStat backup files, you have the file path like this:
    Code:
    <url>file%3A%2F%2F%2Fdata%2Fmusic%2FBailter%2520Space%2520-%2520Solar.3%2F08%2520-%2520Locher.flac</url>
    It is encoded, there are online tools like this
    In this example, one would simply replace every instance of
    Code:
    %2Fdata%2Fmusic%2F
    with e.g.
    Code:
    %2Fnewdata%2Fmusic%2F
    which on Linux you can do with
    Code:
    sed -i -e 's/%2Fdata%2Fmusic%2F/%2Fnewdata%2Fmusic%2F/' trackstat_scheduled_backup_20200627.xml
    Notepad++ should work as well.
    Also, make sure the file is in UTF-8 encoding, and not some weird Windows encoding (Notepad++ probably can show / convert file encodings)
    Various SW: Web Interface | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | LMSlib2go | ...
    Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...

  4. #4
    Junior Member
    Join Date
    Mar 2020
    Location
    Bristol, UK
    Posts
    27
    Quote Originally Posted by Roland0 View Post
    Notepad++ should work as well.
    Also, make sure the file is in UTF-8 encoding, and not some weird Windows encoding (Notepad++ probably can show / convert file encodings)
    Agree! Encoding (for accents or special characters) and line breaks problems are classic cases with text-based files coming from Windows... Notepad++ is aware!

  5. #5
    Quote Originally Posted by truscellino View Post
    Agree! Encoding (for accents or special characters) and line breaks problems are classic cases with text-based files coming from Windows... Notepad++ is aware!
    Ah I see, so you reckon it would be better to use a Linux or Mac based texteditor? Sadly have absolutely no experience of anything else so would much prefer using Notepad ++ if possible? See in "Roland0" profile that he's from Austria so maybe he might have some experience of caveats to avoid referring to the use of Å, Ä & Ö. Ok I know Å & Ä is not used in german but at least Ö is (I'm Swedish btw). I seem to remember that from time to time during the years having major problems with this when it comes to filepaths in different applications. And that is just from only using windows ... so can see that there could be hickups in move from one OS to another like I'm planning.

  6. #6
    Junior Member
    Join Date
    Mar 2020
    Location
    Bristol, UK
    Posts
    27
    All the search/replace operations can be done in Notepad++... use this if this is easier to you. What I was saying is that Notepad++ has the options to deal with character encoding and line breaks, so you can do everything in notepad++. However you will have to do things in linux, like 1/ getting the base file path for your music and 2/ subsequently checking that your files coming from LMS Windows work well with LMS on linux. You will find help here in your journey

  7. #7
    Quote Originally Posted by truscellino View Post
    All the search/replace operations can be done in Notepad++... use this if this is easier to you. What I was saying is that Notepad++ has the options to deal with character encoding and line breaks, so you can do everything in notepad++. However you will have to do things in linux, like 1/ getting the base file path for your music and 2/ subsequently checking that your files coming from LMS Windows work well with LMS on linux. You will find help here in your journey

    Ok, been a while ...so been dabbling with this a bit and made progress but had and still have some issues. I've made a very small "experimental" library with just a couple of hundred files but using all folder directorys from my windows install. This to make sure I'll not miss anything when "going live" so to speak.

    Replacing that first bit of the main directory path in notepad++ was pretty straight forward and it worked well. But when controlling files I noticed there where a whole bunch missing the trackstat import data. So t I tracked it down to having folders with the swedish letters Å, Ä, Ö was the issue.

    I found a shortcut to solve this by ticking the "Find alternative files" in the Trackstat "backup/restore/clear setting tab. And then doing a second "restore from file".

    But then noticed still files missing ...why should anything be easy ,right? Tracked it down to it's now ALL FILES with the same swedish Å, Ä, Ö in the filename. Example; MotÖrhead, Blue Öyster Cult, RÖvarkungens Ö, Barn av vÅr Tid e.t.c

    When looking in two different trackstat backup files and comparing in notepad++ one can see that the windows LMS install and the Linux one seemingly read?/writes? different so surely that's the root of the problem? Example an "Ö" in a flac file on the linux install shows up like this when looking in NP++ ; Blue%2520%25C3%2596yster%2520Cult (to make it clearer;this is from an trackstat xml backupfile from the linux install)

    compared to the windows install backupfile; Blue%2520%25D6yster%2520Cult

    Anyone knows what the main problem is? I know I can do a search and replace in NP++ which probably fix it but I would like to know exactly what the main problem is to better understand and learn. Whole idea with my "project" is also learning Linux.So any ideas are much welcomed.
    Last edited by doggod; 2020-07-27 at 02:55.

  8. #8
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    1,043
    Quote Originally Posted by doggod View Post
    Example an "Ö" in a flac file on the linux install shows up like this when looking in NP++ ;
    Blue%2520%25C3%2596yster%2520Cult (to make it clearer;this is from an trackstat xml backupfile from the linux install)
    compared to the windows install backupfile;
    Blue%2520%25D6yster%2520Cult

    Anyone knows what the main problem is? I know I can do a search and replace in NP++ which probably fix it but I would like to know exactly what the main problem is to better understand and learn. Whole idea with my "project" is also learning Linux.So any ideas are much welcomed.
    Encoding issue again, as mentioned before (but in a different context - above was about how text is represented in a file, this is how a file name is represented on a file system)

    Blue%2520%25C3%2596yster%2520Cult means c396 (hexadecimal) is Ö (in UTF-8, generally used by modern file systems)
    Blue%2520%25D6yster%2520Cult means d6 (hexadecimal) is Ö (in Windows-1252, used by legacy components of Microsoft Windows)

    If you think that's confusing, you'll enjoy this page.

    Oh, and btw:
    Quote Originally Posted by doggod
    See in "Roland profile that he's from Austria so maybe he might have some experience of caveats to avoid referring to the use of Å, Ä & Ö. Ok I know Å & Ä is not used in german but at least Ö is (I'm Swedish btw).
    Actually, Ä (and even Ü!) is used rather frequently in german.
    e.g. Ä (und sogar Ü!) würden im Deutschen tatsächlich ziemlich häufig verwendet werden.
    Various SW: Web Interface | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | LMSlib2go | ...
    Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...

  9. #9
    Quote Originally Posted by Roland0 View Post
    Oh, and btw:

    Actually, Ä (and even Ü!) is used rather frequently in german.
    e.g. Ä (und sogar Ü!) würden im Deutschen tatsächlich ziemlich häufig verwendet werden.
    natürlich kenne ich das deutsche ü und sollte mich wirklich daran erinnern, dass ä auch verwendet wird. Eigentlich einmal Deutsch gelernt ... das war erst vor> 30 Jahren. Vielleicht erklärt das die Sache ...

    Ok I admit, used google translate for that one, most likely very poor german?

    I'll back later when I've had some time to study a bit, have some questions now but need to try somethings so I know how to best formulate myself . One thing though, so if i understand this right, it (this encoding "issue") has nothing to do with the Trackstat plug-in?

    But oh shit, just come to think about. You wrote "(in UTF-8, generally used by modern file systems) " ...my main library from windows naturally is on a NTFS disk BUT my test disk (both are external USB disks) is ExFat! Could this be the reason? Should I make me a "testlibrary" on a NTFS disk instead? Would that work under linux? For now I use Dietpi which is based on Debian.

  10. #10
    So I answer my Q myself. Nah, I now tested with a NTFS disk but still same thing.

    I think I understand the thing with different encodings in general terms. But from yours ;
    "Blue%2520%25C3%2596yster%2520Cult means c396 (hexadecimal) is Ö (in UTF-8, generally used by modern file systems)
    Blue%2520%25D6yster%2520Cult means d6 (hexadecimal) is Ö (in Windows-1252, used by legacy components of Microsoft Windows)
    "

    There's parts in your explanation missing that confuses me. You say "c396" but I read "%2520%25C3%2596" from "Blue" to "yster" ...

    I can see there's a C3" but then there's "%25" before the"96" part, how does one know that one should read it as "c396"?

    I'm trying hard to see a pattern but sadly can't :-/ Does "%2520" mean "space"? What does "%25" before "C3" and "D6" mean?

    Is there any converter tool that can be used on a *.xml text file with Windows-1252 encoded file URL's that convert it to UTF-8? Hmm, maybe I’m asking the wrong question? Guess what I first and foremost would like to understand is exactly what is it that makes (if we stay with the example Ö)
    An “ö” appear as “25D6” in the Trackstat on Windows created xml backup file and respectively like “25C3%2596”on the linux install? Is it only because of two different OS’s? Can any setting make a change to this? Or is it just as simple as there’s no way around it other than the long and hard way of search and edit the *xml backup file? Also, can it mean that basically there could be more or other "characters/letters" that is not interpreted correctly by LMS/trackstat Linux install? Like the german ü for example. If so I think I give up my linux project.
    Last edited by doggod; 2020-07-28 at 04:08.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •