diff --git a/RMuseum/Controllers/GanjoorController.cs b/RMuseum/Controllers/GanjoorController.cs
index e0fbe8d7..9baefc31 100644
--- a/RMuseum/Controllers/GanjoorController.cs
+++ b/RMuseum/Controllers/GanjoorController.cs
@@ -155,10 +155,10 @@ namespace RMuseum.Controllers
///
///
///
- /// not implemented yet
+ ///
///
///
- /// not implemented yet
+ ///
/// not implemented yet
///
/// next/previous
diff --git a/RMuseum/Models/Ganjoor/ViewModels/GanjoorPoemCompleteViewModel.cs b/RMuseum/Models/Ganjoor/ViewModels/GanjoorPoemCompleteViewModel.cs
index cba014a3..2f3acd57 100644
--- a/RMuseum/Models/Ganjoor/ViewModels/GanjoorPoemCompleteViewModel.cs
+++ b/RMuseum/Models/Ganjoor/ViewModels/GanjoorPoemCompleteViewModel.cs
@@ -42,7 +42,6 @@ namespace RMuseum.Models.Ganjoor.ViewModels
///
public string HtmlText { get; set; }
-
///
/// metre
///
@@ -92,5 +91,10 @@ namespace RMuseum.Models.Ganjoor.ViewModels
/// Images
///
public PoemRelatedImage[] Images { get; set; }
+
+ ///
+ /// Songs
+ ///
+ public PoemMusicTrackViewModel[] Songs { get; set; }
}
}
diff --git a/RMuseum/Models/Ganjoor/ViewModels/PoemMusicTrackViewModel.cs b/RMuseum/Models/Ganjoor/ViewModels/PoemMusicTrackViewModel.cs
new file mode 100644
index 00000000..de8a2a11
--- /dev/null
+++ b/RMuseum/Models/Ganjoor/ViewModels/PoemMusicTrackViewModel.cs
@@ -0,0 +1,58 @@
+namespace RMuseum.Models.Ganjoor.ViewModels
+{
+ ///
+ /// Ganjoor Poem related music track model
+ ///
+ public class PoemMusicTrackViewModel
+ {
+ ///
+ /// id
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// track type
+ ///
+ public PoemMusicTrackType TrackType { get; set; }
+
+ ///
+ /// artist name
+ ///
+ public string ArtistName { get; set; }
+
+ ///
+ /// artist url
+ ///
+ public string ArtistUrl { get; set; }
+
+ ///
+ /// album name
+ ///
+ public string AlbumName { get; set; }
+
+ ///
+ /// album url
+ ///
+ public string AlbumUrl { get; set; }
+
+ ///
+ /// track name
+ ///
+ public string TrackName { get; set; }
+
+ ///
+ /// track url
+ ///
+ public string TrackUrl { get; set; }
+
+ ///
+ /// description
+ ///
+ public string Description { get; set; }
+
+ ///
+ /// broken link
+ ///
+ public bool BrokenLink { get; set; }
+ }
+}
diff --git a/RMuseum/RMuseum.xml b/RMuseum/RMuseum.xml
index d3ab766a..9823f5ef 100644
--- a/RMuseum/RMuseum.xml
+++ b/RMuseum/RMuseum.xml
@@ -668,10 +668,10 @@
- not implemented yet
+
- not implemented yet
+
not implemented yet
next/previous
@@ -4101,6 +4101,11 @@
Images
+
+
+ Songs
+
+
poem summary
@@ -4196,6 +4201,61 @@
text
+
+
+ Ganjoor Poem related music track model
+
+
+
+
+ id
+
+
+
+
+ track type
+
+
+
+
+ artist name
+
+
+
+
+ artist url
+
+
+
+
+ album name
+
+
+
+
+ album url
+
+
+
+
+ track name
+
+
+
+
+ track url
+
+
+
+
+ description
+
+
+
+
+ broken link
+
+
Related Image Type
diff --git a/RMuseum/Services/Implementation/GanjoorService.cs b/RMuseum/Services/Implementation/GanjoorService.cs
index 552562c3..e1bae36d 100644
--- a/RMuseum/Services/Implementation/GanjoorService.cs
+++ b/RMuseum/Services/Implementation/GanjoorService.cs
@@ -664,6 +664,32 @@ namespace RMuseum.Services.Implementation
};
+ PoemMusicTrackViewModel[] tracks = null;
+ if(songs)
+ {
+ tracks = await _context.GanjoorPoemMusicTracks
+ .Where(t => t.PoemId == id && t.Approved)
+ .OrderBy(t => t.Id)
+ .Select
+ (
+ t => new PoemMusicTrackViewModel()
+ {
+ Id = t.Id,
+ TrackType = t.TrackType,
+ ArtistName = t.ArtistName,
+ ArtistUrl = t.ArtistUrl,
+ AlbumName = t.AlbumName,
+ AlbumUrl = t.AlbumUrl,
+ TrackName = t.TrackName,
+ TrackUrl = t.TrackUrl,
+ Description = t.Description,
+ BrokenLink = t.BrokenLink
+
+ }
+ ).ToArrayAsync();
+ }
+
+
return new RServiceResult
(
new GanjoorPoemCompleteViewModel()
@@ -684,7 +710,8 @@ namespace RMuseum.Services.Implementation
Previous = previous,
Recitations = rc,
Images = imgs,
- Verses = verses
+ Verses = verses,
+ Songs = tracks
}
);
}