In database, how to get elements in FeedMedia table from an element in FeedItems table?

App version: 3.6.1 (F-Droid)

Hello, thanks for the awesome app!!!

I’m trying to create a little display of AntennaPod stats in my laptop, so I exported the database and then converted FeedItems and FeedMedia tables to json because it’s easier for me to work with json.
I was trying to compile some stats about the total time a feed had been listened to, by getting the list of it’s played items from FeedItems table. But the durations are actually stored in FeedMedia table, and I didn’t manage to figure out how to get an element in FeedMedia table from one in FeedItems table.

Feed Items table elements have an id, but the same id in FeedMedia table corresponds to a different element.

Anyone has a tip on what I can use to connect elements in FeedItems and FeedMedia tables?
Thanks a lot :slight_smile:

The FeedMedia table has an item_id column that references the id of the corresponding item

1 Like

Thanks a lot for your answer @ByteHamster !
Somehow I hadn’t figured out the feedItem column in FeedMedia was what I was looking for. I think it is what you’re referring to when you talk about item_id.

Thanks a lot for the tip! Using values in the feedItem column I can now connect items in FeedItems and FeedMedia tables :slight_smile:

Ah, yeah, sorry. The name was just from memory without looking at the database again.

Oh no, don’t be sorry, on the contrary, your advise helped me finding the right column :slight_smile: