This commit is contained in:
2024-02-17 23:28:02 +01:00
parent f446953934
commit 74915249af
6 changed files with 76 additions and 35 deletions

View File

@@ -207,9 +207,11 @@ function authenticateJellyfin(){
// Extracting ServerId and AccessToken
var serverId = responseJson.ServerId;
var accessToken = responseJson.AccessToken;
var userID = responseJson.SessionInfo.UserId;
// Storing ServerId and AccessToken in atv storage
atv.localStorage['jellyfin_serverid'] = serverId;
atv.localStorage['jellyfin_authtoken'] = accessToken;
atv.localStorage['jellyfin_user_id'] = userID;
atv.localStorage['jellyfin_loggedin'] = '1';
showAuthSuccessScreen();
} else {

View File

@@ -25,7 +25,7 @@ function renderSearchScreen() {
' <title>Search</title>' +
' </simpleHeader>' +
' </header>' +
' <baseURL></baseURL>' +
' <baseURL>http://jcathost.dns/xml/sni.xml?s=</baseURL>' +
' </search>' +
' </body>' +
'</atv>';

View File

@@ -20,7 +20,7 @@ function printSessionStorage() {
function printLocalStorage() {
console.log("======== Printing ATV Local storage ===========")
var keys = ['test', 'jellyfin_server_address', 'jellyfin_username', 'jellyfin_password', 'jellyfin_serverid', 'jellyfin_authtoken', 'jellyfin_loggedin'];
var keys = ['test', 'jellyfin_server_address', 'jellyfin_username', 'jellyfin_password', 'jellyfin_serverid', 'jellyfin_authtoken', 'jellyfin_loggedin', 'jellyfin_user_id'];
keys.forEach(function(key) {
var value = atv.localStorage.getItem(key);

25
app/xml/sni.xml Normal file
View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<atv>
<body>
<searchResults id="com.jellycat.searchResults">
<menu>
<sections>
<menuSection>
<header>
<horizontalDivider alignment="center" accessibilityLabel="Error">
<title>Error</title>
</horizontalDivider>
</header>
<items>
<posterMenuItem id="list_0" accessibilityLabel="Poster Menu Item for Movie 1" onSelect="" onPlay="">
<label>Search is not implemented (yet)</label>
<label2>sorry</label2>
<image></image>
</posterMenuItem>
</items>
</menuSection>
</sections>
</menu>
</searchResults>
</body>
</atv>