Skip to content

Commit

Permalink
Fix playback speed slider not showing on videos (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
glouel committed May 13, 2023
1 parent a581dd3 commit dc73d25
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 32 deletions.
8 changes: 4 additions & 4 deletions Aerial.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3265,15 +3265,15 @@
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 3.2.2beta1;
CURRENT_PROJECT_VERSION = 3.2.5;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 3L54M5L5KK;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "$(SRCROOT)/Resources/Old stuff/Info.plist";
INSTALL_PATH = "$(HOME)/Library/Screen Savers";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 3.2.2beta1;
MARKETING_VERSION = 3.2.5;
PRODUCT_BUNDLE_IDENTIFIER = com.johncoates.Aerial;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -3294,15 +3294,15 @@
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 3.2.2beta1;
CURRENT_PROJECT_VERSION = 3.2.5;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 3L54M5L5KK;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "$(SRCROOT)/Resources/Old stuff/Info.plist";
INSTALL_PATH = "$(HOME)/Library/Screen Savers";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 3.2.2beta1;
MARKETING_VERSION = 3.2.5;
OTHER_CODE_SIGN_FLAGS = "--timestamp";
PRODUCT_BUNDLE_IDENTIFIER = com.johncoates.Aerial;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
2 changes: 1 addition & 1 deletion Aerial/Source/Models/Cache/Cache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ struct Cache {
formatter.locale = Locale.current // USA: Locale(identifier: "en_US")
formatter.numberStyle = .decimal
let result = formatter.string(from: NSNumber(value: PrefsCache.cacheLimit.rounded(toPlaces: 1)))!
print(result) // -> US$9,999.99
//print(result) // -> US$9,999.99

if !Aerial.helper.showAlert(question: "Your cache is full",
text: "Your cache limit is currently set to \(result) GB, and currently contains \(Cache.sizeString()) of files.\n\n Do you want to proceed with the download anyway?\n\nYou can manually increase or decrease your cache size in Settings > Cache.",
Expand Down
2 changes: 1 addition & 1 deletion Aerial/Source/Models/Cache/VideoDownload.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ final class VideoDownload: NSObject, NSURLConnectionDataDelegate {
}

deinit {
print("deinit VideoDownload")
//print("deinit VideoDownload")
}

func startDownload() {
Expand Down
6 changes: 3 additions & 3 deletions Aerial/Source/Models/Music/Music.swift
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class Music {
songId = fetchId(id: userInfo["Store URL"] as! String)
}

print(userInfo)
//print(userInfo)

// Let everyone who wants to know that we have a new song playing !
for callback in callbacks {
Expand All @@ -244,7 +244,7 @@ class Music {
}

@objc func spotifyCallback(_ aNotification: Notification) {
print(aNotification)
//print(aNotification)
var album = ""
var name = ""
var artist = ""
Expand Down Expand Up @@ -297,7 +297,7 @@ class Music {

guard let artworkUrl = spotifySong.thumbnailURL else {
debugLog("No artwork in SpotifySong")
print(spotifySong)
//print(spotifySong)
completion(nil)
return
}
Expand Down
5 changes: 3 additions & 2 deletions Aerial/Source/Models/Sources/VideoList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,11 @@ class VideoList {
filters.append(afilter.lowercased())
}
}
print("Filters :")

/*print("Filters :")
for filter in filters {
print(filter)
}
}*/

/*print("Videos : ")
for video in videos {
Expand Down
4 changes: 2 additions & 2 deletions Resources/MainUI/PanelWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,12 @@ import Cocoa

// Switch from one source to another
func switchTo(_ path: String) {
print("switch to :" + path)
//print("switch to :" + path)

guard let currentPath = currentPath,
let videosVC = videosVC,
path != currentPath else {
print("switch init issue")
//print("switch init issue")
return
}

Expand Down
2 changes: 1 addition & 1 deletion Resources/MainUI/Settings panels/CacheViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class CacheViewController: NSViewController {
let usedCache = Cache.size()
let packsSize = Cache.packsSize()

print("pack size : \(packsSize)")
//print("pack size : \(packsSize)")

var maxCache = PrefsCache.cacheLimit
var freeCache = usedCache > maxCache ? 0 : maxCache - usedCache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,10 @@ class PlayingCollectionViewItem: NSCollectionViewItem {


@IBAction func browseButton(_ sender: Any) {
print("browse button")
print(hiddenPath.stringValue)
Aerial.helper.windowController?.browseTo(hiddenPath.stringValue)
}

@IBAction func mainImageClick(_ sender: NSButton) {
print("click in")
let path = hiddenPath.stringValue

if checkImageButton.state == .on {
Expand All @@ -63,7 +60,6 @@ class PlayingCollectionViewItem: NSCollectionViewItem {
}
}
@IBAction func imageButtonClick(_ sender: NSButton) {
print("click")
let path = hiddenPath.stringValue

if sender.state == .on {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class NowPlayingViewController: NSViewController {

for source in subSources {
let path = mode + source
print(path)

if !PrefsVideos.newShouldPlayString.contains(path) {
PrefsVideos.newShouldPlayString.append(path)
}
Expand All @@ -127,7 +127,6 @@ class NowPlayingViewController: NSViewController {
}

@IBAction func statusHiddenVideoButtonClick(_ sender: Any) {
print("Hidden B")
Aerial.helper.windowController?.browseTo("hidden:0")
}

Expand Down
20 changes: 8 additions & 12 deletions Resources/MainUI/VideosViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,12 @@ class VideosViewController: NSViewController {

let subpath = path.split(separator: ":")[1]

print(subpath)
//print(subpath)

// Very unswift
var index = 0
for item in VideoList.instance.getSources(mode: foundMode) {
if subpath == item {
print(index)
rotationSecondaryPopup.selectItem(at: index)
rotationSecondaryPopupChange(rotationSecondaryPopup)
}
Expand All @@ -183,7 +182,6 @@ class VideosViewController: NSViewController {
/// Reload the video view for a given path
func reloadFor(path: String) {
self.path = path
print("rf " + self.path!)

updateRotationMenu()
updateRuntimeLabel()
Expand Down Expand Up @@ -275,8 +273,6 @@ class VideosViewController: NSViewController {
mode = "all"
}

print("rpc " + mode!)

// Cascade to a secondary popup for the various filters
if mode == "all" || mode == "favorites" || mode == "hidden" {
rotationSecondaryPopup.isHidden = true
Expand All @@ -286,15 +282,12 @@ class VideosViewController: NSViewController {
rotationSecondaryPopup.isHidden = false
updateRotationSecondaryMenu()
}

// print(path!)
}

/// Secondary popup change event
@IBAction func rotationSecondaryPopupChange(_ sender: NSPopUpButton) {
// PrefsVideos.shouldPlayString = sender.selectedItem!.title
path = mode! + ":\(sender.indexOfSelectedItem)"
print(path!)
reloadFor(path: path!)
}

Expand Down Expand Up @@ -335,7 +328,6 @@ class VideosViewController: NSViewController {
// PrefsVideos.shouldPlayString = rotationSecondaryPopup.itemTitle(at: 0)
rotationSecondaryPopup.selectItem(at: 0)
path = mode! + ":0"
print(path!)
reloadFor(path: path!)
}
}
Expand Down Expand Up @@ -407,6 +399,10 @@ class VideosViewController: NSViewController {

/// Show video player
func showVideo(_ video: AerialVideo) {
playbackSpeedLabel.isHidden = false
playbackSpeedSlider.isHidden = false


heroPlayerView.isHidden = false
heroImageView.isHidden = true
isCachedImageView.isHidden = false
Expand Down Expand Up @@ -582,7 +578,7 @@ class VideosViewController: NSViewController {
}
} else {
// all
print(VideoList.instance.videos.count)
//print(VideoList.instance.videos.count)
if VideoList.instance.videos.count > 0 {
return VideoList.instance.videos
.filter({ !PrefsVideos.hidden.contains($0.id) })
Expand Down Expand Up @@ -687,7 +683,7 @@ extension VideosViewController: NSTableViewDataSource {
return 0
}

print("nor path : " + path)
//print("nor path : " + path)

if let mode = VideoList.instance.modeFromPath(path) {
let index = Int(path.split(separator: ":")[1])!
Expand All @@ -705,7 +701,7 @@ extension VideosViewController: NSTableViewDelegate {
return nil
}

print("tv path : " + path)
//print("tv path : " + path)

var video: AerialVideo
if let mode = VideoList.instance.modeFromPath(path) {
Expand Down

0 comments on commit dc73d25

Please sign in to comment.