Posts: 565
Threads: 5
Joined: Mar 2020
Reputation:
30
(08-20-2020, 08:23 PM)TheOldPresbyope Wrote: As for points #1 and #2, moOde is built on Linux. It's unreasonable to expect the input routines in every Linux app to always be protected against foreign OS's end-of-line conventions.
There is a Linux utility named "dos2unix" which will convert text files between so-called CRLF and LF line endings. It can be installed from the command line in Raspberry Pi OS with "sudo apt-get install dos2unix".
Regards,
Kent
I already sanitized (using notepad++) and, infact, the input runs until...a number that changes with the stations (as already I sayd 40/45).
Posts: 13,363
Threads: 302
Joined: Mar 2018
Reputation:
538
Prolly best to make your import zip available as a download link so it can be analyzed.
Posts: 565
Threads: 5
Joined: Mar 2020
Reputation:
30
(08-20-2020, 08:36 PM)TheOldPresbyope Wrote: @fdealexa
As for #3, I have now read your post several times and still don't think I understand what the issue is.
If you could upload to a file-sharing site (DropBox, GoogleDrive, etc) one of your zip files known to hang on import and send me a link via this forum's private message (PM) function, I'll be happy to download it and have a look.
Regards,
Kent
I'll do that very happy...
THANKS A LOT to both of you,
Francesco
Posts: 13,363
Threads: 302
Joined: Mar 2018
Reputation:
538
@ TheOldPresbyope ,
IIRC the import could fail if the zip file is > 30MB. It's a param in php.ini but I'm heading out the door so won't be able to look at it till later.
...
Posts: 565
Threads: 5
Joined: Mar 2020
Reputation:
30
I have just sent a PM to you. would you please confirm?
Thanks again
Posts: 5,995
Threads: 175
Joined: Apr 2018
Reputation:
233
08-21-2020, 12:14 AM
(This post was last modified: 08-21-2020, 12:28 AM by TheOldPresbyope.
Edit Reason: added specific IDs
)
@ fdealexa
I unzipped the first file, 'stations-01-IN-43 logos - All without.zip'
I opened the cfg_radio.csv file in LibreOffice Calc.
It contains 6 entries with improper syntax. Each of their URLs contain a semicolon ';'. These entries won't be parsed correctly by Tim's import code.
Note added in edit: I'm speaking of the entries with IDs 113, 509, 520, 528, 529, and 557.
Based on this, I'm not going to look at the other six files. These syntax errors must have been introduced during manual editing. and it seems likely every input file would need similar cleaning.
Regards,
Kent
Posts: 565
Threads: 5
Joined: Mar 2020
Reputation:
30
It you try, this zip is accepted, it ontains 60 stations , but 43 logos only. If you add a logo more it will hangs the systems.
Posts: 13,363
Threads: 302
Joined: Mar 2018
Reputation:
538
Is the zip file larger than 30MB?
Posts: 5,995
Threads: 175
Joined: Apr 2018
Reputation:
233
08-21-2020, 01:20 AM
(This post was last modified: 08-21-2020, 01:25 AM by TheOldPresbyope.
Edit Reason: amended
)
(08-21-2020, 12:57 AM)Tim Curtis Wrote: Is the zip file larger than 30MB?
No. 21+MB.
It took me 'til after dinner to spin up a test system I didn't mind borking if something went wrong. As @ fdealexa says, it did import the first zip file. The six entries I mentioned are in the cfg_radio table with invalid URLs (containing semicolons, which, fortunately, do not affect the stations I tested from playing). Will continue.
Regards,
Kent
Posts: 5,995
Threads: 175
Joined: Apr 2018
Reputation:
233
(08-21-2020, 01:20 AM)TheOldPresbyope Wrote: (08-21-2020, 12:57 AM)Tim Curtis Wrote: Is the zip file larger than 30MB?
No. 21+MB.
It took me 'til after dinner to spin up a test system I didn't mind borking if something went wrong. As @fdealexa says, it did import the first zip file. The six entries I mentioned are in the cfg_radio table with invalid URLs (containing semicolons, which, fortunately, do not affect the stations I tested from playing). Will continue.
Regards,
Kent
Oh, duh. My old-timer's disease is kicking in. This is file transmission via HTTP which means base64 encoding.
I checked a few files with the base64 command. The OP has hit the point where the binary zip file is still less than 30MB but grows to greater than 30MB when encoded.
When I try to import it, I see a 413 error reported to the browser console.
Code: POST http://moode3a/command/moode.php?cmd=import_stations 413 (Request Entity Too Large)
Apparently, the code doesn't account for this since it hangs until cancelled (e.g., click anywhere on the screen).
Regards,
Kent
|