mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Relax logging
This commit is contained in:
parent
f058b0c30c
commit
41ac15b204
@ -18,7 +18,7 @@ struct ChannelsCacheModel: CacheModel {
|
|||||||
|
|
||||||
func store(_ channel: Channel) {
|
func store(_ channel: Channel) {
|
||||||
guard channel.hasExtendedDetails else {
|
guard channel.hasExtendedDetails else {
|
||||||
logger.warning("not caching \(channel.cacheKey)")
|
logger.debug("not caching \(channel.cacheKey)")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ struct ChannelsCacheModel: CacheModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func retrieve(_ cacheKey: String) -> Channel? {
|
func retrieve(_ cacheKey: String) -> Channel? {
|
||||||
logger.info("retrieving cache for \(cacheKey)")
|
logger.debug("retrieving cache for \(cacheKey)")
|
||||||
|
|
||||||
if let json = try? storage?.object(forKey: cacheKey) {
|
if let json = try? storage?.object(forKey: cacheKey) {
|
||||||
return Channel.from(json)
|
return Channel.from(json)
|
||||||
|
@ -27,7 +27,7 @@ struct FeedCacheModel: CacheModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func retrieveFeed(account: Account) -> [Video] {
|
func retrieveFeed(account: Account) -> [Video] {
|
||||||
logger.info("retrieving cache for \(account.feedCacheKey)")
|
logger.debug("retrieving cache for \(account.feedCacheKey)")
|
||||||
|
|
||||||
if let json = try? storage?.object(forKey: account.feedCacheKey),
|
if let json = try? storage?.object(forKey: account.feedCacheKey),
|
||||||
let videos = json.dictionaryValue["videos"]
|
let videos = json.dictionaryValue["videos"]
|
||||||
|
@ -27,7 +27,7 @@ struct PlaylistsCacheModel: CacheModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func retrievePlaylists(account: Account) -> [Playlist] {
|
func retrievePlaylists(account: Account) -> [Playlist] {
|
||||||
logger.info("retrieving cache for \(playlistCacheKey(account))")
|
logger.debug("retrieving cache for \(playlistCacheKey(account))")
|
||||||
|
|
||||||
if let json = try? storage?.object(forKey: playlistCacheKey(account)),
|
if let json = try? storage?.object(forKey: playlistCacheKey(account)),
|
||||||
let playlists = json.dictionaryValue["playlists"]
|
let playlists = json.dictionaryValue["playlists"]
|
||||||
|
@ -24,7 +24,7 @@ struct VideosCacheModel: CacheModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func retrieveVideo(_ cacheKey: String) -> Video? {
|
func retrieveVideo(_ cacheKey: String) -> Video? {
|
||||||
logger.info("retrieving cache for \(cacheKey)")
|
logger.debug("retrieving cache for \(cacheKey)")
|
||||||
|
|
||||||
if let json = try? storage?.object(forKey: cacheKey) {
|
if let json = try? storage?.object(forKey: cacheKey) {
|
||||||
return Video.from(json)
|
return Video.from(json)
|
||||||
|
Loading…
Reference in New Issue
Block a user