Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Tonies caching issue #283

Open
etofi opened this issue Jan 2, 2025 · 6 comments
Open

Custom Tonies caching issue #283

etofi opened this issue Jan 2, 2025 · 6 comments

Comments

@etofi
Copy link

etofi commented Jan 2, 2025

I have integrated my music sharing from the NAS directly into the Docke container.
-v /volume1/music:/teddycloud/data/www/custom_img:ro

Then I made the following entry in tonies.custom.json.

[
{  
  "model": "Eigene - Adya - Classic",
  "title": "Adya - Classic",
  "series": "Adya", 
  "episodes": "Classic",
  "pic": "/custom_img/Alben, Sampler & Singles/Alben & Singles/Adya/Classic/Cover.jpg"
}
]

That works perfectly.
grafik

However, as soon as I activate the "Cache images" this no longer works and the following error appears in the log.

INFO |toniesJson.c:0280:tonies_readJson| Trying to read /teddycloud/config/tonies.custom.json with size 151
INFO |web.c:0152:web_download| Downloading file from '/custom_img/Alben, Sampler & Singles/Alben & Singles/Adya/Classic/Cover.jpg' into local file '/teddycloud/data/cache/B8BEF05ADEBABFE03B9C56E88C08E4DC19D9DD9BED3AF1B2E847CFDBFF5014B3.jpg'
ERROR|web.c:0040:web_parse_url| Unknown protocol
ERROR|web.c:0162:web_download| Failed to parse URL
@SciLor
Copy link
Contributor

SciLor commented Jan 2, 2025

The cache function does not know where to download your image, as the Host URL is not set in the settings and you are using an absolute path without a host.. It works in the browser as it is relative to the main url in your browser.

@etofi
Copy link
Author

etofi commented Jan 2, 2025

The cache function does not know where to download your image, as the Host URL is not set in the settings and you are using an absolute path without a host.. It works in the browser as it is relative to the main url in your browser.

I have also tried using a real URL that works in the browser, but the error remains the same.

[
{  
  "model": "Eigene - Adya - Classic",
  "title": "Adya - Classic",
  "series": "Adya", 
  "episodes": "Classic",
  "pic": "http://192.168.178.170/custom_img/Alben, Sampler & Singles/Alben & Singles/Adya/Classic/Cover.jpg"
}
]

@SciLor
Copy link
Contributor

SciLor commented Jan 2, 2025

Did you try to urlencode the path? Especially the ampersands otherwise are a problems, beside the spaces.

@etofi
Copy link
Author

etofi commented Jan 2, 2025

I have tried this
"pic": "http://192.168.178.170/custom_img/Alben%2C%20Sampler%20%26%20Singles/Alben%20%26%20Singles/Adya/Classic/Cover.jpg"

Unfortunately also an error message

INFO |toniesJson.c:0280:tonies_readJson| Trying to read /teddycloud/config/tonies.custom.json with size 255
src/cache.c:194:35: runtime error: left shift of 237 by 24 places cannot be represented in type 'int'
INFO |web.c:0152:web_download| Downloading file from 'http://192.168.178.170/custom_img/Alben%2C%20Sampler%20%26%20Singles/Alben%20%26%20Singles/Adya/Classic/Cover.jpg' into local file '/teddycloud/data/cache/ED949ED74CBFDF1AD58E479C4E903EA87A043EC69FC356B1E7EC195BDFB9FDEC.jpg'
INFO |cloud_request.c:0200:web_request| Connecting to HTTP server 192.168.178.170:80...
INFO |cloud_request.c:0252:web_request|   trying IP: 192.168.178.170
ERROR|cloud_request.c:0344:web_request| Failed to read HTTP response header!
ERROR|web.c:0182:web_download| download failed, error=Buffer overflow [266]

I would also expect the string from the json file to be URI encoded in the script.

@g3gg0
Copy link
Collaborator

g3gg0 commented Jan 5, 2025

are you trying to connect from one docker container to another on macvlan?

@etofi
Copy link
Author

etofi commented Jan 5, 2025

No I try to connect to a merged folder inside the TeddyCloud Container.

-v /volume1/music:/teddycloud/data/www/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants