Bugzilla – Bug 8645
Indication of favorite doesnt work for first favorite
Last modified: 2008-07-04 00:38:24 UTC
It seems like the favorite indication icon doesn't work correctly in the web interface for the first favorite. It works perfectly for the second and all the rest of the favorities. To reproduce: 1. Make sure you have no favorites 2. Goto Random Mix and click on a favorite icon besides "Random Songs" The result is that a favorite is added but the favorite icon beside "Random Songs" never changes to a "delete favorite" icon. Due to this it also not possible to delete the first favorite from the "Random Mix" page. The Random Mix favorite is just an example, the behaviour is the same also for other favorites. The problem only occurs for the favorite with position 0. I suspect the problem might be related to the fact that the findUrl function in Slim/Plugin/Favorite/OpmlFavorite.pm return the favorite index and this will be 0 for the first favorite. 0 is probably interpreted as "no favorite found" somewhere in the code.
change 21500 - favorite IDs are zero based, check whether they're defined instead of relying on them being > 0