toniebox-reverse-engineering / teddycloud

teddyCloud is an open source server replacement for the Boxine Cloud
https://toniebox-reverse-engineering.github.io/docs/tools/teddycloud/
GNU General Public License v2.0
487 stars 36 forks source link

Creation of "xxx.taf.json" and corresponding folder in LIBRARY #168

Closed oliver-koch closed 6 months ago

oliver-koch commented 6 months ago

Creation of "xxx.taf.json" and corresponding folder in LIBRARY

Behavior was identified in forum as bug. Please see here: https://forum.revvox.de/t/how-to-move-to-the-new-library-behaviour-from-the-old-content-behaviour/445

_Tested on TeddyCloud v0.5.1 (3fce6b5) - 2024-05-06 11:22:22 +0000 ubuntu linux-x86_64(64) and TeddyCloud v0.5.0 (a8f6e43) - 2024-04-30 19:24:29 +0000 linux-x8664(64)

What was tested / How to reproduce:

  1. Move TAF file from CONTENT to LIBRARY:///by/audioID/1623426891.taf (Take correct audioID e.g. from old webinterface)
  2. Change JSON from '"source": ""' to '"source": "lib://by/audioID/1623426891.taf"'
  3. Open new /web/tonies
  4. Select Tonie from step 1 and press "Play" (to test if move of TAF and change of JSON was successfull)

What was expected:

Tonie was played only.

What happens:

  1. File LIBRARY:///by/audioID/1623426891.taf.json was created → not ok
  2. Folder LIBRARY:///by/audioID/162342 was created → not ok

grafik

Attached you can find the logs:

INFO |handler_cloud.c:0041:handleCloudTime|  >> respond with current time
INFO |mqtt.c:0684:mqtt_init_box| Skipping client 'Toniebox' (cn: 'default')
INFO |mqtt.c:0684:mqtt_init_box| Skipping client 'Toniebox' (cn: 'default')
INFO |handler_cloud.c:0441:handleCloudContent|  >> client requested content for rUID 2f3a6116500304e0, auth 00000000...
INFO |handler_cloud.c:0314:dumpRuidAuth| Dumped rUID 2f3a6116500304e0 and auth into content.json
INFO |handler_cloud.c:0676:handleCloudContent| Serve local content from /teddycloud/data/library/by/audioID/1623426891.taf
ERROR|handler_cloud.c:0690:handleCloudContent|  >> file /teddycloud/data/library/by/audioID/1623426891.taf not available or not send, error=Write failed [521]...
INFO |handler_cloud.c:0433:handleCloudContent|  >> client requested partial download
INFO |mqtt.c:0684:mqtt_init_box| Skipping client 'Toniebox' (cn: 'default')
INFO |handler_cloud.c:0441:handleCloudContent|  >> client requested content for rUID 2f3a6116500304e0, auth 00000000...
INFO |handler_cloud.c:0314:dumpRuidAuth| Dumped rUID 2f3a6116500304e0 and auth into content.json
INFO |handler_cloud.c:0676:handleCloudContent| Serve local content from /teddycloud/data/library/by/audioID/1623426891.taf
INFO |handler_cloud.c:0433:handleCloudContent|  >> client requested partial download
INFO |mqtt.c:0684:mqtt_init_box| Skipping client 'Toniebox' (cn: 'default')
INFO |handler_cloud.c:0441:handleCloudContent|  >> client requested content for rUID 2f3a6116500304e0, auth 00000000...
INFO |handler_cloud.c:0314:dumpRuidAuth| Dumped rUID 2f3a6116500304e0 and auth into content.json
INFO |handler_cloud.c:0676:handleCloudContent| Serve local content from /teddycloud/data/library/by/audioID/1623426891.taf
SciLor commented 6 months ago

Thank you for your detailed report. Just an additional question: Does the ruid/auth is in the newly created taf.json?

oliver-koch commented 6 months ago

You are welcome.

Yes, it is: grafik

And is not dumped into original JSON from CONTENT: grafik

SciLor commented 6 months ago

https://github.com/toniebox-reverse-engineering/teddycloud/commit/f8b8d9011f51ad42da5b156b0037a672045d4a01 This should fix that in develop. I didn't test this deeply.

oliver-koch commented 6 months ago

_Tested with TeddyCloud vX.X.X (f8b8d90) - 2024-05-07 11:14:47 +0000 ubuntu linux-x8664(64)

First test seems to be ok. No additional files/folder created on LIBRARY path. The ruid/auth is now added to the JSON file at CONTENT path. I will play with it a while, and give feedback here. Thank you very much!

oliver-koch commented 6 months ago

Moved now ~15 Tonies from CONTENT to LIBRARY. Sees to be fixed and can be closed. Thanks again!