Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
GrakovNe committed Nov 29, 2024
1 parent 2e93d81 commit b3d3175
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class BookResponseConverter @Inject constructor() {
?: emptyList(),
chapters = maybeChapters ?: filesAsChapters(),
libraryId = item.libraryId,
localStored = false,
localProvided = false,
progress = progressResponse
?.let {
MediaProgress(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class PodcastResponseConverter @Inject constructor() {
title = item.media.metadata.title,
libraryId = item.libraryId,
author = item.media.metadata.author,
localStored = false,
localProvided = false,
files = orderedEpisodes
?.map {
BookFile(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CachedBookEntityDetailedConverter @Inject constructor() {
title = entity.detailedBook.title,
author = entity.detailedBook.author,
libraryId = entity.detailedBook.libraryId,
localStored = true,
localProvided = true,
files = entity.files.map { fileEntity ->
BookFile(
id = fileEntity.bookFileId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data class DetailedItem(
val chapters: List<BookChapter>,
val progress: MediaProgress?,
val libraryId: String?,
val localStored: Boolean,
val localProvided: Boolean,
) : Serializable

data class BookFile(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,4 +223,4 @@ private fun playingItemChanged(
private fun cachePolicyChanged(
contentCachingModelView: ContentCachingModelView,
playingBook: DetailedItem?,
) = contentCachingModelView.localCacheUsing() != playingBook?.localStored
) = contentCachingModelView.localCacheUsing() != playingBook?.localProvided
15 changes: 15 additions & 0 deletions app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,19 @@
<string name="widget_placeholder_text">Нажмите чтобы запустить</string>
<string name="the_offline_podcasts_is_empty">Загруженных подкастов нет</string>
<string name="player_screen_downloads_navigation">Загрузки</string>
<string name="downloads_menu_download_book">Скачать</string>
<string name="downloads_menu_download_podcast">Скачать</string>
<string name="downloads_menu_download_unknown">Загрузки</string>
<string name="downloads_menu_download_option_current_chapter">Текущую главу</string>
<string name="downloads_menu_download_option_current_episode">Текущий выпуск</string>
<string name="downloads_menu_download_option_current_item">Текущий элемент</string>
<string name="downloads_menu_download_option_entire_book">Всю книгу</string>
<string name="downloads_menu_download_option_entire_podcast">Все выпуски</string>
<string name="downloads_menu_download_option_entire_item">Все элементы</string>
<string name="downloads_menu_download_option_next_chapters">Следуюшие %1$d глав</string>
<string name="downloads_menu_download_option_next_episodes">Следуюшие %1$d выпусков</string>
<string name="downloads_menu_download_option_next_items">Следуюшие %1$d элементов</string>
<string name="downloads_menu_download_option_clear_chapters">Удалить загруженные главы</string>
<string name="downloads_menu_download_option_clear_episodes">Удалить загруженные выпуски</string>
<string name="downloads_menu_download_option_clear_items">Удалить загруженные элементы</string>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<string name="player_screen_downloads_navigation">Downloads</string>
<string name="downloads_menu_download_book">Download book</string>
<string name="downloads_menu_download_podcast">Download podcast</string>
<string name="downloads_menu_download_unknown">Download</string>
<string name="downloads_menu_download_unknown">Downloads</string>
<string name="downloads_menu_download_option_current_chapter">Current chapter</string>
<string name="downloads_menu_download_option_current_episode">Current episode</string>
<string name="downloads_menu_download_option_current_item">Current item</string>
Expand Down

0 comments on commit b3d3175

Please sign in to comment.