1
1
#include " activity/player_view.hpp"
2
+ #include " activity/gallery_activity.hpp"
2
3
#include " tab/media_collection.hpp"
3
4
#include " tab/media_series.hpp"
4
5
#include " tab/music_album.hpp"
@@ -62,7 +63,8 @@ void VideoDataSource::onItemSelected(brls::Box* recycler, size_t index) {
62
63
63
64
if (item.Type == jellyfin::mediaTypeSeries) {
64
65
recycler->present (new MediaSeries (item.Id ));
65
- } else if (item.Type == jellyfin::mediaTypeFolder || item.Type == jellyfin::mediaTypeBoxSet) {
66
+ } else if (item.Type == jellyfin::mediaTypeFolder || item.Type == jellyfin::mediaTypeBoxSet ||
67
+ item.Type == jellyfin::mediaTypePhotoAlbum) {
66
68
recycler->present (new MediaCollection (item.Id ));
67
69
} else if (item.Type == jellyfin::mediaTypeMovie || item.Type == jellyfin::mediaTypeMusicVideo ||
68
70
item.Type == jellyfin::mediaTypeVideo) {
@@ -76,6 +78,15 @@ void VideoDataSource::onItemSelected(brls::Box* recycler, size_t index) {
76
78
recycler->present (new MusicAlbum (item));
77
79
} else if (item.Type == jellyfin::mediaTypePlaylist) {
78
80
recycler->present (new Playlist (item));
81
+ } else if (item.Type == jellyfin::mediaTypePhoto) {
82
+ auto & conf = AppConfig::instance ();
83
+ std::string query = HTTP::encode_form ({
84
+ {" api_key" , conf.getToken ()},
85
+ });
86
+ std::vector<std::string> photos = {
87
+ conf.getUrl () + fmt::format (fmt::runtime (jellyfin::apiDownload), item.Id , query),
88
+ };
89
+ brls::Application::pushActivity (new GalleryActivity (photos));
79
90
} else {
80
91
auto dialog = new brls::Dialog (fmt::format (" Unsupported media type: {}" , item.Type ));
81
92
dialog->addButton (" hints/cancel" _i18n, []() {});
0 commit comments