Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • videolan/vlc-ios
  • gsoc/GSoC2018/bubu/vlc-ios
  • bubu/vlc-ios
  • chamander/vlc-ios
  • fkuehne/vlc-ios
  • Yakuzzza/vlc-ios
  • nishiths23/vlc-ios
  • alexkusssha/vlc-ios
  • jay18001/vlc-ios
  • hoangduc67/vlc-ios
  • gsoc/gsoc2019/robwayne/vlc-ios
  • groschoppsteven/vlc-ios
  • tguillem/vlc-ios
  • ePirat/vlc-ios
  • cerezo074/vlc-ios
  • edrflt/vlc-ios
  • Zirkovskij/vlc-ios
  • bakroistvan/vlc-ios
  • heidlerjustin/vlc-ios
  • W1ns/vlc-ios
  • karpun.ksv122454/vlc-ios
  • adtrevor/vlc-ios
  • rrangel3584/vlc-ios
  • Ggjgg/vlc-ios
  • tanenyi/vlc-ios
  • tmsblgh/vlc-ios
  • gale4004/vlc-ios
  • abytom/vlc-ios
  • rubendelapena/vlc-ios
  • DanielaRocha6/vlc-ios
  • kuznetsov-m/vlc-ios
  • dcodesuport/vlc-ios
  • gsoc/gsoc2020/swapnanildholg/vlc-ios
  • alexandre-janniaux/vlc-ios
  • zhkzte/vlc-ios
  • elbrujo1987/vlc-ios
  • PJStation/vlc-ios
  • diogo.simao-marques/vlc-ios
  • lalo-azamar/vlc-ios
  • dnicolson/vlc-ios
  • megan30/vlc-ios
  • yreifschneider/vlc-ios
  • pushpinderpalsingh/vlc-ios
  • jfarmer/vlc-ios
  • malekBarkaoui/vlc-ios
  • m/vlc-ios
  • zuzuweasly/vlc-ios
  • beingsparsh/vlc-ios
  • anubhavsingh19/vlc-ios
  • SnailMS/vlc-ios
  • dariustancode/vlc-ios
  • chandan.309kr/vlc-ios
  • umxprime/vlc-ios
  • vlcone/vlc-ios
  • bsidhom/vlc-ios
  • DeveshBisen/vlc-ios
  • denissparrow12/vlc-ios
  • antonianemi/vlc-ios
  • fieldsmonroe433/vlc-ios
  • antonviljoen9/vlc-ios
  • greenscgea/vlc-ios
  • keyseltmelanie/vlc-ios
  • collectionbylawrencejason/vlc-ios
  • aofsurachet1983/vlc-ios
  • archi.fahim/vlc-ios
  • XuanTung95/vlc-ios
  • nasirhemed/vlc-ios
  • ke994780/vlc-ios
  • kiwiren6666/vlc-ios
  • walikelas90/vlc-ios
  • ikeuzochukwu6/vlc-ios
  • NOTAG/vlc-ios
  • tatoonorth418/vlc-ios
  • deutschkiller72/vlc-ios
  • alexnwayne/vlc-ios
  • kiku.masa.mune00/vlc-ios
  • onfire4g05/vlc-ios
  • ass1ngl33y/vlc-ios
  • berrylcm/vlc-ios
  • ugotmjke46/vlc-ios
  • lehmacdj/vlc-ios
  • Prabal/vlc-ios
  • protechq88/vlc-ios
  • KDOT2EAZY/vlc-ios
  • king7532/vlc-ios
  • uniqueunicorn333/vlc-ios
  • Againreallly/vlc-ios
  • mztea928/vlc-ios
  • pabloluna.bella/vlc-ios
  • EshanSingh-ES/vlc-ios
  • arditx02/vlc-ios
  • tomas23prenosil/vlc-ios
  • yonat/vlc-ios
  • whatsupmf09/vlc-ios
  • Perklone/vlc-ios
  • vettrecompetitive/vlc-ios
  • ojaidi.905/vlc-ios
  • reubot/vlc-ios
  • loegue1910/vlc-ios
  • jeffmarshall/vlc-ios
  • pup.ragnarok.1984/vlc-ios
  • aviwad/vlc-ios
  • ashishami2002/vlc-ios
  • Sumou/vlc-ios
  • iampratik/vlc-ios
  • Sliem/vlc-ios
  • Apeng/vlc-ios
  • ibrahimcetin/vlc-ios
  • Aperence/vlc-ios
  • Truls/vlc-ios
  • Nilsjoberl/vlc-ios
  • Naruyoko/vlc-ios
  • borisgolovnev/vlc-ios
  • christianbilodeau/vlc-ios
  • liamjwang/vlc-ios
  • surajeet310/vlc-ios
  • craig_r/vlc-ios
  • labala/vlc-ios
  • arthurnorat/vlc-ios
  • 0xfee1de4d/vlc-ios
  • harlanhaskins/vlc-ios
  • rae/vlc-ios
  • gremlinflat/vlc-ios
  • robbiedeane/vlc-ios
124 results
Show changes
Commits on Source (7)
Showing
with 366 additions and 179 deletions
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15508"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCDownloadViewController">
<connections>
<outlet property="activityIndicator" destination="91" id="92"/>
<outlet property="cancelButton" destination="86" id="89"/>
<outlet property="contentView" destination="idF-Hx-Zjl" id="ipl-30-FOs"/>
<outlet property="currentDownloadLabel" destination="84" id="88"/>
<outlet property="downloadButton" destination="EPu-Ev-iiG" id="rYp-Hq-sxv"/>
<outlet property="downloadFieldContainer" destination="x4O-OM-rZw" id="K3A-wG-AY7"/>
<outlet property="downloadsTable" destination="69" id="75"/>
<outlet property="progressContainer" destination="79" id="ziD-8V-J9W"/>
<outlet property="progressPercent" destination="99" id="pd3-iz-W06"/>
<outlet property="progressView" destination="85" id="87"/>
<outlet property="speedRate" destination="97" id="101"/>
<outlet property="timeDL" destination="98" id="102"/>
<outlet property="urlBorder" destination="CkP-zm-exa" id="uqX-tM-1Gq"/>
<outlet property="urlField" destination="yZ7-sQ-cbO" id="LWG-k2-ITS"/>
<outlet property="view" destination="1" id="3"/>
<outlet property="whatToDownloadHelpLabel" destination="95" id="96"/>
......@@ -31,159 +32,196 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="383"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Enter any HTTP address to download the file to your $DEVICE." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="95">
<rect key="frame" x="0.0" y="87" width="320" height="38"/>
<color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="38" id="vRA-2f-jer"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.74659199620000005" green="0.74659199620000005" blue="0.74659199620000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<textField clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" clearButtonMode="unlessEditing" translatesAutoresizingMaskIntoConstraints="NO" id="yZ7-sQ-cbO">
<rect key="frame" x="0.0" y="8" width="320" height="31"/>
<color key="backgroundColor" red="0.28627450980000002" green="0.28627450980000002" blue="0.28627450980000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="31" id="BrP-Ow-0Rv"/>
</constraints>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" keyboardAppearance="alert"/>
</textField>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EPu-Ev-iiG">
<rect key="frame" x="0.0" y="43" width="320" height="40"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="paf-BZ-9vp"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" title="Télécharger"/>
<connections>
<action selector="downloadAction:" destination="-1" eventType="touchUpInside" id="I6C-sq-fVW"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="79">
<rect key="frame" x="0.0" y="129" width="320" height="90"/>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UdO-9t-oLy">
<rect key="frame" x="0.0" y="0.0" width="320" height="383"/>
<subviews>
<label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Current Download.mpg" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="84">
<rect key="frame" x="11" y="11" width="150" height="17"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.72000002861022949" green="0.72000002861022949" blue="0.72000002861022949" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<progressView contentMode="scaleToFill" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="85">
<rect key="frame" x="11" y="73" width="298" height="2"/>
<color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="2" id="Jeu-jw-vzk"/>
</constraints>
</progressView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="86">
<rect key="frame" x="290" y="8" width="22" height="22"/>
<constraints>
<constraint firstAttribute="height" relation="lessThanOrEqual" constant="31" id="VHL-kj-SOm"/>
<constraint firstAttribute="width" relation="lessThanOrEqual" constant="29" id="zTY-if-NSJ"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" image="flatDeleteButton.png">
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="cancelDownload:" destination="-1" eventType="touchUpInside" id="90"/>
</connections>
</button>
<activityIndicatorView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" fixedFrame="YES" hidesWhenStopped="YES" style="whiteLarge" translatesAutoresizingMaskIntoConstraints="NO" id="91">
<rect key="frame" x="0.0" y="-129" width="37" height="37"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</activityIndicatorView>
<label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="0 Kb/s" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="97">
<rect key="frame" x="11" y="48" width="42" height="17"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.79277843236923218" green="0.79277843236923218" blue="0.79277843236923218" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="00:00:00" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="98">
<rect key="frame" x="248.5" y="48" width="60.5" height="17"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.79277843236923218" green="0.79277843236923218" blue="0.79277843236923218" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="0%" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="99">
<rect key="frame" x="150" y="48" width="20" height="17"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="idF-Hx-Zjl">
<rect key="frame" x="0.0" y="0.0" width="320" height="383"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="x4O-OM-rZw">
<rect key="frame" x="0.0" y="0.0" width="320" height="169"/>
<subviews>
<label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Enter any HTTP address to download the file to your $DEVICE." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="95">
<rect key="frame" x="20" y="10" width="280" height="38"/>
<color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="38" id="vRA-2f-jer"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.74659199620000005" green="0.74659199620000005" blue="0.74659199620000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<textField clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" clearButtonMode="unlessEditing" translatesAutoresizingMaskIntoConstraints="NO" id="yZ7-sQ-cbO">
<rect key="frame" x="20" y="58" width="280" height="31"/>
<color key="backgroundColor" red="0.28627450980000002" green="0.28627450980000002" blue="0.28627450980000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="31" id="BrP-Ow-0Rv"/>
</constraints>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" keyboardAppearance="alert"/>
</textField>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EPu-Ev-iiG">
<rect key="frame" x="20" y="109" width="280" height="40"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="paf-BZ-9vp"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" title="Télécharger"/>
<connections>
<action selector="downloadAction:" destination="-1" eventType="touchUpInside" id="I6C-sq-fVW"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CkP-zm-exa">
<rect key="frame" x="20" y="87" width="280" height="2"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstAttribute="height" constant="2" id="zM2-0u-L6u"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="CkP-zm-exa" secondAttribute="trailing" constant="20" id="4Og-lL-oJX"/>
<constraint firstItem="95" firstAttribute="leading" secondItem="x4O-OM-rZw" secondAttribute="leading" constant="20" id="4jR-3l-yP5"/>
<constraint firstItem="CkP-zm-exa" firstAttribute="bottom" secondItem="yZ7-sQ-cbO" secondAttribute="bottom" id="HpA-4v-hnG"/>
<constraint firstItem="EPu-Ev-iiG" firstAttribute="top" secondItem="yZ7-sQ-cbO" secondAttribute="bottom" constant="20" id="Lcr-zy-CdT"/>
<constraint firstAttribute="trailing" secondItem="EPu-Ev-iiG" secondAttribute="trailing" constant="20" id="Mk3-Is-fod"/>
<constraint firstAttribute="bottom" secondItem="EPu-Ev-iiG" secondAttribute="bottom" constant="20" id="NVS-UL-A64"/>
<constraint firstItem="EPu-Ev-iiG" firstAttribute="leading" secondItem="x4O-OM-rZw" secondAttribute="leading" constant="20" id="UzP-B3-NDE"/>
<constraint firstItem="yZ7-sQ-cbO" firstAttribute="top" secondItem="95" secondAttribute="bottom" constant="10" id="agE-fU-qTC"/>
<constraint firstAttribute="trailing" secondItem="95" secondAttribute="trailing" constant="20" id="eo6-Nf-95x"/>
<constraint firstItem="yZ7-sQ-cbO" firstAttribute="leading" secondItem="x4O-OM-rZw" secondAttribute="leading" constant="20" id="ggW-ap-bXO"/>
<constraint firstAttribute="trailing" secondItem="yZ7-sQ-cbO" secondAttribute="trailing" constant="20" id="hso-Sx-ghg"/>
<constraint firstItem="CkP-zm-exa" firstAttribute="leading" secondItem="x4O-OM-rZw" secondAttribute="leading" constant="20" id="nU0-YF-EKx"/>
<constraint firstItem="95" firstAttribute="top" secondItem="x4O-OM-rZw" secondAttribute="top" constant="10" id="pqw-nL-yTf"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="79">
<rect key="frame" x="0.0" y="169" width="320" height="80"/>
<subviews>
<label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Current Download.mpg" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="84">
<rect key="frame" x="11" y="11" width="150" height="17"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.72000002861022949" green="0.72000002861022949" blue="0.72000002861022949" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<progressView contentMode="scaleToFill" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="85">
<rect key="frame" x="11" y="65" width="298" height="2"/>
<color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</progressView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="86">
<rect key="frame" x="290" y="8" width="22" height="22"/>
<constraints>
<constraint firstAttribute="height" relation="lessThanOrEqual" constant="31" id="VHL-kj-SOm"/>
<constraint firstAttribute="width" relation="lessThanOrEqual" constant="29" id="zTY-if-NSJ"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" image="flatDeleteButton">
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="cancelDownload:" destination="-1" eventType="touchUpInside" id="90"/>
</connections>
</button>
<label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="0 Kb/s" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="97">
<rect key="frame" x="11" y="40" width="42" height="17"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.79277843236923218" green="0.79277843236923218" blue="0.79277843236923218" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="00:00:00" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="98">
<rect key="frame" x="248.5" y="40" width="60.5" height="17"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.79277843236923218" green="0.79277843236923218" blue="0.79277843236923218" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="0%" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="99">
<rect key="frame" x="150" y="40" width="20" height="17"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.79277843236923218" green="0.79277843236923218" blue="0.79277843236923218" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="85" firstAttribute="top" secondItem="98" secondAttribute="bottom" constant="8" id="5m8-CM-by5"/>
<constraint firstAttribute="trailing" secondItem="98" secondAttribute="trailing" constant="11" id="8Rd-M0-M6p"/>
<constraint firstAttribute="trailing" secondItem="85" secondAttribute="trailing" constant="11" id="Sfe-E3-mzB"/>
<constraint firstItem="85" firstAttribute="top" secondItem="97" secondAttribute="bottom" constant="8" id="TBq-8t-Hfi"/>
<constraint firstItem="86" firstAttribute="top" secondItem="79" secondAttribute="top" constant="8" id="UV9-gt-jFK"/>
<constraint firstItem="85" firstAttribute="top" secondItem="99" secondAttribute="bottom" constant="8" id="Wer-cE-ybK"/>
<constraint firstItem="85" firstAttribute="leading" secondItem="79" secondAttribute="leading" constant="11" id="iI8-x5-MJB"/>
<constraint firstItem="84" firstAttribute="top" secondItem="79" secondAttribute="top" constant="11" id="lbf-s9-EBt"/>
<constraint firstItem="99" firstAttribute="centerX" secondItem="79" secondAttribute="centerX" id="nUA-bQ-j3U"/>
<constraint firstItem="98" firstAttribute="top" secondItem="86" secondAttribute="bottom" constant="10" id="og1-US-njP"/>
<constraint firstItem="97" firstAttribute="leading" secondItem="79" secondAttribute="leading" constant="11" id="rbg-Ij-juR"/>
<constraint firstAttribute="height" constant="80" id="sKf-x5-Ugs"/>
<constraint firstAttribute="trailing" secondItem="86" secondAttribute="trailing" constant="8" id="vvG-NR-Wrz"/>
<constraint firstItem="84" firstAttribute="leading" secondItem="79" secondAttribute="leading" constant="11" id="x9h-M2-h3C"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" scrollEnabled="NO" showsVerticalScrollIndicator="NO" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="69">
<rect key="frame" x="0.0" y="249" width="320" height="134"/>
<color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="separatorColor" red="0.0" green="0.0" blue="0.0" alpha="0.60999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
<color key="sectionIndexBackgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="sectionIndexTrackingBackgroundColor" red="0.30689102410000002" green="0.30688184499999999" blue="0.3068870306" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<outlet property="dataSource" destination="-1" id="93"/>
<outlet property="delegate" destination="-1" id="94"/>
</connections>
</tableView>
</subviews>
<constraints>
<constraint firstAttribute="height" constant="17" id="0Fp-ES-zmf"/>
<constraint firstItem="x4O-OM-rZw" firstAttribute="width" secondItem="idF-Hx-Zjl" secondAttribute="width" id="5mK-bb-xn5"/>
<constraint firstAttribute="bottom" secondItem="69" secondAttribute="bottom" id="63L-0L-DiY"/>
<constraint firstItem="x4O-OM-rZw" firstAttribute="top" secondItem="idF-Hx-Zjl" secondAttribute="top" id="7lT-P0-ozP"/>
<constraint firstItem="69" firstAttribute="leading" secondItem="idF-Hx-Zjl" secondAttribute="leading" id="96M-Ad-GIc"/>
<constraint firstItem="69" firstAttribute="top" secondItem="79" secondAttribute="bottom" id="H8E-Md-CXa"/>
<constraint firstItem="79" firstAttribute="leading" secondItem="idF-Hx-Zjl" secondAttribute="leading" id="JMd-Hn-0SD"/>
<constraint firstAttribute="trailing" secondItem="x4O-OM-rZw" secondAttribute="trailing" id="kJT-Bu-Iac"/>
<constraint firstItem="79" firstAttribute="top" secondItem="x4O-OM-rZw" secondAttribute="bottom" id="kib-W2-wmW"/>
<constraint firstAttribute="trailing" secondItem="69" secondAttribute="trailing" id="lj8-1M-enR"/>
<constraint firstItem="x4O-OM-rZw" firstAttribute="leading" secondItem="idF-Hx-Zjl" secondAttribute="leading" id="seB-Wn-JJl"/>
<constraint firstAttribute="trailing" secondItem="79" secondAttribute="trailing" id="xrj-Po-ls0"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.79277843236923218" green="0.79277843236923218" blue="0.79277843236923218" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</view>
</subviews>
<color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="85" secondAttribute="bottom" constant="15" id="1Ms-oP-nb3"/>
<constraint firstItem="85" firstAttribute="top" secondItem="98" secondAttribute="bottom" constant="8" id="5m8-CM-by5"/>
<constraint firstItem="99" firstAttribute="centerY" secondItem="79" secondAttribute="centerY" id="7wY-Lf-WPo"/>
<constraint firstAttribute="trailing" secondItem="98" secondAttribute="trailing" constant="11" id="8Rd-M0-M6p"/>
<constraint firstAttribute="height" constant="90" id="Idg-1Y-u4p"/>
<constraint firstAttribute="trailing" secondItem="85" secondAttribute="trailing" constant="11" id="Sfe-E3-mzB"/>
<constraint firstItem="85" firstAttribute="top" secondItem="97" secondAttribute="bottom" constant="8" id="TBq-8t-Hfi"/>
<constraint firstItem="86" firstAttribute="top" secondItem="79" secondAttribute="top" constant="8" id="UV9-gt-jFK"/>
<constraint firstItem="85" firstAttribute="top" secondItem="99" secondAttribute="bottom" constant="8" id="Wer-cE-ybK"/>
<constraint firstItem="85" firstAttribute="leading" secondItem="79" secondAttribute="leading" constant="11" id="iI8-x5-MJB"/>
<constraint firstItem="84" firstAttribute="top" secondItem="79" secondAttribute="top" constant="11" id="lbf-s9-EBt"/>
<constraint firstItem="99" firstAttribute="centerX" secondItem="79" secondAttribute="centerX" id="nUA-bQ-j3U"/>
<constraint firstItem="97" firstAttribute="leading" secondItem="79" secondAttribute="leading" constant="11" id="rbg-Ij-juR"/>
<constraint firstAttribute="trailing" secondItem="86" secondAttribute="trailing" constant="8" id="vvG-NR-Wrz"/>
<constraint firstItem="84" firstAttribute="leading" secondItem="79" secondAttribute="leading" constant="11" id="x9h-M2-h3C"/>
<constraint firstItem="idF-Hx-Zjl" firstAttribute="top" secondItem="UdO-9t-oLy" secondAttribute="top" id="EzH-sf-pAh"/>
<constraint firstAttribute="trailing" secondItem="idF-Hx-Zjl" secondAttribute="trailing" id="JzS-D9-z5p"/>
<constraint firstItem="idF-Hx-Zjl" firstAttribute="leading" secondItem="UdO-9t-oLy" secondAttribute="leading" id="Pd8-Eg-1Fo"/>
<constraint firstItem="idF-Hx-Zjl" firstAttribute="bottom" secondItem="UdO-9t-oLy" secondAttribute="bottom" id="Qkf-vd-BUp"/>
<constraint firstItem="idF-Hx-Zjl" firstAttribute="height" secondItem="UdO-9t-oLy" secondAttribute="height" priority="250" id="dIu-rZ-feB"/>
<constraint firstItem="idF-Hx-Zjl" firstAttribute="width" secondItem="UdO-9t-oLy" secondAttribute="width" id="lod-3g-Hqh"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsVerticalScrollIndicator="NO" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="69">
<rect key="frame" x="0.0" y="223" width="320" height="160"/>
<color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="separatorColor" red="0.0" green="0.0" blue="0.0" alpha="0.60999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
<color key="sectionIndexBackgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="sectionIndexTrackingBackgroundColor" red="0.30689102410000002" green="0.30688184499999999" blue="0.3068870306" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<outlet property="dataSource" destination="-1" id="93"/>
<outlet property="delegate" destination="-1" id="94"/>
</connections>
</tableView>
<viewLayoutGuide key="contentLayoutGuide" id="GVu-9h-Ual"/>
<viewLayoutGuide key="frameLayoutGuide" id="mJP-FU-rlc"/>
</scrollView>
</subviews>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="yZ7-sQ-cbO" secondAttribute="trailing" id="6xO-qL-QAy"/>
<constraint firstItem="yZ7-sQ-cbO" firstAttribute="leading" secondItem="1" secondAttribute="leading" id="Dnj-BX-p5y"/>
<constraint firstItem="79" firstAttribute="leading" secondItem="1" secondAttribute="leading" id="JGX-bO-IIX"/>
<constraint firstItem="95" firstAttribute="top" secondItem="EPu-Ev-iiG" secondAttribute="bottom" constant="4" id="NjI-xZ-uzl"/>
<constraint firstAttribute="trailing" secondItem="EPu-Ev-iiG" secondAttribute="trailing" id="Puk-HT-ijh"/>
<constraint firstItem="EPu-Ev-iiG" firstAttribute="leading" secondItem="1" secondAttribute="leading" id="Q2z-VX-R0v"/>
<constraint firstItem="yZ7-sQ-cbO" firstAttribute="top" secondItem="1" secondAttribute="top" constant="8" id="UxY-8X-Sdz"/>
<constraint firstAttribute="bottom" secondItem="69" secondAttribute="bottom" id="X98-1t-ymz"/>
<constraint firstAttribute="trailing" secondItem="69" secondAttribute="trailing" id="Zir-kN-H73"/>
<constraint firstItem="95" firstAttribute="leading" secondItem="1" secondAttribute="leading" id="gRe-1y-HAi"/>
<constraint firstItem="EPu-Ev-iiG" firstAttribute="top" secondItem="yZ7-sQ-cbO" secondAttribute="bottom" constant="4" id="nZf-TX-blD"/>
<constraint firstAttribute="trailing" secondItem="95" secondAttribute="trailing" id="q1a-Ic-6gE"/>
<constraint firstAttribute="trailing" secondItem="79" secondAttribute="trailing" id="wgI-kp-5Ll"/>
<constraint firstItem="69" firstAttribute="top" secondItem="79" secondAttribute="bottom" constant="4" id="yW6-Of-qGx"/>
<constraint firstItem="69" firstAttribute="leading" secondItem="1" secondAttribute="leading" id="ygD-J8-Mio"/>
<constraint firstItem="79" firstAttribute="top" secondItem="95" secondAttribute="bottom" constant="4" id="zq6-k5-61K"/>
<constraint firstItem="7OQ-CM-xOg" firstAttribute="bottom" secondItem="UdO-9t-oLy" secondAttribute="bottom" id="D0G-tH-995"/>
<constraint firstItem="UdO-9t-oLy" firstAttribute="leading" secondItem="7OQ-CM-xOg" secondAttribute="leading" id="EJo-oW-EdF"/>
<constraint firstItem="UdO-9t-oLy" firstAttribute="trailing" secondItem="7OQ-CM-xOg" secondAttribute="trailing" id="Plc-kF-i42"/>
<constraint firstItem="UdO-9t-oLy" firstAttribute="top" secondItem="7OQ-CM-xOg" secondAttribute="top" id="pT4-Kn-eCm"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="362" y="298.5"/>
<viewLayoutGuide key="safeArea" id="7OQ-CM-xOg"/>
<point key="canvasLocation" x="523.20000000000005" y="199.25037481259372"/>
</view>
</objects>
<resources>
<image name="flatDeleteButton.png" width="22" height="22"/>
<image name="flatDeleteButton" width="22" height="22"/>
</resources>
</document>
......@@ -9,7 +9,7 @@
* Refer to the COPYING file of the official project for license.
*****************************************************************************/
class AlbumModel: MLBaseModel {
class AlbumModel: AudioCollectionModel {
typealias MLType = VLCMLAlbum
var sortModel = SortModel([.alpha, .duration, .releaseDate, .trackNumber])
......@@ -33,10 +33,6 @@ class AlbumModel: MLBaseModel {
func append(_ item: VLCMLAlbum) {
files.append(item)
}
func delete(_ items: [VLCMLObject]) {
preconditionFailure("AlbumModel: Albums can not be deleted, they disappear when their last title got deleted")
}
}
// MARK: - Sort
......@@ -104,7 +100,7 @@ extension VLCMLAlbum: MediaCollectionModel {
return tracks
}
func title() -> String? {
func title() -> String {
return title
}
}
......
......@@ -9,7 +9,7 @@
* Refer to the COPYING file of the official project for license.
*****************************************************************************/
class ArtistModel: MLBaseModel {
class ArtistModel: AudioCollectionModel {
typealias MLType = VLCMLArtist
var sortModel = SortModel([.alpha])
......@@ -33,10 +33,6 @@ class ArtistModel: MLBaseModel {
func append(_ item: VLCMLArtist) {
files.append(item)
}
func delete(_ items: [VLCMLObject]) {
preconditionFailure("ArtistModel: Artists can not be deleted, they disappear when their last title got deleted")
}
}
// MARK: - Sort
......@@ -90,7 +86,7 @@ extension VLCMLArtist: MediaCollectionModel {
return tracks()
}
func title() -> String? {
func title() -> String {
return name
}
}
......
/*****************************************************************************
* AudioCollectionModel.swift
*
* Copyright © 2019 VLC authors and VideoLAN
*
* Authors: Edgar Fouillet <vlc # edgar.fouillet.eu>
*
* Refer to the COPYING file of the official project for license.
*****************************************************************************/
import Foundation
protocol AudioCollectionModel: MLBaseModel { }
extension AudioCollectionModel {
func delete(_ items: [VLCMLObject]) {
do {
for case let item as MediaCollectionModel in items {
if let tracks = item.files() {
for track in tracks {
if let mainFile = track.mainFile() {
try FileManager.default.removeItem(atPath: mainFile.mrl.path)
}
}
let folderPaths = Set(tracks.map {
$0.mainFile()?.mrl.deletingLastPathComponent()
})
for path in folderPaths {
if let path = path {
try FileManager.default.deleteMediaFolder(name: item.title(), at: path)
}
}
}
}
medialibrary.reload()
}
catch let error as NSError {
assertionFailure("AudioCollectionModel: Delete failed: \(error.localizedDescription)")
}
}
}
......@@ -9,7 +9,7 @@
* Refer to the COPYING file of the official project for license.
*****************************************************************************/
class GenreModel: MLBaseModel {
class GenreModel: AudioCollectionModel {
typealias MLType = VLCMLGenre
var sortModel = SortModel([.alpha])
......@@ -33,10 +33,6 @@ class GenreModel: MLBaseModel {
func append(_ item: VLCMLGenre) {
files.append(item)
}
func delete(_ items: [VLCMLObject]) {
preconditionFailure("GenreModel: Genres can not be deleted, they disappear when their last title got deleted")
}
}
// MARK: - MediaLibraryObserver
......@@ -121,7 +117,7 @@ extension VLCMLGenre: MediaCollectionModel {
return tracks()
}
func title() -> String? {
func title() -> String {
return name
}
}
......@@ -75,7 +75,7 @@ protocol SearchableMLModel {
protocol MediaCollectionModel {
func files() -> [VLCMLMedia]?
func sortModel() -> SortModel?
func title() -> String?
func title() -> String
}
// MARK: - Helper methods
......
......@@ -143,7 +143,7 @@ extension VLCMLPlaylist: MediaCollectionModel {
return media
}
func title() -> String? {
func title() -> String {
return name
}
}
......@@ -80,11 +80,10 @@ class EditToolbar: UIView {
}
private func setupStackView() {
let stackView = UIStackView(arrangedSubviews: [addToPlaylistButton])
let stackView = UIStackView(arrangedSubviews: [addToPlaylistButton, deleteButton])
let file = category.anyfiles.first
if !(file is VLCMLArtist) && !(file is VLCMLGenre) && !(file is VLCMLAlbum) {
stackView.addArrangedSubview(deleteButton)
stackView.addArrangedSubview(renameButton)
}
......
/*****************************************************************************
* FileManager+DeleteMediaFolder.swift
* VLC for iOS
*****************************************************************************
* Copyright (c) 2019 VideoLAN. All rights reserved.
*
* Authors: Edgar Fouillet <vlc # edgar.fouillet.eu>
*
* Refer to the COPYING file of the official project for license.
*****************************************************************************/
import Foundation
extension FileManager {
func deleteMediaFolder(name: String, at path: URL) throws {
let documentPath = FileManager.default.urls(for: .documentDirectory,
in: .userDomainMask).first?.resolvingSymlinksInPath()
if path.resolvingSymlinksInPath() != documentPath {
if let dirContent = try? FileManager.default.contentsOfDirectory(at: path,
includingPropertiesForKeys: []) {
if dirContent.isEmpty || canDeleteFolder(content: dirContent, name: name) {
do {
let parentPath = path.deletingLastPathComponent()
try FileManager.default.removeItem(at: path)
if canDeleteParent(at: path, name: name) {
try FileManager.default.removeItem(at: parentPath)
}
}
catch let error as NSError {
throw error
}
}
}
}
}
}
// MARK: - Private helpers
private extension FileManager {
func canDeleteFolder(content: [URL], name: String) -> Bool {
var coverNames: Set = [
"album",
"albumart",
"albumartsmall",
"back",
"cover",
".folder",
"folder",
"front",
"thumb"
]
let coverExtensions: Set = [
"jpg",
"jpeg",
"png",
"gif",
"bmp"
]
if !name.isEmpty {
coverNames.insert(name.lowercased())
}
for file in content {
if !coverNames.contains(file.deletingPathExtension().lastPathComponent.lowercased())
|| !coverExtensions.contains(file.pathExtension.lowercased()) {
return false
}
}
return true
}
func canDeleteParent(at path: URL, name: String) -> Bool {
let parentPath = path.deletingLastPathComponent()
if parentPath.lastPathComponent == name {
if let parentDirContent = try? FileManager.default.contentsOfDirectory(at: parentPath, includingPropertiesForKeys: []) {
if parentDirContent.isEmpty {
return true
}
}
}
return false
}
}
......@@ -18,8 +18,11 @@
+ (instancetype)sharedInstance;
@property (weak, nonatomic) IBOutlet UIView *contentView;
@property (weak, nonatomic) IBOutlet UIView *downloadFieldContainer;
@property (nonatomic, strong) IBOutlet UIButton *downloadButton;
@property (nonatomic, strong) IBOutlet UITextField *urlField;
@property (weak, nonatomic) IBOutlet UIView *urlBorder;
@property (nonatomic, strong) IBOutlet UILabel *whatToDownloadHelpLabel;
@property (nonatomic, strong) IBOutlet UITableView *downloadsTable;
......@@ -27,7 +30,6 @@
@property (nonatomic, strong) IBOutlet UIProgressView *progressView;
@property (nonatomic, strong) IBOutlet UIButton *cancelButton;
@property (nonatomic, strong) IBOutlet UILabel *currentDownloadLabel;
@property (nonatomic, strong) IBOutlet UIActivityIndicatorView *activityIndicator;
@property (nonatomic, strong) IBOutlet UILabel *progressPercent;
@property (nonatomic, strong) IBOutlet UILabel *speedRate;
@property (nonatomic, strong) IBOutlet UILabel *timeDL;
......
......@@ -35,6 +35,8 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) {
NSTimeInterval _startDL;
NSString *_currentDownloadIdentifier;
NSLayoutConstraint *_contentViewHeight;
VLCHTTPFileDownloader *_httpDownloader;
WRRequestDownload *_FTPDownloadRequest;
......@@ -77,13 +79,19 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) {
[self.downloadButton setTitle:NSLocalizedString(@"BUTTON_DOWNLOAD", nil) forState:UIControlStateNormal];
[self.downloadButton setAccessibilityIdentifier:@"Download"];
self.downloadButton.layer.cornerRadius = 4.0;
self.whatToDownloadHelpLabel.text = [NSString stringWithFormat:NSLocalizedString(@"DOWNLOAD_FROM_HTTP_HELP", nil), [[UIDevice currentDevice] model]];
self.urlField.delegate = self;
self.urlField.keyboardType = UIKeyboardTypeURL;
self.progressContainer.hidden = YES;
self.downloadsTable.hidden = YES;
self.downloadsTable.separatorStyle = UITableViewCellSeparatorStyleNone;
self.whatToDownloadHelpLabel.backgroundColor = [UIColor clearColor];
_contentViewHeight = [_contentView.heightAnchor constraintEqualToConstant:0];
_contentViewHeight.active = YES;
[self updateContentViewHeightConstraint];
self.edgesForExtendedLayout = UIRectEdgeNone;
[self updateForTheme];
}
......@@ -105,17 +113,19 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) {
{
NSAttributedString *coloredAttributedPlaceholder = [[NSAttributedString alloc] initWithString:@"http://myserver.com/file.mkv" attributes:@{NSForegroundColorAttributeName: PresentationTheme.current.colors.lightTextColor}];
self.urlField.attributedPlaceholder = coloredAttributedPlaceholder;
self.urlField.backgroundColor = PresentationTheme.current.colors.cellBackgroundB;
self.urlField.backgroundColor = PresentationTheme.current.colors.background;
self.urlField.textColor = PresentationTheme.current.colors.cellTextColor;
self.urlBorder.backgroundColor = PresentationTheme.current.colors.mediaCategorySeparatorColor;
self.downloadsTable.backgroundColor = PresentationTheme.current.colors.background;
self.view.backgroundColor = PresentationTheme.current.colors.background;
self.downloadButton.backgroundColor = PresentationTheme.current.colors.orangeUI;
self.whatToDownloadHelpLabel.textColor = PresentationTheme.current.colors.lightTextColor;
self.progressContainer.backgroundColor = PresentationTheme.current.colors.cellBackgroundB;
self.progressContainer.backgroundColor = PresentationTheme.current.colors.background;
self.currentDownloadLabel.textColor = PresentationTheme.current.colors.cellTextColor;
self.progressPercent.textColor = PresentationTheme.current.colors.cellDetailTextColor;
self.speedRate.textColor = PresentationTheme.current.colors.cellDetailTextColor;
self.timeDL.textColor = PresentationTheme.current.colors.cellDetailTextColor;
self.progressView.progressTintColor = PresentationTheme.current.colors.orangeUI;
[self.downloadsTable reloadData];
[self setNeedsStatusBarAppearanceUpdate];
}
......@@ -162,6 +172,7 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) {
[_currentDownloadFilename addObject:@""];
self.urlField.text = @"";
[self.downloadsTable reloadData];
[self updateContentViewHeightConstraint];
[self _triggerNextDownload];
}
......@@ -171,6 +182,14 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) {
{
_currentDownloadType != VLCDownloadSchemeNone ? [self downloadStartedWithIdentifier:_currentDownloadIdentifier] : [self downloadEndedWithIdentifier:_currentDownloadIdentifier];
[self.downloadsTable reloadData];
[self updateContentViewHeightConstraint];
}
- (void)updateContentViewHeightConstraint
{
_contentViewHeight.constant = _downloadFieldContainer.frame.size.height
+ _progressContainer.frame.size.height
+ _downloadsTable.contentSize.height;
}
- (VLCHTTPFileDownloader *)httpDownloader
......@@ -200,6 +219,7 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) {
[_currentDownloadFilename removeObjectAtIndex:0];
[self _beginBackgroundDownload];
[self _updateUI];
_startDL = [NSDate timeIntervalSinceReferenceDate];
}
- (void)_downloadSchemeHttp
......@@ -257,7 +277,6 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) {
return;
}
[self.activityIndicator startAnimating];
NSString *downloadScheme = [_currentDownloads.firstObject scheme];
if ([downloadScheme isEqualToString:@"http"] || [downloadScheme isEqualToString:@"https"]) {
......@@ -290,7 +309,6 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) {
- (void)downloadStartedWithIdentifier:(NSString *)identifier
{
_currentDownloadIdentifier = identifier;
[self.activityIndicator stopAnimating];
VLCActivityManager *activityManager = [VLCActivityManager defaultManager];
[activityManager networkActivityStopped];
......@@ -301,7 +319,6 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) {
[self.progressPercent setText:@"0%"];
[self.speedRate setText:@"0 Kb/s"];
[self.timeDL setText:@"00:00:00"];
_startDL = [NSDate timeIntervalSinceReferenceDate];
self.progressContainer.hidden = NO;
APLog(@"download started");
......@@ -331,9 +348,8 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) {
[self.progressPercent setText:[NSString stringWithFormat:@"%.1f%%", percentage*100]];
[self.timeDL setText:[self calculateRemainingTime:receivedDataSize expectedDownloadSize:expectedDownloadSize]];
[self.speedRate setText:[self calculateSpeedString:receivedDataSize]];
_lastStatsUpdate = [NSDate timeIntervalSinceReferenceDate];
_lastStatsUpdate = [NSDate timeIntervalSinceReferenceDate];
}
[self.progressView setProgress:percentage animated:YES];
}
......@@ -355,8 +371,10 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) {
- (NSString*)calculateSpeedString:(CGFloat)receivedDataSize
{
CGFloat speed = receivedDataSize / ([NSDate timeIntervalSinceReferenceDate] - _startDL);
NSString *string = [NSByteCountFormatter stringFromByteCount:speed countStyle:NSByteCountFormatterCountStyleDecimal];
CGFloat timeInterval = [NSDate timeIntervalSinceReferenceDate] - _lastStatsUpdate;
CGFloat speed = receivedDataSize / timeInterval;
NSString *string = [NSByteCountFormatter stringFromByteCount:speed
countStyle:NSByteCountFormatterCountStyleDecimal];
string = [string stringByAppendingString:@"/s"];
return string;
}
......@@ -435,11 +453,16 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) {
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 60;
}
#pragma mark - table view delegate
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
cell.backgroundColor = (indexPath.row % 2 == 0)? PresentationTheme.current.colors.cellBackgroundA : PresentationTheme.current.colors.cellBackgroundB;
cell.backgroundColor = PresentationTheme.current.colors.cellBackgroundA;
}
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
......@@ -453,6 +476,7 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) {
[_currentDownloads removeObjectAtIndex:indexPath.row];
[_currentDownloadFilename removeObjectAtIndex:indexPath.row];
[tableView reloadData];
[self updateContentViewHeightConstraint];
}
}
......@@ -464,6 +488,7 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) {
fileName = @"";
[_currentDownloadFilename addObject:fileName];
[self.downloadsTable reloadData];
[self updateContentViewHeightConstraint];
if (_currentDownloadType == VLCDownloadSchemeNone)
[self _triggerNextDownload];
}
......
......@@ -1099,7 +1099,10 @@ NSString *const VLCPlaybackServicePlaybackPositionUpdated = @"VLCPlaybackService
CGFloat lastPosition = media.progress;
// .95 prevents the controller from opening and closing immediatly when restoring state
if (lastPosition < .95 && _mediaPlayer.position < lastPosition) {
// Additionaly, check if the media is more than 10 sec
if (lastPosition < .95
&& media.duration > 10000
&& _mediaPlayer.position < lastPosition) {
NSInteger continuePlayback;
if (media.type == VLCMLMediaTypeAudio)
continuePlayback = [[[NSUserDefaults standardUserDefaults] objectForKey:kVLCSettingContinueAudioPlayback] integerValue];
......
......@@ -86,6 +86,8 @@
41FCD2F820B565B600660AAB /* VLCAlertViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41FCD2F720B565B500660AAB /* VLCAlertViewController.swift */; };
6B4E33D11BF2A39400A35255 /* playerControl.css in Resources */ = {isa = PBXBuildFile; fileRef = 6B4E33CF1BF2A39400A35255 /* playerControl.css */; };
6B4E33D21BF2A39400A35255 /* playerControl.js in Resources */ = {isa = PBXBuildFile; fileRef = 6B4E33D01BF2A39400A35255 /* playerControl.js */; };
6D8E642A234CBF2200EBC8FC /* AudioCollectionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D8E6429234CBF2200EBC8FC /* AudioCollectionModel.swift */; };
6D220D0D234B8E3700BD694F /* FileManager+DeleteMediaFolder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D220D0C234B8E3700BD694F /* FileManager+DeleteMediaFolder.swift */; };
7AC8629D1765DC560011611A /* style.css in Resources */ = {isa = PBXBuildFile; fileRef = 7AC8629B1765DC560011611A /* style.css */; };
7AC862A61765E9510011611A /* jquery-1.10.1.min.js in Resources */ = {isa = PBXBuildFile; fileRef = 7AC8629E1765E90C0011611A /* jquery-1.10.1.min.js */; };
7AC862A71765E9510011611A /* jquery.fileupload.js in Resources */ = {isa = PBXBuildFile; fileRef = 7AC8629F1765E90C0011611A /* jquery.fileupload.js */; };
......@@ -565,6 +567,8 @@
65EC8984D840047F50AA00A1 /* libPods-VLC-iOSUITests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-VLC-iOSUITests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
6B4E33CF1BF2A39400A35255 /* playerControl.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; name = playerControl.css; path = Resources/web/playerControl.css; sourceTree = SOURCE_ROOT; };
6B4E33D01BF2A39400A35255 /* playerControl.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = playerControl.js; path = Resources/web/playerControl.js; sourceTree = SOURCE_ROOT; };
6D8E6429234CBF2200EBC8FC /* AudioCollectionModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioCollectionModel.swift; sourceTree = "<group>"; };
6D220D0C234B8E3700BD694F /* FileManager+DeleteMediaFolder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "FileManager+DeleteMediaFolder.swift"; path = "Sources/FileManager+DeleteMediaFolder.swift"; sourceTree = "<group>"; };
703A80CCC005093CCDFBECBF /* Pods-VLC-iOS-Screenshots.distribution.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VLC-iOS-Screenshots.distribution.xcconfig"; path = "Pods/Target Support Files/Pods-VLC-iOS-Screenshots/Pods-VLC-iOS-Screenshots.distribution.xcconfig"; sourceTree = "<group>"; };
7AC8629B1765DC560011611A /* style.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = style.css; sourceTree = "<group>"; };
7AC8629E1765E90C0011611A /* jquery-1.10.1.min.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = "jquery-1.10.1.min.js"; sourceTree = "<group>"; };
......@@ -1947,6 +1951,7 @@
8DE1887221089AF200A091D2 /* MediaLibraryModel */ = {
isa = PBXGroup;
children = (
6D8E6429234CBF2200EBC8FC /* AudioCollectionModel.swift */,
8DE1887321089B3A00A091D2 /* MediaLibraryBaseModel.swift */,
8DE1887521089BB100A091D2 /* VideoModel.swift */,
8DE1888B210B459000A091D2 /* ShowEpisodeModel.swift */,
......@@ -2015,6 +2020,7 @@
A7C3025A175A538700AD4388 /* Extensions */ = {
isa = PBXGroup;
children = (
6D220D0C234B8E3700BD694F /* FileManager+DeleteMediaFolder.swift */,
418B144F20179CB9000447AA /* LayoutAnchorContainer.swift */,
7D3784C4183A9972009EE944 /* NSString+SupportedMedia.h */,
7D3784C5183A9972009EE944 /* NSString+SupportedMedia.m */,
......@@ -2974,6 +2980,7 @@
8D144D6322298E8E00984C46 /* AudioMiniPlayer.swift in Sources */,
8D4F9B472141630000E478BE /* MediaModel.swift in Sources */,
8DF966EF211C643D00D0FCD6 /* PlaylistModel.swift in Sources */,
6D8E642A234CBF2200EBC8FC /* AudioCollectionModel.swift in Sources */,
9BADAF45185FBD9D00108BD8 /* VLCFrostedGlasView.m in Sources */,
41EC28E32136D905004BCF0F /* BaseCollectionViewCell.swift in Sources */,
412086362231FE43006A6630 /* UIViewController+VLCAlert.m in Sources */,
......@@ -3112,6 +3119,7 @@
417D7F601F7BA26200DDF36A /* VLCRemoteControlService.m in Sources */,
DD510B701B14E564003BA71C /* VLCPlayerDisplayController.m in Sources */,
DD3EFF431BDEBCE500B68579 /* VLCSharedLibraryParser.m in Sources */,
6D220D0D234B8E3700BD694F /* FileManager+DeleteMediaFolder.swift in Sources */,
9B088308183D7BEC004B5C2A /* VLCCloudStorageTableViewController.m in Sources */,
7D30F3EC183AB34200FFC021 /* VLCGoogleDriveTableViewController.m in Sources */,
);
......