[gpodder] Re: gpodder.net not recording play actions with start/end position?

  • From: Dov Feldstern <dovdevel@xxxxxxxxx>
  • To: gpodder@xxxxxxxxxxxxx
  • Date: Tue, 9 Dec 2014 23:28:25 +0200

Hi, Stefan!

I've reproduced the issue while collecting as much relevant information as
I can think of along the way (here I'm presenting the information that I
think is relevant in textual form; if you feel that the full information
(databases, capture files, etc.) could be useful, I can provide them to you
off-list).

I begin when gpodder is not running, and the gpodder.net database contains
some play episodes which have not yet been synced:

action|device_id|episode_url|podcast_url|position|started|timestamp|total
delete|pollen|
http://podcastdownload.npr.org/anon.npr-podcasts/podcast/1090/336996326/npr_336996326.mp3|http://www.npr.org/rss/podcast.php?id=1090|||1418155908|
play|pollen|
http://podcastdownload.npr.org/anon.npr-podcasts/podcast/1090/337260500/npr_337260500.mp3|http://www.npr.org/rss/podcast.php?id=1090|||1418155987|
play|pollen|
http://podcastdownload.npr.org/anon.npr-podcasts/podcast/1090/337260500/npr_337260500.mp3|http://www.npr.org/rss/podcast.php?id=1090|250|0|1418156238|250

Note that there are two play actions for the same episode -- the first from
when the play just started, which therefore contains no position
information; and the second from when the play ended, and which contains
the full position information.

At this time, a query (
http://gpodder.net/api/2/episodes/dfeldstern.json?since=1418153366) of
recent actions returns the following (indeed, the above actions are not yet
known by the server):

{"timestamp":1418157410,"actions":[{"total":null,"episode":"http:\/\/
podcastdownload.npr.org
\/anon.npr-podcasts\/podcast\/1090\/336996326\/npr_336996326.mp3","started":null,"timestamp":"2014-12-09T19:42:44","device":"pollen","action":"play","position":null,"podcast":"http:\/\/
www.npr.org\/rss\/podcast.php?id=1090"}]}


I then started gpodder, while recording communications with the server with
wireshark. Soon after gpodder starts, the actions are synced, after which
the gpodder.net database is empty. The capture shows the following POST
action, to which the response was 200 OK:

POST /api/2/episodes/dfeldstern.json HTTP/1.1
User-Agent: mygpoclient/1.7 (+http://thp.io/2010/mygpoclient/)
gPodder/3.7.0 (+http://gpodder.org/)
Content-Type: application/x-www-form-urlencoded

[{"action": "delete", "device": "pollen", "podcast": "
http://www.npr.org/rss/podcast.php?id=1090";, "episode": "
http://podcastdownload.npr.org/anon.npr-podcasts/podcast/1090/336996326/npr_336996326.mp3";,
"timestamp": "2014-12-09T20:11:48"}, {"action": "play", "device": "pollen",
"podcast": "http://www.npr.org/rss/podcast.php?id=1090";, "episode": "
http://podcastdownload.npr.org/anon.npr-podcasts/podcast/1090/337260500/npr_337260500.mp3";,
"timestamp": "2014-12-09T20:13:07"}, {"total": 250, "episode": "
http://podcastdownload.npr.org/anon.npr-podcasts/podcast/1090/337260500/npr_337260500.mp3";,
"started": 0, "timestamp": "2014-12-09T20:17:18", "device": "pollen",
"action": "play", "position": 250, "podcast": "
http://www.npr.org/rss/podcast.php?id=1090"}, {"action": "delete",
"device": "pollen", "podcast": "http://www.npr.org/rss/podcast.php?id=1090";,
"episode": "
http://podcastdownload.npr.org/anon.npr-podcasts/podcast/1090/337260500/npr_337260500.mp3";,
"timestamp": "2014-12-09T20:42:36"}]

Specifically, note that *both* play actions are sent to the server.

Now the response to the exact same query that was performed above is this:

{"timestamp":1418157877,"actions":[{"action":"delete","timestamp":"2014-12-09T20:42:36","device":"pollen","podcast":"http:\/\/
www.npr.org\/rss\/podcast.php?id=1090","episode":"http:\/\/
podcastdownload.npr.org
\/anon.npr-podcasts\/podcast\/1090\/337260500\/npr_337260500.mp3"},{"total":null,"episode":"http:\/\/
podcastdownload.npr.org
\/anon.npr-podcasts\/podcast\/1090\/337260500\/npr_337260500.mp3","started":null,"timestamp":"2014-12-09T20:13:07","device":"pollen","action":"play","position":null,"podcast":"http:\/\/
www.npr.org
\/rss\/podcast.php?id=1090"},{"action":"delete","timestamp":"2014-12-09T20:11:48","device":"pollen","podcast":"http:\/\/
www.npr.org\/rss\/podcast.php?id=1090","episode":"http:\/\/
podcastdownload.npr.org
\/anon.npr-podcasts\/podcast\/1090\/336996326\/npr_336996326.mp3"},{"total":null,"episode":"http:\/\/
podcastdownload.npr.org
\/anon.npr-podcasts\/podcast\/1090\/336996326\/npr_336996326.mp3","started":null,"timestamp":"2014-12-09T19:42:44","device":"pollen","action":"play","position":null,"podcast":"http:\/\/
www.npr.org\/rss\/podcast.php?id=1090"}]}

For the relevant episode, only the *first* play action -- the one that does
*not* include any positional information -- is returned! (There is also a
delete action for this episode, because upon startup gpodder has cleaned-up
the episode, now that it is finished.) No sign of the second action, which
is the one that includes the positional information.

Hope this helps investigating the issue... Again, if you need the full
information -- I have it saved.

Thanks for taking a look at this!
Dov

On Tue, Dec 9, 2014 at 9:22 PM, Dov Feldstern <dovdevel@xxxxxxxxx> wrote:

> gpodder 2.20 on n900, and gpodder 3.7.0+ (from git) on Linux.
>
> Neither client has changed recently, and I see both of them recording in
> the mygpo database the play EpisodeActions (*with* position) to send, and
> then I don't see them in the db anymore, so they were presumably sent to
> the server...
>
> On Tue, Dec 9, 2014 at 9:14 PM, Stefan Derkits <stefan@xxxxxxxxxx> wrote:
>
>> Hi Dov,
>>
>> which Client on which OS are you using?
>>
>> Stefan
>>
>>
>

Other related posts: