Describe the bug
I have the newest LibreTime installed on Ubuntu 16.04. I copied files to /srv/airtime/stor/organize however they aren't uploaded to the console.
To Reproduce
Copy files to the organize directory.
Expected behavior
They should be uploaded to the DB and moved to /srv/airtime/stor/imported.
LibreTime version:
8dd55e2
Installation method:
./installThe stor folder tree should be owned by www-data with folders permissions of 755 and files of 664 or 644
If stor and below is owned by root, or some other owner, this could be the reason for the failures.
Does it import a track from a standard track upload (plupload)?
An installer bug report for this was recently logged.
What is the content of the airtime_analyzer log? /var/log/airtime/airtime_analyzer.log if I remember correctly...
@CGenie Are you copying the files to the organize directory directly? You need to upload them through the web-interface or API to trigger the analyzer code. LibreTime currently doesn't support a way to upload files directly to the filesystem.
I thought I did set www-data but I'll test again. I assume systemctl restart airtime_analyzer would do to make sure the service is restarted (just in case)? The contents of airtime_analyzer.log is basically:
2018-12-29 05:41:22,872 [callback] [DEBUG] Calling <bound method SelectConnection._on_connection_closed of <pika.adapters.select_connection.SelectConnection object at 0x7f7ac6521fd0>> for "0:Connection.CloseOk"
2018-12-29 05:41:22,872 [heartbeat] [DEBUG] Removing timeout for next heartbeat interval
2018-12-29 05:41:22,872 [callback] [DEBUG] Added: {'callback': <bound method SelectConnection._on_connection_start of <pika.adapters.select_connection.SelectConnection object at 0x7f7ac6521fd0>>, 'only': None, 'one_shot': True, 'arguments': None, 'calls': 1}
2018-12-29 05:41:22,873 [connection] [WARNI] Disconnected from RabbitMQ at 127.0.0.1:5672 (200): Normal shutdown
2018-12-29 05:41:22,873 [callback] [DEBUG] Processing 0:_on_connection_closed
2018-12-29 05:41:22,873 [callback] [DEBUG] Calling <bound method _CallbackResult.set_value_once of <pika.adapters.blocking_connection._CallbackResult object at 0x7f7ac6532a70>> for "0:_on_connection_closed"
2018-12-29 05:41:22,873 [blocking_connection] [INFO ] Connection closed; result=BlockingConnection__OnClosedArgs(connection=<pika.adapters.select_connection.SelectConnection object at 0x7f7ac6521fd0>, reason_code=200, reason_text='Normal shutdown')
2018-12-29 05:41:22,874 [message_listener] [INFO ] Exiting cleanly.
2018-12-29 05:41:22,874 [status_reporter] [INFO ] Terminating status_reporter process
2018-12-29 05:41:22,895 [status_reporter] [INFO ] Shutting down status_reporter
2019-01-02 19:37:26,687 [message_listener] [INFO ] Listening for messages...
(last line showed up after restart)
Yes @haremare is right. That trick used to work in Airtime but vanished along with 'watched folders'.
@hairmare Ah I thought that's the way it works -- you copy files to organize and they get picked up automatically.
Issue is I have a fast server connection, but a really slow connection from home where I cannot upload the files directly. How can I proceed? Is there some way to trigger the upload from the server? I'm a programmer so I can do it via code or whatever, I just need to upload them directly from the server and not from home nor via a console :)
If not I guess some remote X11 session to a computer with fast internet is my last resort :)
There are some hacks around to fire the plupload import via bash from a folder. Ours wasn't liked, but others exist. Or, if you have the ram, you could start a lubuntu/whatever session with a browser on the server, using VNC. I have done that. It's quite fast.
@JohnnyC1951 thanks, will try that. Closing as it's already in #70
Basically you can POST files directly to the API. The ftp upload hook has an example.
@hairmare splendid!
That example has (or had) 2 bugs. When I used it, we ended up with the imported stuff belonging to root, which caused problems late. Our fix simply used correct the credentials, in foreground.
The "example" is meant to be run as a proftpd exec hook. As such it would run as the proftp user (and in whaterver chroot proftp is configured with). After uploading files through the API LibreTime takes over and does everything as www-data. The ftp server needs to have it's own dir (not under /src/airtime/stor) for it to make sense.
The chances that the script works out of the box are minimal but pull requests to fix that are very welcome.
@JohnnyC1951 Please stop with the passive aggressive tone... That your account was turned into @ghost is due to the fact that you or someone else that had access to your account deleted it. We have been trying to be accommodating and give feedback on your issues and changes but you have never showed any willingness to accept such feedback in a professional manner.
Sorry for my tone, you might take it as a hint that I'm quite fed up with your attacks.
There seems nowhere else to say this.
Just to get things straight. Robert was a contract coder (and family member) in this office, who now works for our ex-customer in Dublin on Arm boxes for, in-store, departmental radio/signage (TV). Until recently, those boxes ran AT -> LT with enhanced API, extra bells & whistles.
We now only have a handful of stations left - 8 or 9 - but we are most pleased with LT's great recent progress, MUCH BETTER RELIABILITY and were very pleased to be able to remove some of our add-ins as a result!
We (there is only two of us left now) might extend the rental of our budget priced LT remotely provisioned radio stations 'in a little box' for Charity & Thrift shops, using only CC Music, and so avoiding the crippling licencing public performance fees here in the UK. It fits with our 'not-for profit' model and this is where was where we originally started.
So, that is what we actually do. We thought we had quite a lot of original code and experience to share, but have found sharing it challenging.
Sorry for my tone, you might take it as a hint that we are also quite fed up.
Happy New Year
https://gist.github.com/CGenie/f5d8284cb6ed70fc9131acc4ad3975e6
Maybe someone will find this useful.
:D Sometimes you just have to laugh at the irony. It would only seem fair to remove the comments that I had responded to. Too funny. [still giggling]
Most helpful comment
https://gist.github.com/CGenie/f5d8284cb6ed70fc9131acc4ad3975e6
Maybe someone will find this useful.