CorneliousJD Posted May 8, 2020 Share Posted May 8, 2020 (edited) This is a container running ngixn and serving up a custom homepage develped by jeroenpardon. I've forked it to fix a few minor issues and create a working docker container and unraid template. Original repo is here: https://github.com/jeroenpardon/sui My fork is here: https://github.com/CorneliousJD/SUI-Startpage This should be quick to setup and use, just edit the apps.json and links.json files. You can also add new search providers if you wish by editing the provider.json file. When first starting this container it will determine your appdata folder for this is empty and copy in the basic template files that you are then free to modify yourself. If you ever want to "start over" with the container, just empty the appdata folder and restart or force-update the container and it will give you a fresh set of files to work with again. Enjoy! Edited May 8, 2020 by CorneliousJD 1 Quote Link to comment
CoZ Posted May 9, 2020 Share Posted May 9, 2020 As requested: The docker installs with all the files/directories protected, forcing the user to chmod -R +rwx /mnt/user/appdata/suistartpage in the terminal. Editing the apps.json in Notepad++ to the (serverIP):PORT for the associated docker fails to load the docker page. For instance editing the Jackett entry in the apps.json to: (serverIP):Port (in my case: 192.168.1.102:9117) returns a Error code: SSL_ERROR_RX_RECORD_TOO_LONG Quote Link to comment
CorneliousJD Posted May 9, 2020 Author Share Posted May 9, 2020 9 minutes ago, CoZ said: As requested: The docker installs with all the files/directories protected, forcing the user to chmod -R +rwx /mnt/user/appdata/suistartpage in the terminal. Editing the apps.json in Notepad++ to the (serverIP):PORT for the associated docker fails to load the docker page. For instance editing the Jackett entry in the apps.json to: (serverIP):Port (in my case: 192.168.1.102:9117) returns a Error code: SSL_ERROR_RX_RECORD_TOO_LONG Thanks for reporting this, I just modified the starup script to modify the permissions of the files that get copied into appdata. I'd recommend clearing out your /appdata/suistartpage/ folder entirely and checking for updates or forcing an update on the container, as I just published an update that should fix this for you. Along with that update I fixed it so you now have to manually specify http vs https in your URLs as before it was forcing https as a base URL. Now that it's changed you should see a new example apps.json file being populated into the appdata folder as long as it's an empty folder when you update. From here you should be able to specify and point to local http or https items or even web URLs that you might be reverse proxying. If you run into more problems let me know and I'll see what I can do about getting them fixed up! 1 Quote Link to comment
CoZ Posted May 9, 2020 Share Posted May 9, 2020 Deleting the appdata contents and forcing the update didn't pull down any files. I had to remove and re-install to get the files to show up. After that, using Jackett as an example, and re-starting the container after making the changes to the URL, it works. However, looking at the log entries there still seems to be some errors associated: [error] 13#13: *1 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory), client: 192.168.1.100, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "192.168.1.102:8489" rm: can't remove '/usr/share/nginx/html/License.md': No such file or directory rm: can't remove '/usr/share/nginx/html/README.md': No such file or directory rm: can't remove '/usr/share/nginx/html/start.sh': No such file or directory Just a small tidbit, anyway to make it open the links in a new tab instead of opening the link in the same tab. Probably more convenient that way for the end user. Quote Link to comment
CoZ Posted May 10, 2020 Share Posted May 10, 2020 I also forgot to add, that yes, the write permissions are correct. Since I had to remove the appdata/suistartpage folder and pull down the docker again, I'm able to modify that .json files without having to chmod the files & directories. So that worked. Quote Link to comment
CoZ Posted May 10, 2020 Share Posted May 10, 2020 Just tried to edit the links.json file. Those will not change. Removed "Box" under "CLOUD" and changed it to my Seedbox URL - the "Box" link stayed. Changed the Youtube link from youtube.com/subscriptions to just youtube.com - again youtube.com/subscriptions showed back up. I stopped the docker and restarted it. Still the same links appeared. Now THAT is strange. Quote Link to comment
CorneliousJD Posted May 10, 2020 Author Share Posted May 10, 2020 10 hours ago, CoZ said: However, looking at the log entries there still seems to be some errors associated: Just a small tidbit, anyway to make it open the links in a new tab instead of opening the link in the same tab. Probably more convenient that way for the end user. So the errors are just a lack of favicon.ico. I suppose I could add one to the container. I don't think I'll be coding a settings page but I could force new tabs instead of same window, that's an easy link modification in index.html. When I have some time I'll look at both of those things and update accordingly, in the meantime you can change your index.html file to show the a href="url" section to also have target="_blank" if you're familair with HTML and that will force open a new tab for your links. 3 minutes ago, CoZ said: Just tried to edit the links.json file. Those will not change. Removed "Box" under "CLOUD" and changed it to my Seedbox URL - the "Box" link stayed. Changed the Youtube link from youtube.com/subscriptions to just youtube.com - again youtube.com/subscriptions showed back up. I stopped the docker and restarted it. Still the same links appeared. Now THAT is strange. This is surely your cache, hold shift and refresh, or just clear your cache, try incognito, etc. I'm able to change those links just fine on my side and they're working over here. Quote Link to comment
CoZ Posted May 10, 2020 Share Posted May 10, 2020 12 hours ago, CorneliousJD said: This is surely your cache, hold shift and refresh, or just clear your cache, try incognito, etc. I'm able to change those links just fine on my side and they're working over here. You are correct, cache issue. That was strange because any other changes I made to the .json files appeared instantly. It never occurred to me that the links section would be effected by the cache. Quote Link to comment
CorneliousJD Posted May 13, 2020 Author Share Posted May 13, 2020 Fixed the favicon errors, removal of files being forced when they don't exist, and the forcing of links to open in new tabs. The logic of what will be copied into appdata is now improved too! It will check for each individual file index.html favicon.ico apps.json links.json proivders.json If any of them are missing it will copy in the default files. Then it check the assets folder as a whole and copies that in if it doesn't exist, this way any customizations you make to any files can be kept. I should really do the same logic with the assets folder but I just don't have the time right now to do so, anyone editing them should be able to figure out how to revert their changes, or they can always just download a fresh file from the github if needed. Quote Link to comment
CoZ Posted May 17, 2020 Share Posted May 17, 2020 No errors on start/stop/restart of the container any longer. Looks like you nailed it! 👍 Excellent work bringing this over to unRaid! I only hope more people discover this and use it as sort of an appreciation of your hard work. Now I've just got to finalize my 'organization skills' as far as what I want where app wise and link wise. It's now a pinned tab in FireFox! Quote Link to comment
Repooc Posted May 19, 2020 Share Posted May 19, 2020 is it me or do custom providers not work? I added my own provider which is a searx installation but the page is acting like the /z i made it isnt even doing anything. Quote Link to comment
CorneliousJD Posted May 19, 2020 Author Share Posted May 19, 2020 17 minutes ago, Repooc said: is it me or do custom providers not work? I added my own provider which is a searx installation but the page is acting like the /z i made it isnt even doing anything. Can you post your provider code? I'll take a peek. Quote Link to comment
Repooc Posted May 19, 2020 Share Posted May 19, 2020 (edited) { "providers" : [ {"name":"Allmusic","url":"https://www.allmusic.com/search/all/","prefix":"/a"}, {"name":"Discogs","url":"https://www.discogs.com/search/?q=","prefix":"/di"}, {"name":"Duck Duck Go","url":"https://duckduckgo.com/?q=","prefix":"/d"}, {"name":"iMDB","url":"https://www.imdb.com/find?q=","prefix":"/i"}, {"name":"TheMovieDB","url":"https://www.themoviedb.org/search?query=","prefix":"/m"}, {"name":"Reddit","url":"https://www.reddit.com/search?q=","prefix":"/r"}, {"name":"Qwant","url":"https://www.qwant.com/?q=","prefix":"/q"}, {"name":"Repooc Search","url":"https://search.MYDOMAIN.HERE/?q=","prefix":"/z"}, {"name":"Soundcloud","url":"https://soundcloud.com/search?q=","prefix":"/so"}, {"name":"Spotify","url":"https://open.spotify.com/search/results/","prefix":"/s"}, {"name":"TheTVDB","url":"https://www.thetvdb.com/search?q=","prefix":"/tv"}, {"name":"Trakt","url":"https://trakt.tv/search?query=","prefix":"/t"} ] } It does show up in the options list in Search Options but doesnt seem to work is all, like the search.js isnt parsing the providers file or something? Edited May 19, 2020 by Repooc Quote Link to comment
Repooc Posted May 19, 2020 Share Posted May 19, 2020 43 minutes ago, CorneliousJD said: Can you post your provider code? I'll take a peek. Just did some testing it seems the only thing the provider file does is just list the providers in the system options not actually change what search providers can or cant be used in the search.js script Quote Link to comment
CorneliousJD Posted May 20, 2020 Author Share Posted May 20, 2020 (edited) On 5/18/2020 at 10:22 PM, Repooc said: Just did some testing it seems the only thing the provider file does is just list the providers in the system options not actually change what search providers can or cant be used in the search.js script Reminder that I did not write SUI, someone else did, I just adapted it for a container and made some fixes. You are correct though, all providers.json does after researching is simply show it on the UI, it doesn't actually code the function in. In order to do that, you must edit search.js at line 59 It's pretty easy to add your own though, see my example added in here above allmusic. The "case" or trigger is "z" so /z will trigger this in the search bar. You can also add it to providers.json so it shows up in the GUI correctly as well so you can reference it later. EDIT: Also updated the repository readme.md file on github with a similar example for future users wanting to do the same! function search(text) { var option = text.substr(1, text.indexOf(' ') - 1) || text.substr(1); var subtext = text.substr(2 + option.length); if (text[0] === '/') { if (text.indexOf(' ') > -1) { switch (option) { case "z": window.location = "https://www.testdomaon.com/search/all/" + subtext; break; case "am": window.location = "https://www.allmusic.com/search/all/" + subtext; break; Edited May 20, 2020 by CorneliousJD 1 Quote Link to comment
Repooc Posted May 20, 2020 Share Posted May 20, 2020 Yeah, I guess I should have said, I have figured out how to modify the code for myself but I guess to others it was misleading that it added your to the list if you modified that file. Quote Link to comment
CorneliousJD Posted May 21, 2020 Author Share Posted May 21, 2020 3 hours ago, Repooc said: Yeah, I guess I should have said, I have figured out how to modify the code for myself but I guess to others it was misleading that it added your to the list if you modified that file. I had assumed the same when i was checking this out, never tested it with any additional proivders though, glad you sorted it out. The readme is updated for anyone new that comes along that wants to poke at it too at least Thanks! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.