diff --git a/frontend/src/Activity/History/Details/HistoryDetailsModal.js b/frontend/src/Activity/History/Details/HistoryDetailsModal.js
index 0523d4397..ca8b9ca3a 100644
--- a/frontend/src/Activity/History/Details/HistoryDetailsModal.js
+++ b/frontend/src/Activity/History/Details/HistoryDetailsModal.js
@@ -18,11 +18,11 @@ function getHeaderTitle(eventType) {
case 'downloadFailed':
return 'Download Failed';
case 'downloadFolderImported':
- return 'Episode Imported';
+ return 'Track Imported';
case 'trackFileDeleted':
- return 'Episode File Deleted';
+ return 'Track File Deleted';
case 'trackFileRenamed':
- return 'Episode File Renamed';
+ return 'Track File Renamed';
default:
return 'Unknown';
}
diff --git a/frontend/src/Activity/History/HistoryRow.js b/frontend/src/Activity/History/HistoryRow.js
index 550b373dd..f87d05e93 100644
--- a/frontend/src/Activity/History/HistoryRow.js
+++ b/frontend/src/Activity/History/HistoryRow.js
@@ -56,6 +56,7 @@ class HistoryRow extends Component {
albumId,
artist,
album,
+ track,
language,
quality,
eventType,
@@ -121,6 +122,14 @@ class HistoryRow extends Component {
);
}
+ if (name === 'trackTitle') {
+ return (
+
+ {track.title}
+
+ );
+ }
+
if (name === 'language') {
return (
@@ -220,6 +229,7 @@ HistoryRow.propTypes = {
albumId: PropTypes.number,
artist: PropTypes.object.isRequired,
album: PropTypes.object,
+ track: PropTypes.object,
language: PropTypes.object.isRequired,
quality: PropTypes.object.isRequired,
eventType: PropTypes.string.isRequired,
@@ -234,4 +244,10 @@ HistoryRow.propTypes = {
onMarkAsFailedPress: PropTypes.func.isRequired
};
+HistoryRow.defaultProps = {
+ track: {
+ title: ''
+ }
+};
+
export default HistoryRow;
diff --git a/frontend/src/Store/Reducers/historyReducers.js b/frontend/src/Store/Reducers/historyReducers.js
index 80c6bf441..8104c3814 100644
--- a/frontend/src/Store/Reducers/historyReducers.js
+++ b/frontend/src/Store/Reducers/historyReducers.js
@@ -37,6 +37,11 @@ export const defaultState = {
label: 'Album Title',
isVisible: true
},
+ {
+ name: 'trackTitle',
+ label: 'Track Title',
+ isVisible: true
+ },
{
name: 'language',
label: 'Language',
diff --git a/src/Lidarr.Api.V3/History/HistoryModule.cs b/src/Lidarr.Api.V3/History/HistoryModule.cs
index 601c6364c..9eccd8f0c 100644
--- a/src/Lidarr.Api.V3/History/HistoryModule.cs
+++ b/src/Lidarr.Api.V3/History/HistoryModule.cs
@@ -6,6 +6,7 @@ using NzbDrone.Core.Download;
using NzbDrone.Core.History;
using Lidarr.Api.V3.Albums;
using Lidarr.Api.V3.Artist;
+using Lidarr.Api.V3.Tracks;
using Lidarr.Http;
using Lidarr.Http.Extensions;
@@ -35,6 +36,7 @@ namespace Lidarr.Api.V3.History
resource.Artist = model.Artist.ToResource();
resource.Album = model.Album.ToResource();
+ resource.Track = model.Track.ToResource();
if (model.Artist != null)
{
diff --git a/src/Lidarr.Api.V3/History/HistoryResource.cs b/src/Lidarr.Api.V3/History/HistoryResource.cs
index 05e1bb522..86d8a9964 100644
--- a/src/Lidarr.Api.V3/History/HistoryResource.cs
+++ b/src/Lidarr.Api.V3/History/HistoryResource.cs
@@ -5,6 +5,7 @@ using NzbDrone.Core.Languages;
using NzbDrone.Core.Qualities;
using Lidarr.Api.V3.Albums;
using Lidarr.Api.V3.Artist;
+using Lidarr.Api.V3.Tracks;
using Lidarr.Http.REST;
namespace Lidarr.Api.V3.History
@@ -13,6 +14,7 @@ namespace Lidarr.Api.V3.History
{
public int AlbumId { get; set; }
public int ArtistId { get; set; }
+ public int TrackId { get; set; }
public string SourceTitle { get; set; }
public Language Language { get; set; }
public QualityModel Quality { get; set; }
@@ -26,6 +28,7 @@ namespace Lidarr.Api.V3.History
public AlbumResource Album { get; set; }
public ArtistResource Artist { get; set; }
+ public TrackResource Track { get; set; }
}
public static class HistoryResourceMapper
@@ -40,6 +43,7 @@ namespace Lidarr.Api.V3.History
AlbumId = model.AlbumId,
ArtistId = model.ArtistId,
+ TrackId = model.TrackId,
SourceTitle = model.SourceTitle,
Language = model.Language,
Quality = model.Quality,
diff --git a/src/NzbDrone.Core.Test/HistoryTests/HistoryServiceFixture.cs b/src/NzbDrone.Core.Test/HistoryTests/HistoryServiceFixture.cs
index 854a5c9de..513017414 100644
--- a/src/NzbDrone.Core.Test/HistoryTests/HistoryServiceFixture.cs
+++ b/src/NzbDrone.Core.Test/HistoryTests/HistoryServiceFixture.cs
@@ -11,7 +11,7 @@ using NzbDrone.Core.Test.Framework;
using NzbDrone.Core.History;
using NzbDrone.Core.Qualities;
using NzbDrone.Core.Test.Qualities;
-using NzbDrone.Core.Tv;
+using NzbDrone.Core.Music;
using NzbDrone.Core.Languages;
using NzbDrone.Core.Profiles.Languages;
@@ -54,23 +54,23 @@ namespace NzbDrone.Core.Test.HistoryTests
[Test]
public void should_use_file_name_for_source_title_if_scene_name_is_null()
{
- var series = Builder.CreateNew().Build();
- var episodes = Builder.CreateListOfSize(1).Build().ToList();
- var episodeFile = Builder.CreateNew()
+ var artist = Builder.CreateNew().Build();
+ var tracks = Builder