[% noPlaylistCover = "Squeezebox-noPlaylistCover"; noPlaylistCover = cookies.$noPlaylistCover.value %] [% IF hasPagebar %]
[% PROCESS pagebar useJS="Main.playlist.load" %]
[% END %]
[% IF playercount < 1 %]
[% PROCESS status_noclients.html ajaxUpdate=1 %]
[% ELSE %] [% IF playlist_items %] [% FOREACH item = playlist_items %] [% PROCESS status_list.html %] [% END %] [% ELSE %]
[% "EMPTY" | string %]
[% END %] [% END %]
[% IF playercount > 0 %]
[% IF pageinfo.totalDuration; "TOTAL_TIME" | string; " " _ pageinfo.totalDuration; END %] [% IF current_playlist %] [% "CURRENT_PLAYLIST" | string %][% stringCOLON %] [% current_playlist_name %] [% IF current_playlist_modified %]([% "MODIFIED" | string %])[% END %] [% END %]
[% END %]
[% BLOCK songInfoItem %]
<div id="[% title %]">
<span class="songInfoTitle">
[% IF title; title | string; stringCOLON; END %]
</span>
<span class="songInfoText">[% item %]</span>
</div>
[% END %]
[% BLOCK trackinfo %] [% IF item.currentsong %][% item.noHref=1 %]<b>[% END %]
[% IF item.infohref %]
<a [% item.infohref %] target="browser" class="browseItemLink">[% ( item.text || item.title ) | html %]</a>
[% ELSIF item.num || item.num == 0 %]
[% UNLESS item.noHref %]<a [% PROCESS songinfoItemHRef %] target="browser">[% END %]
[% item.title | html %][% UNLESS item.noHref %]</a>[% END %]
[% ELSIF item.item || !item.defined('level') && item.itemobj %]
<a [% PROCESS songinfoItemHRef %] target="browser" class="browseItemLink">[% item.text | html %]</a>
[% ELSIF item.songtitle %]
<a [% PROCESS songinfoItemHRef %] target="browser" class="browseItemLink">[% item.songtitle | html %]</a>
[% ELSE %]
[% item.text | html %]
[% END %]
[% IF item.includeArtist && (artist = item.artistsWithAttributes ? item.artistsWithAttributes.0 : item.itemobj.artist) && artist.name != item.noArtist; PROCESS artistsAsHTML.html itemobj = item.itemobj; END %]
[% IF item.includeAlbum && (albumTitle = item.albumTitle || (item.itemobj.album && item.itemobj.album.title)) && albumTitle != item.noAlbum && albumTitle != "" %][% stringFROM %]
<a [% PROCESS albumItemHRef %] target="browser" class="browseItemLink">[% albumTitle | html %]</a>[% END %]
[% IF item.currentsong %]</b>[% END %]
[END %]
Use this to get SqueezeJS functionality according to https://wiki.slimdevices.com/index.php/SqueezeJS_tutorial.html
<head>
<link rel="stylesheet" type="text/css" href="https://github.com/Tasha53505/159.356-capstone-project-group/blob/main/html/ext/resources/css/ext-all.css?r=[% revision %]" />
<script type="text/javascript" src="https://github.com/Tasha53505/159.356-capstone-project-group/raw/main/html/ext/adapter/ext/ext-base.js?r=[% revision %]"></script>
<script type="text/javascript" src="https://github.com/Tasha53505/159.356-capstone-project-group/raw/main/html/ext/ext-all.js?r=[% revision %]"></script>
<script type="text/javascript">[% PROCESS html/vars.js %]</script>
<script type="text/javascript" src="https://github.com/Tasha53505/159.356-capstone-project-group/raw/main/html/SqueezeJS/Base.js?r=[% revision %]"></script>
<script type="text/javascript">[% PROCESS html/SqueezeJS/Strings.js %]</script>
<script type="text/javascript" src="https://github.com/Tasha53505/159.356-capstone-project-group/raw/main/html/SqueezeJS/UI.js?r=[% revision %]"></script>
<title>SqueezeJS demo page</title>
</head>
https://wiki.slimdevices.com/index.php/SqueezeCenter_7_Plugins.html I'm having a look at the Documentation for creating Plugins as mentioned there are certain rules that they need to have:
https://wiki.slimdevices.com/index.php/HelloWorld.html (However, it's not updated for the latest version of Squeezebox)
and the link that IS dated for 7.0: https://wiki.slimdevices.com/index.php/SqueezeCenter_7_Plugins.html#A_Detailed_Example
contains outdated / 404 links on how plugins work. -A Detailed Example
However, I did manage to change my code to adapt with the new 7.0 changes of the preference API. See commit 1d73731 ( Updated LanguageSettings.pm with 7.0 changes https://wiki.slimdevices… ….com/index.php/SqueezeCenter_7_Plugins.html - Previously using outdated https://wiki.slimdevices.com/index.php/HelloWorld.html)
For detiled information on this problem - Ive documented my findngs SPECIIFCALLY for the Save function in Issue 35
By using: https://lyrion.org/reference/cli/using-the-cli/#jsonrpcjs (JSON RPC) - I am looking into setting preferences from the FRONTEND instead of using Perl, as recommeneded by one of the delvopers at Lyrion Music Serever
For detiled information on this problem Ive documented my findngs SPECIIFCALLY for the Save function in https://github.com/Tasha53505/159.356-capstone-project-group/issues/35
If you're having issues with buttons in general - the fix is described in Detail in https://github.com/Tasha53505/159.356-capstone-project-group/issues/35
Documented issue here: https://github.com/Tasha53505/159.356-capstone-project-group/issues/73
(Specifically for the rescan button) - but this will help in general, is that C:
is NOT a valid path, it needed to be C/
--> Also, I needed to format it so that it was a 2D Array
const formattedPath = [folderPath];
and const updatedData = data.replace(/mediadirs:\s*\[.*?\]/,
mediadirs: ["${newMediaDir}"]);
https://lyrion.org/reference/cli/using-the-cli/#jsonrpcjs --> Documentation is incredibly helpful
0 can be used as a placeholder for playerID --> if the command your sending supports it.
NOTE: This has now been replaced by the use of a perl plugin
The folder menu is created by Slim::Menu::BrowseLibrary::_bmf which gets the folder data with a 'musicfolder' request which is dispatched by Slim::Control::Request which calls Slim::Control::Queries::mediafolderQuery
Documentation: https://jestjs.io/docs/getting-started
Installed Jest with npm install --save-dev jest
and npm install --save-dev jest @testing-library/jest-dom @testing-library/dom
--> as I'm hevaily using the DOM
Added to package.json
"scripts": {
"test": "jest"
}
Tests in __tests__
folder
Run tests with npm run test
Accordion Panel Tests
Songs Left Panel test
Artists left panel test
Albums Left Panel Test
Basic Settings Language
Basic Settings Media Folders directory
Basic Settings Rescan button
Basic Settings Playlists Folder
Behaviour Settings Browse Artists
Behaviour Settings Release Types
Behaviour Settings Filters
npm install selenium-webdriver
npm install mocha chai
npm install chromedriver
Install the Extension for your browser. --> https://www.selenium.dev/downloads/
Checkout documentation for YOUR specific browser
Once Selenum tests are written inside "selenium-test" folder --> make sure the extension is .mjs
Run command npx mocha test.js