Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
…to v4

* 'v4' of https://github.com/podlove/podlove-web-player:
  fix(persist): Fixes issue with object-hash library, use hashed title as identifier
  • Loading branch information
plutonik-a committed Mar 12, 2017
2 parents 45447f7 + 8502c2f commit 111671e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@
"howler": "^2.0.2",
"iframe-resizer": "^3.5.7",
"lodash": "^4.17.3",
"object-hash": "^1.1.5",
"query-string": "^4.3.1",
"react": "15.3.0",
"react-dom": "15.3.0",
"react-redux": "4.4.5",
"redux": "3.5.2",
"revue": "^3.0.0",
"short-hash": "^1.0.0",
"superagent": "^3.4.1",
"viscroll": "^1.0.0",
"vue": "^2.1.8"
Expand Down
2 changes: 1 addition & 1 deletion src/components/tabs/settings/Settings.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="podlove-settings">
<a :href="exportStore()" download="podlove-web-player-debug.json">export debug state</button>
<a :href="exportStore()" download="podlove-web-player-debug.json">export debug state</a>
</div>
</template>

Expand Down
12 changes: 10 additions & 2 deletions src/store/effects/storage.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import actions from '../actions'

import storage from 'utils/storage'
import hash from 'object-hash'
import hash from 'short-hash'

let podloveStorage

export default (store, action) => {
switch (action.type) {
case 'INIT':
podloveStorage = storage(hash(action.payload))
if (!action.payload.title) {
return
}

podloveStorage = storage(hash(action.payload.title))

let storedPlaytime = podloveStorage.get('playtime')

Expand All @@ -18,6 +22,10 @@ export default (store, action) => {
}
break
case 'SET_PLAYTIME':
if (!podloveStorage) {
return
}

podloveStorage.set('playtime', action.payload)
break
}
Expand Down

0 comments on commit 111671e

Please sign in to comment.