mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Add movie count to performer and studio card (#1760)
* Add movies and movie_count properties to Performer type Extend the GraphQL API to allow getting the movies and movie count by performer. * Add movies count to performer card * Add movies and movie_count properties to Studio type Extend the GraphQL API to allow getting the movies and movie count by studio. * Add movies count to studio card
This commit is contained in:
@@ -56,6 +56,48 @@ func (_m *MovieReaderWriter) Count() (int, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// CountByPerformerID provides a mock function with given fields: performerID
|
||||
func (_m *MovieReaderWriter) CountByPerformerID(performerID int) (int, error) {
|
||||
ret := _m.Called(performerID)
|
||||
|
||||
var r0 int
|
||||
if rf, ok := ret.Get(0).(func(int) int); ok {
|
||||
r0 = rf(performerID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int) error); ok {
|
||||
r1 = rf(performerID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// CountByStudioID provides a mock function with given fields: studioID
|
||||
func (_m *MovieReaderWriter) CountByStudioID(studioID int) (int, error) {
|
||||
ret := _m.Called(studioID)
|
||||
|
||||
var r0 int
|
||||
if rf, ok := ret.Get(0).(func(int) int); ok {
|
||||
r0 = rf(studioID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int) error); ok {
|
||||
r1 = rf(studioID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// Create provides a mock function with given fields: newMovie
|
||||
func (_m *MovieReaderWriter) Create(newMovie models.Movie) (*models.Movie, error) {
|
||||
ret := _m.Called(newMovie)
|
||||
@@ -176,6 +218,52 @@ func (_m *MovieReaderWriter) FindByNames(names []string, nocase bool) ([]*models
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// FindByPerformerID provides a mock function with given fields: performerID
|
||||
func (_m *MovieReaderWriter) FindByPerformerID(performerID int) ([]*models.Movie, error) {
|
||||
ret := _m.Called(performerID)
|
||||
|
||||
var r0 []*models.Movie
|
||||
if rf, ok := ret.Get(0).(func(int) []*models.Movie); ok {
|
||||
r0 = rf(performerID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*models.Movie)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int) error); ok {
|
||||
r1 = rf(performerID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// FindByStudioID provides a mock function with given fields: studioID
|
||||
func (_m *MovieReaderWriter) FindByStudioID(studioID int) ([]*models.Movie, error) {
|
||||
ret := _m.Called(studioID)
|
||||
|
||||
var r0 []*models.Movie
|
||||
if rf, ok := ret.Get(0).(func(int) []*models.Movie); ok {
|
||||
r0 = rf(studioID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*models.Movie)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int) error); ok {
|
||||
r1 = rf(studioID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// FindMany provides a mock function with given fields: ids
|
||||
func (_m *MovieReaderWriter) FindMany(ids []int) ([]*models.Movie, error) {
|
||||
ret := _m.Called(ids)
|
||||
|
||||
Reference in New Issue
Block a user