[PR #132] [MERGED] New Data Classes #1386

Closed
opened 2026-04-24 23:58:06 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf-app/pull/132
Author: @benonymity
Created: 4/23/2022
Status: Merged
Merged: 4/25/2022
Merged by: @advplyr

Base: masterHead: DataClasses


📝 Commits (3)

  • 4d0d1eb New Data Classes
  • 7189588 Merge branch 'advplyr:master' into DataClasses
  • 81ca757 Book-Podcast combination, optional fixes

📊 Changes

4 files changed (+135 additions, -29 deletions)

View changed files

📝 ios/App/App.xcodeproj/project.pbxproj (+4 -0)
ios/App/Shared/models/DataClasses.swift (+127 -0)
📝 ios/App/Shared/models/PlaybackSession.swift (+2 -27)
📝 ios/App/Shared/player/AudioPlayer.swift (+2 -2)

📄 Description

This copies most of the data classes present in the android app to the iOS side, but I can't figure out how to toggle the MediaType struct in libraryItem based on mediaType (line 28 of DataClasses.swift) since there is no JSON parser built-in that can differentiate and I'm not experienced enough in Swift to know some magic solution that doesn't disrupt the inheritability. Any ideas on how to go about implementing that?
My goal was originally to fix the issue where there is no cover displayed in the native player, and a simple fix works for that by fetching again the cover for the given ID each time. But I figured this needed to be implemented at some point especially with an eventual goal of offline downloads so I took the long route--once we figure out the MediaType switching it should all work. Input appreciated!


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf-app/pull/132 **Author:** [@benonymity](https://github.com/benonymity) **Created:** 4/23/2022 **Status:** ✅ Merged **Merged:** 4/25/2022 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `DataClasses` --- ### 📝 Commits (3) - [`4d0d1eb`](https://github.com/advplyr/audiobookshelf-app/commit/4d0d1eb88f7f32b9411c3e9d7f05045dc555ed5c) New Data Classes - [`7189588`](https://github.com/advplyr/audiobookshelf-app/commit/7189588c2b0f2d49cf3c50a98d94b552325fe8a6) Merge branch 'advplyr:master' into DataClasses - [`81ca757`](https://github.com/advplyr/audiobookshelf-app/commit/81ca757c773acc49138e464f21e63ce9b1bec762) Book-Podcast combination, optional fixes ### 📊 Changes **4 files changed** (+135 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `ios/App/App.xcodeproj/project.pbxproj` (+4 -0) ➕ `ios/App/Shared/models/DataClasses.swift` (+127 -0) 📝 `ios/App/Shared/models/PlaybackSession.swift` (+2 -27) 📝 `ios/App/Shared/player/AudioPlayer.swift` (+2 -2) </details> ### 📄 Description This copies most of the data classes present in the android app to the iOS side, but I can't figure out how to toggle the MediaType struct in libraryItem based on mediaType (line 28 of DataClasses.swift) since there is no JSON parser built-in that can differentiate and I'm not experienced enough in Swift to know some magic solution that doesn't disrupt the inheritability. Any ideas on how to go about implementing that? My goal was originally to fix the issue where there is no cover displayed in the native player, and a simple fix works for that by fetching again the cover for the given ID each time. But I figured this needed to be implemented at some point especially with an eventual goal of offline downloads so I took the long route--once we figure out the MediaType switching it should all work. Input appreciated! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-24 23:58:06 +02:00
adam closed this issue 2026-04-24 23:58:06 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#1386