Skip to content

Commit

Permalink
Add documentation and prepare for proper first release
Browse files Browse the repository at this point in the history
  • Loading branch information
Schaka committed Jan 15, 2024
1 parent ca66938 commit d6f7840
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.github.schaka.janitorr.jellyfin

import com.github.schaka.janitorr.jellyfin.library.LibraryType
import com.github.schaka.janitorr.servarr.LibraryItem
import org.slf4j.LoggerFactory
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
import org.springframework.stereotype.Service

/**
* Does nothing. Used in case the user does not supply Jellyfin configuration.
*/
@Service
@ConditionalOnProperty("clients.jellyfin", matchIfMissing = true)
class JellyfinNoOpService : JellyfinService {

companion object {
private val log = LoggerFactory.getLogger(this::class.java.enclosingClass)
}

override fun cleanupTvShows(items: List<LibraryItem>) {
log.info("Jellyfin not implemented. No TV shows deleted.")
}

override fun cleanupMovies(items: List<LibraryItem>) {
log.info("Jellyfin not implemented. No movies deleted.")
}

override fun updateGoneSoon(type: LibraryType, items: List<LibraryItem>) {
log.info("Jellyfin not implemented. No 'Gone Soon' library created.")
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.github.schaka.janitorr.jellyfin

import com.github.schaka.janitorr.jellyfin.library.LibraryType
import com.github.schaka.janitorr.servarr.LibraryItem

interface JellyfinService {
fun cleanupTvShows(items: List<LibraryItem>)

fun cleanupMovies(items: List<LibraryItem>)

fun updateGoneSoon(type: LibraryType, items: List<LibraryItem>)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.github.schaka.janitorr.jellyseerr

import com.github.schaka.janitorr.jellyfin.library.LibraryType
import com.github.schaka.janitorr.servarr.LibraryItem
import org.slf4j.LoggerFactory
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
import org.springframework.stereotype.Service

/**
* Does nothing. Used in case the user does not supply Jellyfin configuration.
*/
@Service
@ConditionalOnProperty("clients.jellyseerr", matchIfMissing = true)
class JellyseerrNoOpService : JellyseerrService {

companion object {
private val log = LoggerFactory.getLogger(this::class.java.enclosingClass)
}

override fun cleanupRequests(items: List<LibraryItem>) {
log.info("Jellyseer not in use, no requests found.")
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.github.schaka.janitorr.jellyseerr

import com.github.schaka.janitorr.servarr.LibraryItem

interface JellyseerrService {
fun cleanupRequests(items: List<LibraryItem>)
}

0 comments on commit d6f7840

Please sign in to comment.