Manual token submission functionality
This commit is contained in:
parent
e032302b5d
commit
f58ca1c613
4 changed files with 14 additions and 5 deletions
|
@ -237,6 +237,7 @@
|
|||
"action.delete": "Delete",
|
||||
"action.edit": "Edit",
|
||||
"action.done": "Done",
|
||||
"action.submit": "Submit",
|
||||
"action.editTracklist": "Edit Tracklist",
|
||||
"action.addToLibrary": "Add to Library",
|
||||
"action.addToLibrary.success": "Added to Library",
|
||||
|
@ -535,6 +536,7 @@
|
|||
"settings.option.connectivity.lastfmScrobble.filterLoop": "Filter looped track (Last.fm)",
|
||||
"settings.option.connectivity.lastfmScrobble.filterLoop.description": "Prevent looped tracks from being scrobbled or displayed in the Now Playing list on Last.fm.",
|
||||
"settings.option.connectivity.lastfmScrobble.filterTypes": "Filter Media Types (Last.fm)",
|
||||
"settings.option.connectivity.lastfmScrobble.manualToken": "Enter Last.fm Token Manually",
|
||||
"settings.notyf.connectivity.lastfmScrobble.connectError": "Last.fm Connection Timed Out",
|
||||
"settings.notyf.connectivity.lastfmScrobble.connectSuccess": "Last.fm Connection Successful",
|
||||
"settings.notyf.connectivity.lastfmScrobble.connecting": "Connecting to Last.fm...",
|
||||
|
|
|
@ -232,6 +232,7 @@
|
|||
"action.delete": "Delete",
|
||||
"action.edit": "Edit",
|
||||
"action.done": "Done",
|
||||
"action.submit": "Submit",
|
||||
"action.editTracklist": "Edit Tracklist",
|
||||
"action.addToLibrary": "Add to Library",
|
||||
"action.addToLibrary.success": "Added to Library",
|
||||
|
@ -522,6 +523,7 @@
|
|||
"settings.option.connectivity.lastfmScrobble.filterLoop": "Filter looped track (Last.fm)",
|
||||
"settings.option.connectivity.lastfmScrobble.filterLoop.description": "Prevent looped tracks from being scrobbled or displayed in the Now Playing list on Last.fm.",
|
||||
"settings.option.connectivity.lastfmScrobble.filterTypes": "Filter Media Types (Last.fm)",
|
||||
"settings.option.connectivity.lastfmScrobble.manualToken": "Enter Last.fm Token Manually",
|
||||
"settings.notyf.connectivity.lastfmScrobble.connectError": "Last.fm Connection Timed Out",
|
||||
"settings.notyf.connectivity.lastfmScrobble.connectSuccess": "Last.fm Connection Successful",
|
||||
"settings.notyf.connectivity.lastfmScrobble.connecting": "Connecting to Last.fm...",
|
||||
|
|
|
@ -38,7 +38,7 @@ export default class lastfm {
|
|||
|
||||
// Register the ipcMain handlers
|
||||
this._utils.getIPCMain().handle('lastfm:url', (event: any) => {
|
||||
console.debug(`${lastfm.name}:url`, event)
|
||||
console.debug(`${lastfm.name}:url`)
|
||||
return this._lfm.getAuthenticationUrl({"cb": "cider://auth/lastfm"})
|
||||
})
|
||||
|
||||
|
@ -114,6 +114,8 @@ export default class lastfm {
|
|||
this._lfm.authenticate(token, (err: any, session: any) => {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
|
||||
this._utils.getWindow().webContents.executeJavaScript(`app.notyf.error("${err.message}");`)
|
||||
return;
|
||||
}
|
||||
this._utils.getWindow().webContents.send('lastfm:authenticated', session)
|
||||
|
|
|
@ -1096,17 +1096,20 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md-option-line" v-show="app.cfg.lastfm.enabled">
|
||||
<div class="md-option-line" v-show="lastfmConnecting">
|
||||
<div class="md-option-segment">
|
||||
{{$root.getLz('settings.option.connectivity.lastfmScrobble.delay')}}
|
||||
{{$root.getLz('settings.option.connectivity.lastfmScrobble.manualToken')}}
|
||||
</div>
|
||||
<div class="md-option-segment md-option-segment_auto">
|
||||
<label>
|
||||
<input type="number" min="50" max="100" v-model="app.cfg.lastfm.scrobble_after" />
|
||||
<form @submit.prevent="submitToken">
|
||||
<input type="text" autofocus id="lfmToken" />
|
||||
<input type="submit" class="md-btn" @value="$root.getLz('action.submit')" />
|
||||
</form>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md-option-line" v-show="app.cfg.lastfm.enabled">
|
||||
<div class="md-option-line" v-show="app.cfg.connectivity.lastfm.enabled">
|
||||
<div class="md-option-segment">
|
||||
{{$root.getLz('settings.option.connectivity.lastfmScrobble.delay')}}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue