diff --git a/.github/stale.yml b/.github/stale.yml
new file mode 100644
index 000000000..b3deb4a73
--- /dev/null
+++ b/.github/stale.yml
@@ -0,0 +1,23 @@
+# Number of days of inactivity before an issue becomes stale
+daysUntilStale: 60
+# Number of days of inactivity before a stale issue is closed
+daysUntilClose: 7
+# Issues with these labels will never be considered stale
+exemptLabels:
+ - pinned
+ - security
+ - bug / issue
+ - help wanted
+ - possible feature
+ - planned
+ - in progress
+ - enhancement
+# Label to use when marking an issue as stale
+staleLabel: wontfix
+# Comment to post when marking an issue as stale. Set to `false` to disable
+markComment: >
+ This issue has been automatically marked as stale because it has not had
+ recent activity. It will be closed if no further activity occurs. Thank you
+ for your contributions.
+# Comment to post when closing a stale issue. Set to `false` to disable
+closeComment: false
diff --git a/README.md b/README.md
index 4f854cb56..e8e269e7f 100644
--- a/README.md
+++ b/README.md
@@ -20,9 +20,8 @@ Follow me developing Ombi!
___
-
-
-
+
+_**Note:** There is no longer an iOS app due to complications outside of our control._
___
@@ -43,6 +42,7 @@ Here are some of the features Ombi V3 has:
* Now working without crashes on Linux.
* Lets users request Movies, Music, and TV Shows (whether it being the entire series, an entire season, or even single episodes.)
* Easily manage your requests
+* Allows you to set specific users to automatically have requests approved and added to the relevant service (Sonarr/Radarr/Lidarr/Couchpotato etc)
* User management system (supports plex.tv, Emby and local accounts)
* A landing page that will give you the availability of your Plex/Emby server and also add custom notification text to inform your users of downtime.
* Allows your users to get custom notifications!
@@ -50,7 +50,7 @@ Here are some of the features Ombi V3 has:
* Will show if the request is already on plex or even if it's already monitored.
* Automatically updates the status of requests when they are available on Plex/Emby
* Slick, responsive and mobile friendly UI
-* Ombi will automatically update itself :)
+* Ombi will automatically update itself :) (YMMV)
* Very fast!
### Integration
diff --git a/src/Ombi.Api.Lidarr/ILidarrApi.cs b/src/Ombi.Api.Lidarr/ILidarrApi.cs
index 0eac960d0..826cfdec3 100644
--- a/src/Ombi.Api.Lidarr/ILidarrApi.cs
+++ b/src/Ombi.Api.Lidarr/ILidarrApi.cs
@@ -23,6 +23,6 @@ namespace Ombi.Api.Lidarr
Task> GetLanguageProfile(string apiKey, string baseUrl);
Task Status(string apiKey, string baseUrl);
Task AlbumSearch(int[] albumIds, string apiKey, string baseUrl);
- Task AlbumInformation(string albumId, string apiKey, string baseUrl);
+ Task AlbumInformation(string albumId, string apiKey, string baseUrl);
}
}
\ No newline at end of file
diff --git a/src/Ombi.Api.Lidarr/LidarrApi.cs b/src/Ombi.Api.Lidarr/LidarrApi.cs
index cb8db759e..61752e9b8 100644
--- a/src/Ombi.Api.Lidarr/LidarrApi.cs
+++ b/src/Ombi.Api.Lidarr/LidarrApi.cs
@@ -105,14 +105,13 @@ namespace Ombi.Api.Lidarr
return Api.Request>(request);
}
- public async Task AlbumInformation(string albumId, string apiKey, string baseUrl)
+ public async Task AlbumInformation(string albumId, string apiKey, string baseUrl)
{
var request = new Request($"{ApiVersion}/album", baseUrl, HttpMethod.Get);
request.AddQueryString("foreignAlbumId", albumId);
AddHeaders(request, apiKey);
- var albums = await Api.Request>(request);
- return albums.Where(x => x.foreignAlbumId.Equals(albumId, StringComparison.InvariantCultureIgnoreCase))
- .FirstOrDefault();
+ var albums = await Api.Request>(request);
+ return albums.FirstOrDefault();
}
diff --git a/src/Ombi.Api.Lidarr/Models/AlbumByForeignId.cs b/src/Ombi.Api.Lidarr/Models/AlbumByForeignId.cs
new file mode 100644
index 000000000..27a479d2f
--- /dev/null
+++ b/src/Ombi.Api.Lidarr/Models/AlbumByForeignId.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Net.Mime;
+
+namespace Ombi.Api.Lidarr.Models
+{
+ public class AlbumByForeignId
+ {
+ public string title { get; set; }
+ public string disambiguation { get; set; }
+ public string overview { get; set; }
+ public int artistId { get; set; }
+ public string foreignAlbumId { get; set; }
+ public bool monitored { get; set; }
+ public bool anyReleaseOk { get; set; }
+ public int profileId { get; set; }
+ public int duration { get; set; }
+ public string albumType { get; set; }
+ public object[] secondaryTypes { get; set; }
+ public int mediumCount { get; set; }
+ public Ratings ratings { get; set; }
+ public DateTime releaseDate { get; set; }
+ public Release[] releases { get; set; }
+ public object[] genres { get; set; }
+ public Medium[] media { get; set; }
+ public Artist artist { get; set; }
+ public Image[] images { get; set; }
+ public Link[] links { get; set; }
+ public Statistics statistics { get; set; }
+ public int id { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Ombi.Core/Engine/MusicSearchEngine.cs b/src/Ombi.Core/Engine/MusicSearchEngine.cs
index c8d285766..da41d5bf1 100644
--- a/src/Ombi.Core/Engine/MusicSearchEngine.cs
+++ b/src/Ombi.Core/Engine/MusicSearchEngine.cs
@@ -157,7 +157,7 @@ namespace Ombi.Core.Engine
// TODO
- private async Task MapIntoAlbumVm(AlbumResponse a, LidarrSettings settings)
+ private async Task MapIntoAlbumVm(AlbumByForeignId a, LidarrSettings settings)
{
var vm = new SearchAlbumViewModel
{
@@ -167,7 +167,10 @@ namespace Ombi.Core.Engine
ReleaseDate = a.releaseDate,
Title = a.title,
Disk = a.images?.FirstOrDefault(x => x.coverType.Equals("disc"))?.url?.Replace("http", "https"),
- Genres = a.genres
+ Genres = a.genres,
+ AlbumType = a.albumType,
+ ArtistName = a.artist.artistName,
+ ForeignArtistId = a.artist.foreignArtistId,
};
if (a.artistId > 0)
{
@@ -185,10 +188,6 @@ namespace Ombi.Core.Engine
}
vm.Cover = a.images?.FirstOrDefault(x => x.coverType.Equals("cover"))?.url?.Replace("http", "https");
- if (vm.Cover.IsNullOrEmpty())
- {
- //vm.Cover = a.remoteCover;
- }
await Rules.StartSpecificRules(vm, SpecificRules.LidarrAlbum);
diff --git a/src/Ombi.Core/Rule/Rules/Request/CanRequestRule.cs b/src/Ombi.Core/Rule/Rules/Request/CanRequestRule.cs
index a2c70fcc5..2b316cfc5 100644
--- a/src/Ombi.Core/Rule/Rules/Request/CanRequestRule.cs
+++ b/src/Ombi.Core/Rule/Rules/Request/CanRequestRule.cs
@@ -1,4 +1,6 @@
-using System.Security.Claims;
+using Ombi.Store.Entities;
+using System.IO;
+using System.Security.Claims;
using System.Security.Principal;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
@@ -37,16 +39,24 @@ namespace Ombi.Core.Rule.Rules.Request
if (obj.RequestType == RequestType.TvShow)
{
if (await _manager.IsInRoleAsync(user, OmbiRoles.RequestTv) || await _manager.IsInRoleAsync(user, OmbiRoles.AutoApproveTv))
+ {
return Success();
+ }
+
+ return Fail("You do not have permissions to Request a TV Show");
}
if (obj.RequestType == RequestType.Album)
{
if (await _manager.IsInRoleAsync(user, OmbiRoles.RequestMusic) || await _manager.IsInRoleAsync(user, OmbiRoles.AutoApproveMusic))
+ {
return Success();
+ }
+
+ return Fail("You do not have permissions to Request an Album");
}
- return Fail("You do not have permissions to Request a TV Show");
+ throw new InvalidDataException("Permission check failed: unknown RequestType");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Ombi/Startup.cs b/src/Ombi/Startup.cs
old mode 100644
new mode 100755
index 6f0d4a7ff..796517225
--- a/src/Ombi/Startup.cs
+++ b/src/Ombi/Startup.cs
@@ -216,7 +216,14 @@ namespace Ombi
app.UseSwagger();
app.UseSwaggerUI(c =>
{
- c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
+ if (settings.BaseUrl.HasValue())
+ {
+ c.SwaggerEndpoint($"{settings.BaseUrl}/swagger/v1/swagger.json", "My API V1");
+ }
+ else
+ {
+ c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
+ }
});
app.UseMvc(routes =>