Skip to content

Commit

Permalink
Fix importing tokens from ESPN during the migration
Browse files Browse the repository at this point in the history
  • Loading branch information
m0ngr31 committed Dec 30, 2023
1 parent ba9d719 commit 5678960
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img src="https://i.imgur.com/FIGZdR3.png">
</p>

Current version: **2.1.0**
Current version: **2.1.1**

# About
This takes ESPN/ESPN+, FOX Sports, Paramount+, MSG+, and MLB.tv programming and transforms it into a "live TV" experience with virtual linear channels. It will discover what is on, and generate a schedule of channels that will give you M3U and XMLTV files that you can import into something like [Jellyfin](https://jellyfin.org) or [Channels](https://getchannels.com).
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eplustv",
"version": "2.1.0",
"version": "2.1.1",
"description": "",
"scripts": {
"start": "ts-node index.ts",
Expand Down
27 changes: 16 additions & 11 deletions services/espn-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1065,19 +1065,24 @@ class EspnHandler {

this.save();
} else {
const {tokens, device_grant, device_token_exchange, device_refresh_token, id_token_grant, account_token} =
fsExtra.readJSONSync(espnPlusTokens);
if (fs.existsSync(espnPlusTokens)) {
const {tokens, device_grant, device_token_exchange, device_refresh_token, id_token_grant, account_token} =
fsExtra.readJSONSync(espnPlusTokens);

this.tokens = tokens;
this.device_grant = device_grant;
this.device_token_exchange = device_token_exchange;
this.device_refresh_token = device_refresh_token;
this.id_token_grant = id_token_grant;
this.account_token = account_token;
}

const {adobe_device_id, adobe_auth} = fsExtra.readJSONSync(espnLinearTokens);
if (fs.existsSync(espnLinearTokens)) {
const {adobe_device_id, adobe_auth} = fsExtra.readJSONSync(espnLinearTokens);

this.tokens = tokens;
this.device_grant = device_grant;
this.device_token_exchange = device_token_exchange;
this.device_refresh_token = device_refresh_token;
this.id_token_grant = id_token_grant;
this.account_token = account_token;
this.adobe_device_id = adobe_device_id;
this.adobe_auth = adobe_auth;
this.adobe_device_id = adobe_device_id;
this.adobe_auth = adobe_auth;
}
}
};
}
Expand Down

0 comments on commit 5678960

Please sign in to comment.