diff --git a/Sources/Media Library/MediaCategories/MediaCategoryViewController.swift b/Sources/Media Library/MediaCategories/MediaCategoryViewController.swift index 407954ebdf9417e7e2cd48deaf3e84136167ef20..c221da347649b09f85b2e6a0c64177a52a15ceb1 100644 --- a/Sources/Media Library/MediaCategories/MediaCategoryViewController.swift +++ b/Sources/Media Library/MediaCategories/MediaCategoryViewController.swift @@ -505,12 +505,6 @@ class MediaCategoryViewController: UICollectionViewController, UISearchBarDelega } } - override func viewDidAppear(_ animated: Bool) { - showGuideOnLaunch() - updateCollectionViewForAlbum() - } - - private func addInitializationCommonObservers() { let notificationCenter = NotificationCenter.default @@ -537,8 +531,8 @@ class MediaCategoryViewController: UICollectionViewController, UISearchBarDelega addPlaybackWillStopObserver() } - notificationCenter.addObserver(self, selector: #selector(playbackDidStart), - name: Notification.Name(VLCPlaybackServicePlaybackDidStart), object: nil) + notificationCenter.addObserver(self, selector: #selector(playbackDidStart), + name: Notification.Name(VLCPlaybackServicePlaybackDidStart), object: nil) } private func removeInitializationCommonObservers() { @@ -561,7 +555,9 @@ class MediaCategoryViewController: UICollectionViewController, UISearchBarDelega } private func removeThemeChangeObserver() { - NotificationCenter.default.removeObserver(self, name: .VLCThemeDidChangeNotification, object: nil) + let notificationCenter = NotificationCenter.default + + notificationCenter.removeObserver(self, name: .VLCThemeDidChangeNotification, object: nil) if PlaybackService.sharedInstance().isPlaying && isPlaylistCurrentlyPlaying { removePlaybackWillStopObserver() @@ -1832,7 +1828,7 @@ extension MediaCategoryViewController { } playbackController.playMedia(at: index, fromCollection: tracks) } - + func saveCurrentPlaylistInfo(with playlistId: Int64?, playlistTitle: String?, media: VLCMLMedia?) { guard let media = media, let playlistId = playlistId, let playlistTitle = playlistTitle else { return @@ -1869,8 +1865,8 @@ extension MediaCategoryViewController { private func removePlaybackWillStopObserver() { NotificationCenter.default.removeObserver(self, - name: NSNotification.Name(rawValue: VLCPlaybackServicePlaybackWillStop), - object: nil + name: NSNotification.Name(rawValue: VLCPlaybackServicePlaybackWillStop), + object: nil ) } diff --git a/Sources/Media Library/MediaCategoryCells/MediaCollectionViewCell.swift b/Sources/Media Library/MediaCategoryCells/MediaCollectionViewCell.swift index e3ab788e3e5ea818752bb29bf34f7d7e0030d236..ebf09f30f3e442e2225e6bc9f7433e9c122a8e3b 100644 --- a/Sources/Media Library/MediaCategoryCells/MediaCollectionViewCell.swift +++ b/Sources/Media Library/MediaCategoryCells/MediaCollectionViewCell.swift @@ -101,7 +101,7 @@ class MediaCollectionViewCell: BaseCollectionViewCell, UIScrollViewDelegate { override var isSelected: Bool { didSet { checkboxImageView.image = isSelected ? UIImage(named: "checkboxSelected") - : UIImage(named: "checkboxEmpty") + : UIImage(named: "checkboxEmpty") } } @@ -372,7 +372,7 @@ class MediaCollectionViewCell: BaseCollectionViewCell, UIScrollViewDelegate { accessibilityLabel = artist.accessibilityText() let numberOfAlbums = artist.albumsCount() sizeDescriptionLabel.text = numberOfAlbums == 0 ? artist.numberOfTracksString() : - String(format: "%@ · %@", artist.numberOfAlbumsString(), artist.numberOfTracksString()) + String(format: "%@ · %@", artist.numberOfAlbumsString(), artist.numberOfTracksString()) thumbnailView.image = artist.thumbnail() scrollView.isScrollEnabled = false updateSizeDescriptionLabelConstraint() @@ -386,7 +386,7 @@ class MediaCollectionViewCell: BaseCollectionViewCell, UIScrollViewDelegate { newLabel.isHidden = !movie.isNew if movie.isNew { - setMediaNew() + setMediaNew() } if lastPlayed { diff --git a/Sources/Media Library/MediaCategoryCells/MovieCollectionViewCell.swift b/Sources/Media Library/MediaCategoryCells/MovieCollectionViewCell.swift index e57695d8531179c6ec93752e904a1116c87f9e75..f51f579c0251ef00bc808895a4e08a4e9cdb6e84 100644 --- a/Sources/Media Library/MediaCategoryCells/MovieCollectionViewCell.swift +++ b/Sources/Media Library/MediaCategoryCells/MovieCollectionViewCell.swift @@ -8,7 +8,7 @@ * Authors: Carola Nitz <nitz.carola # googlemail.com> * * Refer to the COPYING file of the official project for license. -*****************************************************************************/ + *****************************************************************************/ import Foundation import UIKit @@ -52,7 +52,7 @@ class MovieCollectionViewCell: BaseCollectionViewCell { override var isSelected: Bool { didSet { checkboxImageView.image = isSelected ? UIImage(named: "checkboxSelected") - : UIImage(named: "checkboxEmpty") + : UIImage(named: "checkboxEmpty") } } diff --git a/Sources/Media Library/MediaLibraryModel/PlaylistModel.swift b/Sources/Media Library/MediaLibraryModel/PlaylistModel.swift index 64f0279157622d0c3e621dbce3828b8b58dcd328..43311aa91630a11530d6f7b247a7cb6369f25fdb 100644 --- a/Sources/Media Library/MediaLibraryModel/PlaylistModel.swift +++ b/Sources/Media Library/MediaLibraryModel/PlaylistModel.swift @@ -136,8 +136,8 @@ extension PlaylistModel: MediaLibraryObserver { playlistsIds.forEach() { guard let safePlaylist = medialibrary.medialib.playlist(withIdentifier: $0.int64Value) - else { - return + else { + return } playlists.append(safePlaylist) } diff --git a/Sources/Playback/Control/VLCPlaybackService.m b/Sources/Playback/Control/VLCPlaybackService.m index 31cdd203842412f07ce9b76bc455b8b2b790d71a..e4a9c2b69f2c41bb558449e342818a57f1e8650c 100644 --- a/Sources/Playback/Control/VLCPlaybackService.m +++ b/Sources/Playback/Control/VLCPlaybackService.m @@ -416,7 +416,7 @@ NSString *const VLCLastPlaylistPlayedMedia = @"LastPlaylistPlayedMedia"; APLog(@"%s: locking failed", __PRETTY_FUNCTION__); return; } -#if TARGET_OS_IOS +#if !TARGET_OS_TV VLCMLMedia * lastMedia = [VLCMLMedia mediaForPlayingMedia: _mediaPlayer.media]; //last played VLCMLMeida before playback stops [[NSNotificationCenter defaultCenter] postNotificationName:VLCPlaybackServicePlaybackWillStop object: nil userInfo: @{VLCLastPlaylistPlayedMedia: lastMedia}]; #endif diff --git a/VLC.xcodeproj/project.pbxproj b/VLC.xcodeproj/project.pbxproj index b06d93543090e9ca0a1cf4506a39be07667542b3..ec17c3851591616587f6d2887e2062eaf310388c 100644 --- a/VLC.xcodeproj/project.pbxproj +++ b/VLC.xcodeproj/project.pbxproj @@ -542,6 +542,7 @@ 7D745DCD2B88CE9F004B4DCD /* VLCSEPANotificationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D745DCB2B88CE9F004B4DCD /* VLCSEPANotificationViewController.m */; }; 7D745DCE2B88CE9F004B4DCD /* VLCSEPANotificationViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D745DCC2B88CE9F004B4DCD /* VLCSEPANotificationViewController.xib */; }; 7D745DD12B88CEBE004B4DCD /* VLCSEPA.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D745DD02B88CEBE004B4DCD /* VLCSEPA.m */; }; + 7D77ECE32D626A480062A109 /* PlaybackCacheHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 558CFFC42C30D69500E47D8E /* PlaybackCacheHelper.swift */; }; 7D799BA22B8394F100FF93F2 /* VLCDonationNagScreenViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D799BA02B8394F100FF93F2 /* VLCDonationNagScreenViewController.m */; }; 7D799BA32B8394F100FF93F2 /* VLCDonationNagScreenViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D799BA12B8394F100FF93F2 /* VLCDonationNagScreenViewController.xib */; }; 7D7EF3DB1BD56B5900CD4CEE /* VLCOpenNetworkStreamTVViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D7EF3D91BD56B5900CD4CEE /* VLCOpenNetworkStreamTVViewController.xib */; }; @@ -1021,8 +1022,8 @@ 44D57DD92D360503009D80AA /* UIImage+Util.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+Util.swift"; sourceTree = "<group>"; }; 4C52D3AC99C0A237C421254D /* Pods-VLC-visionOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VLC-visionOS.debug.xcconfig"; path = "Target Support Files/Pods-VLC-visionOS/Pods-VLC-visionOS.debug.xcconfig"; sourceTree = "<group>"; }; 535ECB057D81248C91FA25C4 /* Pods-VLC-iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VLC-iOS.debug.xcconfig"; path = "Target Support Files/Pods-VLC-iOS/Pods-VLC-iOS.debug.xcconfig"; sourceTree = "<group>"; }; - 55B880DE2CE02A8B009C181A /* UIScreen+Brightness.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIScreen+Brightness.swift"; sourceTree = "<group>"; }; 558CFFC42C30D69500E47D8E /* PlaybackCacheHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaybackCacheHelper.swift; sourceTree = "<group>"; }; + 55B880DE2CE02A8B009C181A /* UIScreen+Brightness.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIScreen+Brightness.swift"; sourceTree = "<group>"; }; 57087A12E77ACEB9D1D30E33 /* Pods-VLC-tvOS.distribution.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VLC-tvOS.distribution.xcconfig"; path = "Target Support Files/Pods-VLC-tvOS/Pods-VLC-tvOS.distribution.xcconfig"; sourceTree = "<group>"; }; 597B403E2625E85000C0D81E /* SliderInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SliderInfoView.swift; sourceTree = "<group>"; }; 6C5B0C9C27A43098005AE25B /* PlaybackServiceAdjustFilter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = PlaybackServiceAdjustFilter.swift; path = Sources/Playback/Control/PlaybackServiceAdjustFilter.swift; sourceTree = SOURCE_ROOT; }; @@ -1736,7 +1737,6 @@ 7D94FCDF16DE7D1000F2623B /* UIKit.framework in Frameworks */, 7D94FCE116DE7D1000F2623B /* Foundation.framework in Frameworks */, 7D94FCE316DE7D1000F2623B /* CoreGraphics.framework in Frameworks */, - 4B079F7D58CA85ECBFEE7115 /* (null) in Frameworks */, F059536B83FB7DFE778387AA /* libPods-VLC-iOS.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -4293,6 +4293,7 @@ 7D50C5FB2BBD20DF00B9F1A0 /* Observable.swift in Sources */, 7D50C5FC2BBD20DF00B9F1A0 /* ExternalMediaProviderCell.swift in Sources */, 7D93B75E2D60EED100F952DE /* BottomTabBarController.swift in Sources */, + 7D77ECE32D626A480062A109 /* PlaybackCacheHelper.swift in Sources */, 7D50C5FD2BBD20DF00B9F1A0 /* MediaGroupViewModel.swift in Sources */, 7D50C5FE2BBD20DF00B9F1A0 /* AspectRatio.swift in Sources */, 7D50C5FF2BBD20DF00B9F1A0 /* UIFont+Styling.swift in Sources */,