-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation and prepare for proper first release
- Loading branch information
Showing
4 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
src/main/kotlin/com/github/schaka/janitorr/jellyfin/JellyfinNoOpService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.") | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/main/kotlin/com/github/schaka/janitorr/jellyfin/JellyfinService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>) | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/kotlin/com/github/schaka/janitorr/jellyseerr/JellyseerrNoOpService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.") | ||
} | ||
|
||
|
||
} |
7 changes: 7 additions & 0 deletions
7
src/main/kotlin/com/github/schaka/janitorr/jellyseerr/JellyseerrService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>) | ||
} |