Skip to content

Commit

Permalink
[Build] Fix compile, whoopsie
Browse files Browse the repository at this point in the history
  • Loading branch information
Schaka committed Oct 5, 2024
1 parent 3c054e4 commit ff61e8d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import com.github.schaka.janitorr.mediaserver.jellyfin.JellyfinRestService
import com.github.schaka.janitorr.mediaserver.library.*
import com.github.schaka.janitorr.mediaserver.library.items.ItemPage
import com.github.schaka.janitorr.mediaserver.library.items.MediaFolderItem
import com.github.schaka.janitorr.servarr.bazarr.BazarrRestService
import com.github.schaka.janitorr.servarr.bazarr.BazarrService
import org.springframework.aot.hint.annotation.RegisterReflectionForBinding
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
Expand All @@ -40,8 +42,9 @@ class MediaServerConfig(
fun mediaServer(
jellyfinProperties: JellyfinProperties,
embyProperties: EmbyProperties,
bazarrService: BazarrService,
applicationProperties: ApplicationProperties,
fileSystemProperties: FileSystemProperties
fileSystemProperties: FileSystemProperties,
): AbstractMediaServerService {

if (!jellyfinProperties.enabled && !embyProperties.enabled) {
Expand All @@ -53,9 +56,9 @@ class MediaServerConfig(
}

if (embyProperties.enabled) {
return EmbyRestService(embyClient, embyUserClient, embyProperties, applicationProperties, fileSystemProperties)
return EmbyRestService(embyClient, embyUserClient, bazarrService, embyProperties, applicationProperties, fileSystemProperties)
}

return JellyfinRestService(jellyfinClient, jellyfinUserClient, jellyfinProperties, applicationProperties, fileSystemProperties)
return JellyfinRestService(jellyfinClient, jellyfinUserClient, bazarrService, jellyfinProperties, applicationProperties, fileSystemProperties)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.github.schaka.janitorr.config.FileSystemProperties
import com.github.schaka.janitorr.mediaserver.jellyfin.JellyfinProperties
import com.github.schaka.janitorr.mediaserver.jellyfin.JellyfinRestService
import com.github.schaka.janitorr.servarr.LibraryItem
import com.github.schaka.janitorr.servarr.bazarr.BazarrService
import io.mockk.impl.annotations.InjectMockKs
import io.mockk.impl.annotations.MockK
import io.mockk.impl.annotations.SpyK
Expand All @@ -28,6 +29,9 @@ internal class MediaRestServiceTest {
@MockK
lateinit var mediaServerUserClient: MediaServerUserClient

@MockK
lateinit var bazarrService: BazarrService

@MockK
lateinit var jellyfinProperties: JellyfinProperties

Expand Down

0 comments on commit ff61e8d

Please sign in to comment.