Context menu: Add option to reload metadata from existing playlist entries

CQTexperiment
Christopher Snowhill 2021-07-03 15:32:13 -07:00
parent 510c762921
commit 922e657f0b
3 changed files with 31 additions and 5 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="18122" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="19115.3" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="18122"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19115.3"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -18,7 +18,7 @@
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowCollectionBehavior key="collectionBehavior" fullScreenPrimary="YES"/>
<rect key="contentRect" x="331" y="367" width="1000" height="400"/>
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
<value key="minSize" type="size" width="750" height="200"/>
<stackView key="contentView" distribution="equalSpacing" orientation="vertical" alignment="centerX" spacing="0.0" detachesHiddenViews="YES" id="2">
<rect key="frame" x="0.0" y="0.0" width="1000" height="400"/>
@ -32,7 +32,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="KWC-Ti-8KY">
<rect key="frame" x="0.0" y="0.0" width="1000" height="378"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<tableView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" alternatingRowBackgroundColors="YES" autosaveName="Playlist" rowHeight="18" headerView="1517" id="207" customClass="PlaylistView">
<rect key="frame" x="0.0" y="0.0" width="1000" height="361"/>
@ -567,7 +567,7 @@
<window title="Cog" separatorStyle="none" allowsToolTipsWhenApplicationIsInactive="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="Mini Window" animationBehavior="default" toolbarStyle="unified" id="2234" userLabel="Mini Window (Window)" customClass="MiniWindow">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<rect key="contentRect" x="192" y="547" width="640" height="0.0"/>
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
<view key="contentView" hidden="YES" wantsLayer="YES" id="2235">
<rect key="frame" x="0.0" y="0.0" width="640" height="0.0"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -1666,6 +1666,17 @@ Gw
<menuItem title="Information" hidden="YES" id="2212">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem title="Reload info" id="HK9-Am-31h">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="reloadTags:" target="218" id="Ghx-F8-uF3"/>
<binding destination="2020" name="enabled" keyPath="selection" id="DmN-2M-3dY">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNotNil</string>
</dictionary>
</binding>
</connections>
</menuItem>
<menuItem title="Show in Finder" id="1064">
<connections>
<action selector="showEntryInFinder:" target="218" id="1345"/>
@ -1712,6 +1723,7 @@ Gw
</connections>
</menuItem>
</items>
<point key="canvasLocation" x="-117" y="-407"/>
</menu>
<customObject id="1217" userLabel="PreferencesController" customClass="PreferencesController"/>
<customObject id="1303" userLabel="SUUpdater" customClass="SUUpdater"/>

View File

@ -108,6 +108,9 @@ typedef NS_ENUM(NSInteger, URLOrigin) {
- (IBAction)emptyQueueList:(id)sender;
- (NSMutableArray *)queueList;
// reload metadata of selection
- (IBAction)reloadTags:(id)sender;
- (void)moveObjectsInArrangedObjectsFromIndexes:(NSIndexSet *)indexSet
toIndex:(NSUInteger)insertIndex;

View File

@ -996,4 +996,15 @@
}
}
- (IBAction)reloadTags:(id)sender {
NSArray * selectedobjects = [self selectedObjects];
if ([selectedobjects count]) {
for (PlaylistEntry *pe in selectedobjects) {
pe.metadataLoaded = NO;
}
[playlistLoader loadInfoForEntries:selectedobjects];
}
}
@end