Announcement
Collapse
No announcement yet.
Announce: Material Skin
Collapse
X
-
Last edited by kidstypike; 2022-05-04, 21:43.Server - LMS 8.4.0 RPi4B 4GB/NanoSound ONE case/pCP 8.1.0 - 75K library, playlists & LMS cache on Sata SSD (ntfs)
Lounge - DAC32 - AudioEngine B2
Office - RPi 3B+/HiFiBerry DAC HAT/RPi screen - Edifier D12
Bedroom - Echo Show 8
Spares - 1xSB Touch, 1xSB3, 4xRPi, AVI DM5 speakers -
Lost ads when using Qobuz plugin with Material Skin
I found the following strange behavior with the Qobuz plugin, which seems to only occur with Material Skin because everything works fine with the default skin. Maybe this also happens elsewhere with other plugins.
To check the following you need a Qobuz subscription and the last Qobuz Plugin 2.5.1.
To reproduce the effect try the following example:
1.) Select Qobuz Search and search for "pink floyd".
2.) Now select "The Wall" in "Albums".
3.) Now click on "Copyright" and display it.
(The copyright is displayed correctly)
4.) Back and now click on "Description" and display it.
This description contains some blank lines ("\n"), which are also shown in the display.
5.) Back and click "Copyright" again and display it.
Now Copyright text is gone, the display is blank and it does not come back until you exit the album and select it again.
Of course that shouldn't happen.
I tested it with Kiwi browser on Android and with Squeezelite-X on the PC.
I have temporarily fixed the problem by removing all "\n" contained in the strings to be displayed in the procedure in the program code of the Qobuz plugin.
This doesn't always look optimal, but it runs stably without this behavior.
Of course it would be nicer if you could find out why it works with the default skin and not with the material skin so that you can possibly correct it.
Maybe I can help find out.Comment
-
....
4.) Back and now click on "Description" and display it.
This description contains some blank lines ("\n"), which are also shown in the display.
5.) Back and click "Copyright" again and display it.
Now Copyright text is gone, the display is blank and it does not come back until you exit the album and select it again.
....
This was with the remastered 2011 version of The Wall, the only one I see on Qobuz.Usually running latest beta LMS nightly on Raspberry Pi OS with virtual players. Occasionally using SB Radio, Boom or Classic.Comment
-
Sorry, but I don't use any music streaming services. To look into this I'll need the JSON REQ/RESP messages for each stage - see my signature. Note, your browser will probably ellide some of the mesages, in which case you need to click on the "..." to expand these.Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.Comment
-
Announce: Material Skin
>> I found the following strange behavior with the Qobuz plugin, which
>> seems to only occur with Material Skin because everything works fine
>> with the default skin.
>> ...
>
> Sorry, but I don't use any music streaming services. To look into this
> I'll need the JSON REQ/RESP messages for each stage - see my signature.
> Note, your browser will -probably- ellide some of the mesages, in which
> case you need to click on the "..." to expand these.
Do you have the "textarea" implemented in Material? The "Description" is
returned as a "textarea" item, rather than just a text.
Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)Comment
-
However, the original reporter states that it shows initially, but not after going back out, showing antother section, and then showing the original section (where it is comming up blank).Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.Comment
-
Here is the console output of album "Heavy Load Blues" from "Gov't Mule":
Code:material.min.js?r=2.9.4:236 [09:49:40] JSON REQ: ["aa:aa:da:35:85:6d",["qobuz","items",0,25000,"item_id:2.1.2.30","menu:qobuz"]] material.min.js?r=2.9.4:236 [09:49:40] JSON RESP: {"params":["aa:aa:da:35:85:6d",["qobuz","items","0",25000,"item_id:2.1.2.30","menu:qobuz"]],"result":{"base":{"actions":{"playControl":{"params":{"item_id":"2.1.2.30","_index":"0","menu":"qobuz","_quantity":"25000"},"cmd":["qobuz","items"],"player":0,"itemsParams":"playControlParams","window":{"isContextMenu":1}},"go":{"params":{"menu":"qobuz"},"cmd":["qobuz","playlist","play"],"itemsParams":"params","nextWindow":"nowPlaying","player":0},"add-hold":{"cmd":["qobuz","playlist","insert"],"player":0,"itemsParams":"params","params":{"menu":"qobuz"}},"add":{"params":{"menu":"qobuz"},"cmd":["qobuz","playlist","add"],"itemsParams":"params","player":0},"more":{"window":{"isContextMenu":1},"params":{"menu":"qobuz"},"cmd":["qobuz","items"],"player":0,"itemsParams":"params"},"play":{"params":{"menu":"qobuz"},"cmd":["qobuz","playlist","play"],"itemsParams":"params","nextWindow":"nowPlaying","player":0}}},"offset":0,"title":"Copyright","window":{"windowStyle":"text_list","textarea":"© 2022 Gov’t Mule, Inc. ℗ 2022 Gov’t Mule, Inc."},"count":0,"item_loop":[{}]},"method":"slim.request","id":34} material.min.js?r=2.9.4:236 [09:49:53] JSON REQ: ["aa:aa:da:35:85:6d",["qobuz","items",0,25000,"menu:qobuz","item_id:2.1.2.25"]] material.min.js?r=2.9.4:236 [09:49:53] JSON RESP: {"params":["aa:aa:da:35:85:6d",["qobuz","items","0",25000,"menu:qobuz","item_id:2.1.2.25"]],"method":"slim.request","result":{"title":"Description","offset":0,"base":{"actions":{"add-hold":{"cmd":["qobuz","playlist","insert"],"itemsParams":"params","player":0,"params":{"menu":"qobuz"}},"go":{"cmd":["qobuz","playlist","play"],"player":0,"nextWindow":"nowPlaying","itemsParams":"params","params":{"menu":"qobuz"}},"playControl":{"cmd":["qobuz","items"],"player":0,"itemsParams":"playControlParams","params":{"_quantity":"25000","menu":"qobuz","item_id":"2.1.2.25","_index":"0"},"window":{"isContextMenu":1}},"more":{"params":{"menu":"qobuz"},"cmd":["qobuz","items"],"player":0,"itemsParams":"params","window":{"isContextMenu":1}},"play":{"cmd":["qobuz","playlist","play"],"player":0,"nextWindow":"nowPlaying","itemsParams":"params","params":{"menu":"qobuz"}},"add":{"player":0,"itemsParams":"params","cmd":["qobuz","playlist","add"],"params":{"menu":"qobuz"}}}},"window":{"textarea":"Der Blues hat schon immer eine Rolle in der Musik von Gov't Mule gespielt - ihre Wurzeln liegen in einem bluesigen Hard-Rock-Sound, und sie covern regelmäßig Blues-Songs. Mit dem im November 2021 veröffentlichten Heavy Load Blues veröffentlicht die Kultband aber ihr erstes reines Blues-Album. Die Gruppe spielte die erdigen Blues-Nummern live im Studio ein, nur wenige Overdubs wurden später hinzugefügt. Neben einigen Originalsongs von Warren Haynes covern Gov't Mule hier auch zahlreiche Nummern von Blues-Meistern wie Junior Wells (\"Snatch It Back and Hold It\"), Ann Peebles (\"I Feel Like Breaking Up Somebody's Home\"), Howlin' Wolf (\"I Asked for Water (She Gave Me Gasoline)\") oder Elmore James (\"Blues Before Sunrise\") mit dicken Grooves und rauer Intensität. Das Album kam auf Platz 16 der deutschen Charts.\n© TiVo","windowStyle":"text_list"},"item_loop":[{}],"count":0},"id":35} material.min.js?r=2.9.4:236 [09:50:00] JSON REQ: ["aa:aa:da:35:85:6d",["qobuz","items",0,25000,"item_id:2.1.2.30","menu:qobuz"]] material.min.js?r=2.9.4:236 [09:50:00] JSON RESP: {"id":36,"params":["aa:aa:da:35:85:6d",["qobuz","items","0",25000,"item_id:2.1.2.30","menu:qobuz"]],"method":"slim.request","result":{"base":{"actions":{"go":{"itemsParams":"params","nextWindow":"nowPlaying","player":0,"cmd":["qobuz","playlist","play"],"params":{"menu":"qobuz"}},"add-hold":{"params":{"menu":"qobuz"},"cmd":["qobuz","playlist","insert"],"itemsParams":"params","player":0},"playControl":{"window":{"isContextMenu":1},"params":{"_quantity":"25000","menu":"qobuz","_index":"0","item_id":"2.1.2.30"},"cmd":["qobuz","items"],"player":0,"itemsParams":"playControlParams"},"add":{"itemsParams":"params","player":0,"cmd":["qobuz","playlist","add"],"params":{"menu":"qobuz"}},"more":{"cmd":["qobuz","items"],"player":0,"itemsParams":"params","params":{"menu":"qobuz"},"window":{"isContextMenu":1}},"play":{"itemsParams":"params","nextWindow":"nowPlaying","player":0,"cmd":["qobuz","playlist","play"],"params":{"menu":"qobuz"}}}},"offset":0,"title":"Copyright","item_loop":[{}],"count":0,"window":{"windowStyle":"text_list","textarea":"© 2022 Gov’t Mule, Inc. ℗ 2022 Gov’t Mule, Inc."}}}
1.) Copyright
2.) Description
3.) Copyright
In step 3 the Copyright is blank.
In the log of step 2 (description) is at the end only one "\n". If the description has no "\n" this doesn't happen, a little bit crazy but reproducible.
Maybe you can see what's going wrong, whether in the plugin or somewhere else.
LMS 8.3, MATERIAL 2.9.4, Qobuz 2.5.1 Plugin, Browser: Brave 1.3.8 (Chrome), german qobuz subscriptionComment
-
I have now discovered a second case in which some ads are initially empty, although the data is definitely there.
You can also see the data in the log, but they are not displayed.
I'm using the following album now: "Black Train" by John Coltrane.
First I go to the search and select the album.
Then I tap on Copyright and get the text displayed.
As an alternative, I go to the "Bestseller" album list and select the album.
If I now tap on Copyright, no text is displayed, the entry remains empty.
Very strange, it seems to depend on various factors, so it could also be due to the Qobuz plugin.
Here is the log of jumping into the album from the search and then tapping on copyright:
Blue train - Search - Copyright ok.log
Here is the log of jumping from the "Bestseller" album list and then tapping on Copyright:
Blue train - Bestseller - Copyright blank.log
In the following video you can see the effect on an Android 11 mobile phone with kiwi browser:
https://www.mediafire.com/file/a8ep4...11-15.mp4/fileComment
-
I hacked your original 3 responses into Material and they seem to work. Are any errors logged? I guess not, as you would have listed them here.
Can you use the git version of Material? If so please edit browse-resp.js and add the following after lin 656:
Code:console.log(JSON.stringify(resp));
Code:} console.log(JSON.stringify(resp)); } } else if (data.result.artists_loop) { var isComposers = false;
After that can you try editing the same file, but change line 613 to:
Code:id: parent.id+".textarea."+new Date().getTime()
Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.Comment
-
correct, no errors are logged.
Can you use the git version of Material? If so please edit browse-resp.js and add the following after lin 656:
Hard-reload Material in your browser (without JSON debug), and re-do steps to blank Copyright view. This log will show the decoded results, and what Material should be showing. Does it show the text of the Copyright item?
Blue train - Bestseller - Copyright blank - dev.log
After that can you try editing the same file, but change line 613 to:
...then hard-reload again. Does that help?
Blue train - Search - Copyright ok - dev1.log
Blue train - Bestseller - Copyright blank - dev1.logComment
-
To be honest, I didn't think it would - clutching at straws.
..and no obvious differences. Both have the copyright text in the "items" list - and the entry is the same for both. Very odd. My guess is something is breaking the list view between calls.Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.Comment
-
Based on this thought, I looked at the code of the Qobuz plugin again and carried out numerous tests and tried a lot. I think I've found something, but I want to check it out with Michael first. Not that there are any side effects from the code change.
I'll report when I know more.Comment
-
Announce: Material Skin
> ..and no obvious differences. Both have the copyright text in the
> "items" list - and the entry is the same for both. Very odd. My guess is
> something is breaking the list view between calls.
I did some digging your code. If I change replaceNewLines() to always
return the un-altered string, the issue doesn't appear.
If I leave replaceNewLines() as is, but make sure that the copyright
does have a new line (\n) character, the issue isn't their either.
Or if I (as Sven suggested) removed all new line characters on the
server side, the issue doesn't appear either.
So IMHO there's a problem with removing the new lines in the browser.
Could there be some caching involved? As soon as I have a textarea item
with new line and another one without, the latter would no longer
display after the first had been rendered.
Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)Comment
-
I 100% agree the issue is with Material, I'm just not 100% sure where it is. I find it odd that Material does process both calls correctly - as you can see from the logs. Just it then fails to display the decoded item
Not explicitly.
If you change (in utils.js)
Code:function replaceNewLines(str) { return str ? str.replace(/\n/g, "<br/>").replace(/\\n/g, "<br/>") : str; }
Code:function replaceNewLines(str) { return str ? str.replace(/\n/g, "<br/>") : str; }
Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.Comment
-
If the above does not help, whaty about editing browse-resp.js @ line 611 and change
Code:title: text, type: text.startsWith("<") || text.indexOf("<br/>")>0 ? "html" : "text",
Code:title: text.startsWith("<") ? text : ("<p>"+text+"</p>"), type: "html",
Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.Comment
Comment