[Request] Add episode.mediaavailable


#1

Hi,

In my special case, it’s possible that there are episodes with mediafiles connected to them, but the media is not available (file not found).

So I’d be happy to see a template variable for availability of the media of each episode.
I think, Podlove saves the state of the media files - at least there is a warning sign when I choose an episode without valid media.

Is it possible to make this value available to the template tags?


#2

Can you explain why you need that?

In my opinion it’s something of interest to the publisher so you can fix it if something is broken—not something to be shown to the user.


#3

In my case, a copyright infringement forced me to take several episodes offline. I did that by deleting the mediafiles but leaving the episode posts.
If a listener wants to download a deleted episode, I want to show a short message that this media is offline on purpose and provide a link to more information.

At the moment, I’m doing this by checking the availiablity of an episode with a PHP script, which dynamically shows a message if needed. But Podlove can check the availiability by itself and using the template engine, it would be a more user-friendly approach.

I can understand, that this request is kind of special. But I don’t think, it’s uncommon to show some information if the media is offline wittingly.


#4

Hm, but don’t you need to write an individual message anyway, explaining why you had to take down the content?

You can already check availability. If you iterate {% for file in episode.files %}, you only get active files. Meaning, if you deactivate all files in the episode, episode.files is empty and you can show a predefined message.

{% if episode.files is empty %}
    This episode is no longer available.
{% endif %}

#5

Yeah, thats a way to go.
I knew, that something is there :wink:
Thanks!

// Edit:
Stop:
Well… The connections to the files are still there - but the files aren’t there anymore. So the iteration HAS contents because of the URL but there are no real contents behind.
Perhaps I’m thinking wrong, but how to workaround this phenomen?


#6

You need to disable the assets.