You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 2, 2021. It is now read-only.
In emberfire v2 (the version we're using) you can count the amount of tracks in a channel by checking the length of the ids in channels.tracks without fetching all tracks.
If you're not using Emberfire, which is more and more likely, you can fetch a channel and count the tracks.length yourself. But having a number property like tracksCount would be very useful.
@hugurp should we do this? I'm not a huge fan of maintaining an extra cloud function, however small it is. On the other side, I want to be able to count tracks easily without fetching all tracks across our applications.
The text was updated successfully, but these errors were encountered:
In emberfire v2 (the version we're using) you can count the amount of tracks in a channel by checking the length of the ids in
channels.tracks
without fetching all tracks.This is not possible in v3, see FirebaseExtended/emberfire#587.
If you're not using Emberfire, which is more and more likely, you can fetch a channel and count the
tracks.length
yourself. But having a number property liketracksCount
would be very useful.To do this we'll need to implement a Firebase cloud function. Copy/pasta from here https://github.com/firebase/functions-samples/tree/master/child-count
@hugurp should we do this? I'm not a huge fan of maintaining an extra cloud function, however small it is. On the other side, I want to be able to count tracks easily without fetching all tracks across our applications.
The text was updated successfully, but these errors were encountered: