Bakual / SermonSpeaker

A free Joomla! component for churchs to share their sermons.
www.sermonspeaker.net
GNU General Public License v3.0
12 stars 8 forks source link

hide play icon when there's no file to play #42

Closed ghost closed 7 years ago

ghost commented 7 years ago

Another small change to prevent users from trying to play a sermon if there's no audio or video attached. In my opinion it's best to not show the play icon at all.

Bakual commented 7 years ago

That looks fine on first glance. I will have to test it before merging and I need a bit of time for that.

Bakual commented 7 years ago

I looked at this a bit more closely and I think it's done a bit to generic. The "case 0" one would still make sense even without any files as it is just a link to the detailpage. So that check should go into each case, and likely as well be done for the title link.

On a sidenote I saw that the "Control Player" is quite broken when there are sermons without any files as it will select the wrong entry in the playlist. I need to check that as well.

ghost commented 7 years ago

I guess you're right. This solution was more like a quick fix.

Regarding the playlist selection, I have a commit in my repo to work around this in the JWPlayer plugin, but it is definitely not ready for general use: https://github.com/fri-sch/SermonSpeaker/commit/2723fee129fa6dc435bb8f9b431a5fe578d556e9

Bakual commented 7 years ago

I'm going to merge this and adjust as needed afterwards.

Bakual commented 7 years ago

Btw: https://github.com/Bakual/SermonSpeaker/commit/90e7e068c72a72f76cad413a50ceb673e478f00b should fix the issue with the playlist selection. Apparently JW Player just ignores a pic now for the playlist, that used to work in earlier versions. I now just use a blank.mp3 file instead of the picture to create a dummy playlist entry.

Bakual commented 7 years ago

https://github.com/Bakual/SermonSpeaker/commit/40333f30432dd72f11e97082abbe8b861b9fb9fd should fix the remaining issues. Thanks!