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
  • chouquette/vlc
  • bakiewicz.marek122/vlc
  • devnexen/vlc
  • rohanrajpal/vlc
  • blurrrb/vlc
  • gsoc/gsoc2019/darkapex/vlc
  • b1ue/vlc
  • fkuehne/vlc
  • magsoft/vlc
  • chub/vlc
  • cramiro9/vlc
  • robUx4/vlc
  • rom1v/vlc
  • akshayaky/vlc
  • tmk907/vlc
  • akymaster/vlc
  • govind.sharma/vlc
  • psilokos/vlc
  • xjbeta/vlc
  • jahan/vlc
  • 1480c1/vlc
  • amanchande/vlc
  • aaqib/vlc
  • rist/vlc
  • apol/vlc
  • mindfreeze/vlc
  • alexandre-janniaux/vlc
  • sandsmark/vlc
  • jagannatharjun/vlc
  • gsoc/gsoc2020/matiaslgonzalez/vlc
  • gsoc/gsoc2020/jagannatharjun/vlc
  • mstorsjo/vlc
  • gsoc/gsoc2020/vedenta/vlc
  • gsoc/gsoc2020/arnav-ishaan/vlc
  • gsoc/gsoc2020/andreduong/vlc
  • fuzun/vlc
  • gsoc/gsoc2020/vatsin/vlc
  • gsoc/gsoc2020/sagid/vlc
  • yaron/vlc
  • Phoenix/vlc
  • Garf/vlc
  • ePiratWorkarounds/vlc
  • tguillem/vlc
  • jnqnfe/vlc
  • mdc/vlc
  • Vedaa/vlc
  • rasa/vlc
  • quink/vlc
  • yealo/vlc
  • aleksey_ak/vlc
  • ePirat/vlc
  • ilya.yanok/vlc
  • asenat/vlc
  • m/vlc
  • bunjee/vlc
  • BLumia/vlc
  • sagudev/vlc
  • hamedmonji30/vlc
  • nullgemm/vlc
  • DivyamAhuja/vlc
  • thesamesam/vlc
  • dag7/vlc
  • snehil101/vlc
  • haasn/vlc
  • jbk/vlc
  • ValZapod/vlc
  • mfkl/vlc
  • WangChuan/vlc
  • core1024/vlc
  • GhostVaibhav/vlc
  • dfuhrmann/vlc
  • davide.prade/vlc
  • tmatth/vlc
  • Courmisch/vlc
  • zouya/vlc
  • hpi/vlc
  • EwoutH/vlc
  • aleung27/vlc
  • hengwu0/vlc
  • saladin/vlc
  • ashuio/vlc
  • richselwood/vlc
  • verma16Ayush/vlc
  • chemicalflash/vlc
  • PoignardAzur/vlc
  • huangjieNT/vlc
  • Blake-Haydon/vlc
  • AnuthaDev/vlc
  • gsoc/gsoc2021/mpd/vlc
  • nicolas_lequec/vlc
  • sambassaly/vlc
  • thresh/vlc
  • bonniegong/vlc
  • myaashish/vlc
  • stavros.vagionitis/vlc
  • ileoo/vlc
  • louis-santucci/vlc
  • cchristiansen/vlc
  • sabyasachi07/vlc
  • AbduAmeen/vlc
  • ashishb0410/vlc
  • urbanhusky/vlc
  • davidepietrasanta/vlc
  • riksleutelstad/vlc
  • jeremyVignelles/vlc
  • komh/vlc
  • iamjithinjohn/vlc
  • JohannesKauffmann/vlc2
  • kunglao/vlc
  • natzberg/vlc
  • jill/vlc
  • cwendling/vlc
  • adufou/vlc
  • ErwanAirone/vlc
  • HasinduDilshan10/vlc
  • vagrantc/vlc
  • rafiv/macos-bigsur-icon
  • Aymeriic/vlc
  • saranshg20/vlc
  • metzlove24/vlc
  • linkfanel/vlc
  • Ds886/vlc
  • metehan-arslan/vlc
  • Skantes/vlc
  • kgsandundananjaya96/vlc
  • mitchcapper/vlc
  • advaitgupta/vlc
  • StefanBruens/vlc
  • ratajs/vlc
  • T.M.F.B.3761/vlc
  • m222059/vlc
  • casemerrick/vlc
  • joshuaword2alt/vlc
  • sjwaddy/vlc
  • dima/vlc
  • Ybalrid/vlc
  • umxprime/vlc
  • eschmidt/vlc
  • vannieuwenhuysenmichelle/vlc
  • badcf00d/vlc
  • wesinator/vlc
  • louis/vlc
  • xqq/vlc
  • EmperorYP7/vlc
  • NicoLiam/vlc
  • loveleen/vlc
  • rofferom/vlc
  • rbultje/vlc
  • TheUnamed/vlc
  • pratiksharma341/vlc
  • Saurab17/vlc
  • purist.coder/vlc
  • Shuicheng/vlc
  • mdrrubel292/vlc
  • silverbleu00/vlc
  • metif12/vlc
  • asher-m/vlc
  • jeffk/vlc
  • Brandonbr1/vlc
  • beautyyuyanli/vlc
  • rego21/vlc
  • muyangren907/vlc
  • collectionbylawrencejason/vlc
  • evelez/vlc
  • GSMgeeth/vlc
  • Oneric/vlc
  • TJ5/vlc
  • XuanTung95/vlc
  • darrenjenny21/vlc
  • Trenly/vlc
  • RockyTDR/vlc
  • mjakubowski/vlc
  • caprica/vlc
  • ForteFrankie/vlc
  • seannamiller19/vlc
  • junlon2006/vlc
  • kiwiren6666/vlc
  • iuseiphonexs/vlc
  • fenngtun/vlc
  • Rajdutt999/vlc
  • typx/vlc
  • leon.vitanos/vlc
  • robertogarci0938/vlc
  • gsoc/gsoc2022/luc65r/vlc-mpd
  • skeller/vlc
  • MCJack123/vlc
  • luc65r/vlc-mpd
  • popov895/vlc
  • claucambra/vlc
  • brad/vlc
  • matthewmurua88/vlc
  • Tomas8874/vlc
  • philenotfound/vlc
  • makita-do3/vlc
  • LZXCorp/vlc
  • mar0x/vlc
  • senojetkennedy0102/vlc
  • shaneb243/vlc
  • ahmadbader/vlc
  • rajduttcse26/vlc-audio-filters
  • Juniorzito8415/vlc
  • achernyakov/vlc
  • lucasjetgroup/vlc
  • pupdoggy666/vlc
  • gmde9363/vlc
  • alexnwayne/vlc
  • bahareebrahimi781/vlc
  • hamad633666/vlc
  • umghof3112/vlc
  • joe0199771874/vlc
  • Octocats66666666/vlc
  • jjm_223/vlc
  • btech10110.19/vlc
  • sunnykfc028/vlc-audio-filters
  • loic/vlc
  • nguyenminhducmx1/vlc
  • JanekKrueger/vlc
  • bstubbington2/vlc
  • rcombs/vlc
  • Ordissimo/vlc
  • king7532/vlc
  • noobsauce101/vlc
  • schong0525/vlc
  • myQwil/vlc
  • apisbg91/vlc
  • geeboy0101017/vlc
  • kim.faughey/vlc
  • nurupo/vlc
  • yyusea/vlc
  • 0711235879.khco/vlc
  • ialo/vlc
  • iloveyeye2/vlc
  • gdtdftdqtd/vlc
  • leandroconsiglio/vlc
  • AndyHTML2012/vlc
  • ncz/vlc
  • lucenticus/vlc
  • knr1931/vlc
  • kjoonlee/vlc
  • chandrakant100/vlc-qt
  • johge42/vlc
  • polter/vlc
  • hexchain/vlc
  • Tushwrld/vlc
  • mztea928/vlc
  • jbelloncastro/vlc
  • alvinhochun/vlc
  • ghostpiratecrow/vlc
  • ujjwaltwitx/vlc
  • alexsonarin06/vlc
  • adrianbon76/vlc
  • altsod/vlc
  • damien.lucas44/vlc
  • dmytrivtaisa/vlc
  • utk202/vlc
  • aaxhrj/vlc
  • thomas.hermes/vlc
  • structurenewworldorder/vlc
  • slomo/vlc
  • wantlamy/vlc
  • musc.o3cminc/vlc
  • thebarshablog/vlc
  • kerrick/vlc
  • kratos142518/vlc
  • leogps/vlc
  • vacantron/vlc
  • luna_koly/vlc
  • Ratio2/vlc
  • anuoshemohammad/vlc
  • apsun/vlc
  • aaa1115910/vlc
  • alimotmoyo/vlc
  • Ambossmann/vlc
  • Sam-LearnsToCode/vlc
  • Chilledheart/vlc
  • Labnann/vlc
  • ktcoooot1/vlc
  • mohit-marathe/vlc
  • johnddx/vlc
  • manstabuk/vlc
  • Omar-ahmed314/vlc
  • vineethkm/vlc
  • 9Enemi86/vlc
  • radoslav.m.panteleev/vlc
  • ashishami2002/vlc
  • Corbax/vlc
  • firnasahmed/vlc
  • pelayarmalam4/vlc
  • c0ff330k/vlc
  • shikhindahikar/vlc
  • l342723951/vlc
  • christianschwandner/vlc
  • douniwan5788/vlc
  • 7damian7/vlc
  • ferdnyc/vlc
  • f.ales1/vlc
  • pandagby/vlc
  • BaaBaa/vlc
  • jewe37/vlc
  • w00drow/vlc
  • russelltg/vlc
  • ironicallygod/vlc
  • soumyaDghosh/vlc
  • linzihao1999/vlc
  • deyayush6/vlc
  • mibi88/vlc
  • newabdallah10/vlc
  • jhorbincolombia/vlc
  • rimvihaqueshupto/vlc
  • andrewkhon98/vlc
  • fab78/vlc
  • lapaz17/vlc
  • amanna13/vlc
  • mdakram28/vlc
  • 07jw1980/vlc
  • sohamgupta/vlc
  • Eson-Jia1/vlc
  • Sumou/vlc
  • vikram-kangotra/vlc
  • chalice191/vlc
  • olivercalder/vlc
  • aaasg4001/vlc
  • zipdox/vlc
  • kwizart/vlc
  • Dragon-S/vlc
  • jdemeule/vlc
  • gabriel_lt/vlc
  • locutusofborg/vlc
  • sammirata/vlc-librist
  • another/vlc
  • Benjamin_Loison/vlc
  • ahmedmoselhi/vlc
  • petergaal/vlc
  • huynhsontung/vlc
  • dariusmihut/vlc
  • tvermaashutosh/vlc
  • buti/vlc
  • Niram7777/vlc
  • rohan-here/vlc
  • balaji-sivasakthi/vlc
  • rlindner81/vlc
  • Kakadus/vlc
  • Thrillseekr/vlc
  • ABBurmeister/vlc
  • craighuggins/vlc
  • orbea/vlc
  • maxos/vlc
  • aakarshmj/vlc
  • kblaschke/vlc
  • ankitm/vlc
  • advait-0/vlc
  • mohak2003/vlc
  • yselkowitz/vlc
  • AZM999/vlc-azm
  • andrey.turkin/vlc
  • Disha-Baghel/vlc
  • nowrep/vlc
  • Apeng/vlc
  • Choucroute_melba/vlc
  • autra/vlc
  • eclipseo/vlc
  • fhuber/vlc
  • olafhering/vlc
  • sdasda7777/vlc
  • 1div0/vlc
  • skosnits/vlc-extended-playlist-support
  • dnicolson/vlc
  • Timshel/vlc
  • octopols/vlc
  • MangalK/vlc
  • nima64/vlc
  • misawai/vlc
  • Alexander-Wilms/vlc
  • Maxime2/vlc-fork-for-visualizer
  • ww/vlc
  • jeske/vlc
  • sgross-emlix/vlc
  • morenonatural/vlc
  • freakingLovesVLC/vlc
  • borisgolovnev/vlc
  • mpromonet/vlc
  • diogo.simao-marques/vlc
  • masstock/vlc
  • pratikpatel8982/vlc
  • hugok79/vlc
  • longervision/vlc
  • abhiudaysurya/vlc
  • rishabhgarg/vlc
  • tumic/vlc
  • cart/vlc
  • shubham442/vlc
  • Aditya692005/vlc
  • sammirata/vlc4
  • syrykh/vlc
  • Vvorcun/macos-new-icon
  • AyaanshC/vlc
  • nasso/vlc
  • Quark/vlc
  • sebastinas/vlc
400 results
Show changes
Commits on Source (42)
Showing
with 487 additions and 122 deletions
......@@ -88,6 +88,7 @@
534E73E229D2EDB1009982DE /* VLCBookmarksTableViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 534E73E129D2EDB1009982DE /* VLCBookmarksTableViewDelegate.m */; };
534E73E529D2FF07009982DE /* VLCBookmark.m in Sources */ = {isa = PBXBuildFile; fileRef = 534E73E429D2FF07009982DE /* VLCBookmark.m */; };
534E8E3A29A06325009503F8 /* VLCMainVideoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 534E8E3929A06325009503F8 /* VLCMainVideoViewController.m */; };
535053EE2B610C3400D7EAF2 /* VLCLoadingOverlayView.m in Sources */ = {isa = PBXBuildFile; fileRef = 535053ED2B610C3400D7EAF2 /* VLCLoadingOverlayView.m */; };
5350E4EE2B1B21A700F276CB /* VLCLibraryHomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5350E4ED2B1B21A700F276CB /* VLCLibraryHomeViewController.m */; };
5352B37329DF29BF0011CE03 /* VLCMainVideoViewControlsBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 5352B37229DF29BF0011CE03 /* VLCMainVideoViewControlsBar.m */; };
5352B37629E149AC0011CE03 /* VLCLibraryWindowPersistentPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 5352B37529E149AC0011CE03 /* VLCLibraryWindowPersistentPreferences.m */; };
......@@ -125,6 +126,7 @@
53B447FA293BB47B00857588 /* VLCLibraryVideoGroupDescriptor.m in Sources */ = {isa = PBXBuildFile; fileRef = 53B447F4293BB47A00857588 /* VLCLibraryVideoGroupDescriptor.m */; };
53C1EF8B2B466B13001AEEF5 /* VLCLibraryHomeViewVideoGridContainerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 53C1EF852B466B13001AEEF5 /* VLCLibraryHomeViewVideoGridContainerView.m */; };
53C1EF8C2B466B13001AEEF5 /* VLCLibraryHomeViewStackViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 53C1EF862B466B13001AEEF5 /* VLCLibraryHomeViewStackViewController.m */; };
53D8ED9A2B583AAF00142EAD /* VLCLibraryModelChangeDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D8ED992B583AAF00142EAD /* VLCLibraryModelChangeDelegate.m */; };
53ED472329C74D1F00795DB1 /* VLCLibraryAudioTableViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 53ED472229C74D1F00795DB1 /* VLCLibraryAudioTableViewDelegate.m */; };
53ED472629C78FE700795DB1 /* VLCLibraryAudioGroupTableViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 53ED472529C78FE700795DB1 /* VLCLibraryAudioGroupTableViewDelegate.m */; };
53ED472B29C8FF9D00795DB1 /* VLCLibraryAlbumTracksTableViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 53ED472A29C8FF9D00795DB1 /* VLCLibraryAlbumTracksTableViewDelegate.m */; };
......@@ -300,6 +302,8 @@
534E8E3729A04F95009503F8 /* VLCMainVideoView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VLCMainVideoView.xib; sourceTree = "<group>"; };
534E8E3829A06325009503F8 /* VLCMainVideoViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCMainVideoViewController.h; sourceTree = "<group>"; };
534E8E3929A06325009503F8 /* VLCMainVideoViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCMainVideoViewController.m; sourceTree = "<group>"; };
535053EC2B610C3400D7EAF2 /* VLCLoadingOverlayView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLoadingOverlayView.h; sourceTree = "<group>"; };
535053ED2B610C3400D7EAF2 /* VLCLoadingOverlayView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLoadingOverlayView.m; sourceTree = "<group>"; };
5350E4EC2B1B21A700F276CB /* VLCLibraryHomeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCLibraryHomeViewController.h; sourceTree = "<group>"; };
5350E4ED2B1B21A700F276CB /* VLCLibraryHomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryHomeViewController.m; sourceTree = "<group>"; };
5352B37129DF29BF0011CE03 /* VLCMainVideoViewControlsBar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCMainVideoViewControlsBar.h; sourceTree = "<group>"; };
......@@ -383,6 +387,9 @@
53C1EF862B466B13001AEEF5 /* VLCLibraryHomeViewStackViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryHomeViewStackViewController.m; sourceTree = "<group>"; };
53C1EF882B466B13001AEEF5 /* VLCLibraryHomeViewVideoGridContainerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCLibraryHomeViewVideoGridContainerView.h; sourceTree = "<group>"; };
53C1EF8A2B466B13001AEEF5 /* VLCLibraryHomeViewStackViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCLibraryHomeViewStackViewController.h; sourceTree = "<group>"; };
53D6664E2B6B82940042C03D /* VLCLibraryTableViewDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryTableViewDataSource.h; sourceTree = "<group>"; };
53D8ED982B583AAF00142EAD /* VLCLibraryModelChangeDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryModelChangeDelegate.h; sourceTree = "<group>"; };
53D8ED992B583AAF00142EAD /* VLCLibraryModelChangeDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryModelChangeDelegate.m; sourceTree = "<group>"; };
53ED472129C74D1F00795DB1 /* VLCLibraryAudioTableViewDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryAudioTableViewDelegate.h; sourceTree = "<group>"; };
53ED472229C74D1F00795DB1 /* VLCLibraryAudioTableViewDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryAudioTableViewDelegate.m; sourceTree = "<group>"; };
53ED472429C78FE700795DB1 /* VLCLibraryAudioGroupTableViewDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryAudioGroupTableViewDelegate.h; sourceTree = "<group>"; };
......@@ -1058,6 +1065,8 @@
7DFBDCB6226CDFD600B700A5 /* VLCImageView.m */,
7D2FFA3E227B8A5B0085D649 /* VLCLinearProgressIndicator.h */,
7D2FFA3F227B8A5B0085D649 /* VLCLinearProgressIndicator.m */,
535053EC2B610C3400D7EAF2 /* VLCLoadingOverlayView.h */,
535053ED2B610C3400D7EAF2 /* VLCLoadingOverlayView.m */,
7D1BF28822A153E20027C50F /* VLCRoundedCornerTextField.h */,
7D1BF28922A153E20027C50F /* VLCRoundedCornerTextField.m */,
6B13E2A61BC67678001AD24A /* VLCScrollingClipView.h */,
......@@ -1279,6 +1288,8 @@
7DFBDCB0226A518400B700A5 /* VLCLibraryMenuController.m */,
7DFBDCA92269E77F00B700A5 /* VLCLibraryModel.h */,
7DFBDCAA2269E77F00B700A5 /* VLCLibraryModel.m */,
53D8ED982B583AAF00142EAD /* VLCLibraryModelChangeDelegate.h */,
53D8ED992B583AAF00142EAD /* VLCLibraryModelChangeDelegate.m */,
536283EF291146BC00640C15 /* VLCLibraryNavigationStack.h */,
536283E2291146BC00640C15 /* VLCLibraryNavigationStack.m */,
536283E4291146BC00640C15 /* VLCLibraryNavigationState.h */,
......@@ -1296,6 +1307,7 @@
53ED473729CAF67F00795DB1 /* VLCLibraryTableCellViewProtocol.h */,
536283E0291146BC00640C15 /* VLCLibraryTableView.h */,
536283DE291146BC00640C15 /* VLCLibraryTableView.m */,
53D6664E2B6B82940042C03D /* VLCLibraryTableViewDataSource.h */,
53ED473429CA4F3400795DB1 /* VLCLibraryTableViewDelegate.h */,
53ED473529CA4F3400795DB1 /* VLCLibraryTableViewDelegate.m */,
539F114929E83A4200F13460 /* VLCLibraryTwoPaneSplitViewDelegate.h */,
......@@ -2137,6 +2149,7 @@
7D28E6362275B4820098D30E /* NSColor+VLCAdditions.m in Sources */,
6BF5C5041EFE66EF008A9C12 /* VLCHUDTableView.m in Sources */,
535F1BBA2B47ACCE00C78D98 /* VLCLibraryHomeViewVideoContainerViewDataSource.m in Sources */,
53D8ED9A2B583AAF00142EAD /* VLCLibraryModelChangeDelegate.m in Sources */,
53B447FA293BB47B00857588 /* VLCLibraryVideoGroupDescriptor.m in Sources */,
6BBB05E01EEFF165003A1019 /* VLCHUDTableCornerView.m in Sources */,
1C31139D1E508C6900D4DD76 /* VLCControlsBarCommon.m in Sources */,
......@@ -2162,6 +2175,7 @@
1C3113AD1E508C6900D4DD76 /* VLCExtensionsManager.m in Sources */,
7DFBDCBB226CED6300B700A5 /* VLCMediaSourceProvider.m in Sources */,
7D66D4362200BC340040D04A /* VLCClickerManager.m in Sources */,
535053EE2B610C3400D7EAF2 /* VLCLoadingOverlayView.m in Sources */,
53B447F9293BB47B00857588 /* VLCLibraryVideoDataSource.m in Sources */,
53F020A12A91115D00E79705 /* VLCLibraryWindowSplitViewController.m in Sources */,
53B447F9293BB47B00857588 /* VLCLibraryVideoTableViewDataSource.m in Sources */,
......
......@@ -124,6 +124,8 @@ libmacosx_plugin_la_SOURCES = \
gui/macosx/library/VLCLibraryMenuController.m \
gui/macosx/library/VLCLibraryModel.h \
gui/macosx/library/VLCLibraryModel.m \
gui/macosx/library/VLCLibraryModelChangeDelegate.h \
gui/macosx/library/VLCLibraryModelChangeDelegate.m \
gui/macosx/library/VLCLibraryNavigationStack.h \
gui/macosx/library/VLCLibraryNavigationStack.m \
gui/macosx/library/VLCLibraryNavigationState.h \
......@@ -136,6 +138,7 @@ libmacosx_plugin_la_SOURCES = \
gui/macosx/library/VLCLibrarySortingMenuController.m \
gui/macosx/library/VLCLibraryTableView.h \
gui/macosx/library/VLCLibraryTableView.m \
gui/macosx/library/VLCLibraryTableViewDataSource.h \
gui/macosx/library/VLCLibraryTableViewDelegate.h \
gui/macosx/library/VLCLibraryTableViewDelegate.m \
gui/macosx/library/VLCLibraryTableCellView.h \
......@@ -340,6 +343,8 @@ libmacosx_plugin_la_SOURCES = \
gui/macosx/views/VLCImageView.m \
gui/macosx/views/VLCLinearProgressIndicator.h \
gui/macosx/views/VLCLinearProgressIndicator.m \
gui/macosx/views/VLCLoadingOverlayView.h \
gui/macosx/views/VLCLoadingOverlayView.m \
gui/macosx/views/VLCRoundedCornerTextField.h \
gui/macosx/views/VLCRoundedCornerTextField.m \
gui/macosx/views/VLCScrollingClipView.h \
......
......@@ -33,6 +33,10 @@ NS_ASSUME_NONNULL_BEGIN
- (NSIndexPath *)indexPathForLibraryItem:(id<VLCMediaLibraryItemProtocol>)libraryItem;
- (void)reloadData;
@optional
- (void)connect;
- (void)disconnect;
@end
NS_ASSUME_NONNULL_END
......@@ -23,6 +23,7 @@
#import <Cocoa/Cocoa.h>
#import "library/VLCLibraryDataTypes.h"
#import "library/VLCLibraryModelChangeDelegate.h"
NS_ASSUME_NONNULL_BEGIN
......@@ -66,6 +67,8 @@ extern NSString * const VLCLibraryModelGenreUpdated;
- (instancetype)initWithLibrary:(vlc_medialibrary_t *)library;
@property (readonly) VLCLibraryModelChangeDelegate *changeDelegate;
@property (readonly) size_t numberOfAudioMedia;
@property (readonly) NSArray <VLCMediaLibraryMediaItem *> *listOfAudioMedia;
......
......@@ -22,10 +22,11 @@
#import "VLCLibraryModel.h"
#import "main/VLCMain.h"
#import "extensions/NSArray+VLCAdditions.h"
#import "extensions/NSString+Helpers.h"
#import "main/VLCMain.h"
NSString * const VLCLibraryModelArtistListReset = @"VLCLibraryModelArtistListReset";
NSString * const VLCLibraryModelAlbumListReset = @"VLCLibraryModelAlbumListReset";
NSString * const VLCLibraryModelGenreListReset = @"VLCLibraryModelGenreListReset";
......@@ -188,6 +189,7 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
{
self = [super init];
if (self) {
_changeDelegate = [[VLCLibraryModelChangeDelegate alloc] initWithLibraryModel:self];
_sortCriteria = VLC_ML_SORTING_DEFAULT;
_sortDescending = NO;
_filterString = @"";
......@@ -238,7 +240,7 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
- (void)mediaItemThumbnailGenerated:(VLCMediaLibraryMediaItem *)mediaItem
{
[_defaultNotificationCenter postNotificationName:VLCLibraryModelMediaItemThumbnailGenerated object:mediaItem];
[self.changeDelegate notifyChange:VLCLibraryModelMediaItemThumbnailGenerated withObject:mediaItem];
}
- (size_t)numberOfAudioMedia
......@@ -272,7 +274,7 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
vlc_ml_media_list_release(p_media_list);
dispatch_async(dispatch_get_main_queue(), ^{
self.cachedAudioMedia = mediaArray;
[self->_defaultNotificationCenter postNotificationName:VLCLibraryModelAudioMediaListReset object:self];
[self.changeDelegate notifyChange:VLCLibraryModelAudioMediaListReset withObject:self];
});
});
}
......@@ -318,7 +320,7 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
dispatch_async(dispatch_get_main_queue(), ^{
self.cachedArtists = mutableArtistArray.copy;
self->_artistDict = mutableArtistDict.copy;
[self->_defaultNotificationCenter postNotificationName:VLCLibraryModelArtistListReset object:self];
[self.changeDelegate notifyChange:VLCLibraryModelArtistListReset withObject:self];
});
});
}
......@@ -361,7 +363,7 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
dispatch_async(dispatch_get_main_queue(), ^{
self.cachedAlbums = mutableAlbumArray.copy;
self->_albumDict = mutableAlbumDict.copy;
[self->_defaultNotificationCenter postNotificationName:VLCLibraryModelAlbumListReset object:self];
[self.changeDelegate notifyChange:VLCLibraryModelAlbumListReset withObject:self];
});
});
}
......@@ -404,7 +406,7 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
dispatch_async(dispatch_get_main_queue(), ^{
self.cachedGenres = mutableGenreArray.copy;
self->_genreDict = mutableGenreDict.copy;
[self->_defaultNotificationCenter postNotificationName:VLCLibraryModelGenreListReset object:self];
[self.changeDelegate notifyChange:VLCLibraryModelGenreListReset withObject:self];
});
});
}
......@@ -446,7 +448,7 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
vlc_ml_media_list_release(p_media_list);
dispatch_async(dispatch_get_main_queue(), ^{
self.cachedVideoMedia = [mutableArray copy];
[self->_defaultNotificationCenter postNotificationName:VLCLibraryModelVideoMediaListReset object:self];
[self.changeDelegate notifyChange:VLCLibraryModelVideoMediaListReset withObject:self];
});
});
}
......@@ -484,7 +486,7 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
withCountLimit:_recentMediaLimit
withCompletion:^(NSArray * const mediaArray) {
self.cachedRecentMedia = mediaArray;
[self->_defaultNotificationCenter postNotificationName:VLCLibraryModelRecentsMediaListReset object:self];
[self.changeDelegate notifyChange:VLCLibraryModelRecentsMediaListReset withObject:self];
}];
}
......@@ -512,7 +514,7 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
withCountLimit:_recentAudioMediaLimit
withCompletion:^(NSArray * const mediaArray) {
self.cachedRecentAudioMedia = mediaArray;
[self->_defaultNotificationCenter postNotificationName:VLCLibraryModelRecentAudioMediaListReset object:self];
[self.changeDelegate notifyChange:VLCLibraryModelRecentAudioMediaListReset withObject:self];
}];
}
......@@ -563,7 +565,7 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
dispatch_async(dispatch_get_main_queue(), ^{
self.cachedListOfMonitoredFolders = [mutableArray copy];
[self->_defaultNotificationCenter postNotificationName:VLCLibraryModelListOfMonitoredFoldersUpdated object:self];
[self.changeDelegate notifyChange:VLCLibraryModelListOfMonitoredFoldersUpdated withObject:self];
});
});
}
......@@ -657,13 +659,13 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
_cachedRecentMedia = nil;
_cachedRecentAudioMedia = nil;
[_defaultNotificationCenter postNotificationName:VLCLibraryModelVideoMediaListReset object:self];
[_defaultNotificationCenter postNotificationName:VLCLibraryModelAlbumListReset object:self];
[_defaultNotificationCenter postNotificationName:VLCLibraryModelGenreListReset object:self];
[_defaultNotificationCenter postNotificationName:VLCLibraryModelArtistListReset object:self];
[_defaultNotificationCenter postNotificationName:VLCLibraryModelAudioMediaListReset object:self];
[_defaultNotificationCenter postNotificationName:VLCLibraryModelRecentsMediaListReset object:self];
[_defaultNotificationCenter postNotificationName:VLCLibraryModelRecentAudioMediaListReset object:self];
[self.changeDelegate notifyChange:VLCLibraryModelVideoMediaListReset withObject:self];
[self.changeDelegate notifyChange:VLCLibraryModelAudioMediaListReset withObject:self];
[self.changeDelegate notifyChange:VLCLibraryModelAlbumListReset withObject:self];
[self.changeDelegate notifyChange:VLCLibraryModelArtistListReset withObject:self];
[self.changeDelegate notifyChange:VLCLibraryModelGenreListReset withObject:self];
[self.changeDelegate notifyChange:VLCLibraryModelRecentsMediaListReset withObject:self];
[self.changeDelegate notifyChange:VLCLibraryModelRecentAudioMediaListReset withObject:self];
}
- (void)performActionOnMediaItemInCache:(const int64_t)libraryId action:(void (^)(const NSMutableArray*, const NSUInteger, const NSMutableArray*, const NSUInteger))action
......@@ -735,10 +737,12 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
[cachedMediaArray replaceObjectAtIndex:recentMediaIndex withObject:mediaItem];
switch (mediaItem.mediaType) {
case VLC_ML_MEDIA_TYPE_VIDEO:
[self->_defaultNotificationCenter postNotificationName:VLCLibraryModelRecentsMediaItemUpdated object:mediaItem];
[self.changeDelegate notifyChange:VLCLibraryModelRecentsMediaItemUpdated
withObject:mediaItem];
break;
case VLC_ML_MEDIA_TYPE_AUDIO:
[self->_defaultNotificationCenter postNotificationName:VLCLibraryModelRecentAudioMediaItemUpdated object:mediaItem];
[self.changeDelegate notifyChange:VLCLibraryModelRecentAudioMediaItemUpdated
withObject:mediaItem];
break;
case VLC_ML_MEDIA_TYPE_UNKNOWN:
NSLog(@"Unknown type of media type encountered, don't know what to do in deletion");
......@@ -748,10 +752,12 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
switch (mediaItem.mediaType) {
case VLC_ML_MEDIA_TYPE_VIDEO:
[self->_defaultNotificationCenter postNotificationName:VLCLibraryModelVideoMediaItemUpdated object:mediaItem];
[self.changeDelegate notifyChange:VLCLibraryModelVideoMediaItemUpdated
withObject:mediaItem];
break;
case VLC_ML_MEDIA_TYPE_AUDIO:
[self->_defaultNotificationCenter postNotificationName:VLCLibraryModelAudioMediaItemUpdated object:mediaItem];
[self.changeDelegate notifyChange:VLCLibraryModelAudioMediaItemUpdated
withObject:mediaItem];
break;
case VLC_ML_MEDIA_TYPE_UNKNOWN:
NSLog(@"Unknown type of media type encountered, don't know what to do in update");
......@@ -781,10 +787,12 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
[recentMediaArray removeObjectAtIndex:recentMediaIndex];
switch (mediaItem.mediaType) {
case VLC_ML_MEDIA_TYPE_VIDEO:
[self->_defaultNotificationCenter postNotificationName:VLCLibraryModelRecentsMediaItemDeleted object:mediaItem];
[self.changeDelegate notifyChange:VLCLibraryModelRecentsMediaItemDeleted
withObject:mediaItem];
break;
case VLC_ML_MEDIA_TYPE_AUDIO:
[self->_defaultNotificationCenter postNotificationName:VLCLibraryModelRecentAudioMediaItemDeleted object:mediaItem];
[self.changeDelegate notifyChange:VLCLibraryModelRecentAudioMediaItemDeleted
withObject:mediaItem];
break;
case VLC_ML_MEDIA_TYPE_UNKNOWN:
NSLog(@"Unknown type of media type encountered, don't know what to do in deletion");
......@@ -794,10 +802,12 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
switch (mediaItem.mediaType) {
case VLC_ML_MEDIA_TYPE_VIDEO:
[self->_defaultNotificationCenter postNotificationName:VLCLibraryModelVideoMediaItemDeleted object:mediaItem];
[self.changeDelegate notifyChange:VLCLibraryModelVideoMediaItemDeleted
withObject:mediaItem];
break;
case VLC_ML_MEDIA_TYPE_AUDIO:
[self->_defaultNotificationCenter postNotificationName:VLCLibraryModelAudioMediaItemDeleted object:mediaItem];
[self.changeDelegate notifyChange:VLCLibraryModelAudioMediaItemDeleted
withObject:mediaItem];
break;
case VLC_ML_MEDIA_TYPE_UNKNOWN:
NSLog(@"Unknown type of media type encountered, don't know what to do in deletion");
......@@ -841,8 +851,7 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
void (*cacheSetterFunction)(id, SEL, NSArray *) = (void *)cacheSetterImp;
cacheSetterFunction(self, setterSelector, immutableCopy);
[self->_defaultNotificationCenter postNotificationName:notificationName
object:audioGroupItem];
[self.changeDelegate notifyChange:notificationName withObject:audioGroupItem];
});
});
}
......@@ -875,8 +884,7 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
void (*cacheSetterFunction)(id, SEL, NSArray *) = (void *)cacheSetterImp;
cacheSetterFunction(self, setterSelector, immutableCopy);
[self->_defaultNotificationCenter postNotificationName:notificationName
object:audioGroupItem];
[self.changeDelegate notifyChange:notificationName withObject:audioGroupItem];
});
});
}
......
/*****************************************************************************
* VLCLibraryModelChangeDelegate.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2024 VLC authors and VideoLAN
*
* Authors: Claudio Cambra <developer@claudiocambra.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class VLCLibraryModel;
extern NSString * const VLCLongNotificationNameStartSuffix;
extern NSString * const VLCLongNotificationNameFinishSuffix;
@interface VLCLibraryModelChangeDelegate : NSObject
@property (readonly) VLCLibraryModel *model;
@property (readwrite) NSTimeInterval throttleInterval;
- (instancetype)initWithLibraryModel:(VLCLibraryModel *)model;
- (void)notifyChange:(NSString *)notificationName withObject:(id)object;
@end
NS_ASSUME_NONNULL_END
/*****************************************************************************
* VLCLibraryModelChangeDelegate.m: MacOS X interface module
*****************************************************************************
* Copyright (C) 2024 VLC authors and VideoLAN
*
* Authors: Claudio Cambra <developer@claudiocambra.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import "VLCLibraryModelChangeDelegate.h"
NSString * const VLCTimerNotificationNameUserInfoKey = @"notificationName";
NSString * const VLCTimerNotificationObjectUserInfoKey = @"notificationObject";
NSString * const VLCLongNotificationNameStartSuffix = @"Loading";
NSString * const VLCLongNotificationNameFinishSuffix = @"Finished";
@interface VLCLibraryModelChangeDelegate ()
@property (readonly) NSNotificationCenter *notificationCenter;
@property (readonly) NSMutableDictionary<NSString *, NSTimer*> *recentNotifications;
@property (readonly) NSMutableSet<NSString *> *longNotifications;
@end
@implementation VLCLibraryModelChangeDelegate
- (instancetype)initWithLibraryModel:(VLCLibraryModel *)model
{
self = [super init];
if (self) {
_model = model;
_notificationCenter = NSNotificationCenter.defaultCenter;
_throttleInterval = 0.5;
_recentNotifications = NSMutableDictionary.dictionary;
_longNotifications = NSMutableSet.set;
}
return self;
}
- (void)notifyChange:(NSString *)notificationName withObject:(nonnull id)object
{
// If the object received is not the model then we are dealing with a notification carrying
// a specific object (i.e. a media item) that is updated or deleted, do not throttle
if (object != self.model) {
[self.notificationCenter postNotificationName:notificationName object:object];
return;
}
NSTimer * const existingTimer = [self.recentNotifications objectForKey:notificationName];
if (existingTimer != nil) {
[existingTimer invalidate];
NSString * const loadingNotification = [notificationName stringByAppendingString:VLCLongNotificationNameStartSuffix];
[self.notificationCenter postNotificationName:loadingNotification object:object];
[self.longNotifications addObject:notificationName];
}
NSDictionary<NSString *, NSString *> * const userInfo = @{
VLCTimerNotificationNameUserInfoKey: notificationName,
VLCTimerNotificationObjectUserInfoKey: object,
};
NSTimer * const throttleTimer = [NSTimer scheduledTimerWithTimeInterval:self.throttleInterval
target:self
selector:@selector(throttleTimerFired:)
userInfo:userInfo
repeats:NO];
[self.recentNotifications setObject:throttleTimer forKey:notificationName];
}
- (void)throttleTimerFired:(NSTimer *)timer
{
if (timer == nil) {
return;
}
NSDictionary * const userInfo = timer.userInfo;
NSString * const notificationName = [userInfo objectForKey:VLCTimerNotificationNameUserInfoKey];
const id notificationObject = [userInfo objectForKey:VLCTimerNotificationObjectUserInfoKey];
[self.recentNotifications removeObjectForKey:notificationName];
[self.notificationCenter postNotificationName:notificationName object:notificationObject];
if ([self.longNotifications containsObject:notificationName]) {
NSString * const finishedName = [notificationName stringByAppendingString:VLCLongNotificationNameFinishSuffix];
[self.notificationCenter postNotificationName:finishedName object:notificationObject];
}
}
@end
/*****************************************************************************
* VLCLibraryTableView.m: MacOS X interface module
* VLCLibraryTableView.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2022 VLC authors and VideoLAN
*
* Authors: Claudio Cambra <claudio.cambra@gmail.com>
* Authors: Claudio Cambra <developer@claudiocambra.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -22,22 +22,8 @@
#import <Cocoa/Cocoa.h>
#import "library/VLCLibraryDataTypes.h"
NS_ASSUME_NONNULL_BEGIN
@protocol VLCMediaLibraryItemProtocol;
@protocol VLCLibraryTableViewDataSource <NSTableViewDataSource>
@property (readonly) VLCMediaLibraryParentGroupType currentParentType;
- (NSInteger)rowForLibraryItem:(id<VLCMediaLibraryItemProtocol>)libraryItem;
- (id<VLCMediaLibraryItemProtocol>)libraryItemAtRow:(NSInteger)row
forTableView:(nullable NSTableView *)tableView;
@end
@interface VLCLibraryTableView : NSTableView<NSMenuDelegate>
@end
......
/*****************************************************************************
* VLCLibraryTableViewDataSource.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2022 VLC authors and VideoLAN
*
* Authors: Claudio Cambra <developer@claudiocambra.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import <Cocoa/Cocoa.h>
#import "library/VLCLibraryDataTypes.h"
NS_ASSUME_NONNULL_BEGIN
@protocol VLCMediaLibraryItemProtocol;
@protocol VLCLibraryTableViewDataSource <NSTableViewDataSource>
@property (readonly) VLCMediaLibraryParentGroupType currentParentType;
- (NSInteger)rowForLibraryItem:(id<VLCMediaLibraryItemProtocol>)libraryItem;
- (id<VLCMediaLibraryItemProtocol>)libraryItemAtRow:(NSInteger)row
forTableView:(nullable NSTableView *)tableView;
@optional
- (void)connect;
- (void)disconnect;
@end
NS_ASSUME_NONNULL_END
......@@ -24,7 +24,7 @@
#import "library/VLCLibraryTableCellView.h"
#import "library/VLCLibraryTableCellViewProtocol.h"
#import "library/VLCLibraryTableView.h"
#import "library/VLCLibraryTableViewDataSource.h"
#import "library/VLCLibraryDataTypes.h"
#import "library/VLCLibraryRepresentedItem.h"
......
......@@ -22,7 +22,7 @@
#import <Cocoa/Cocoa.h>
#import "library/VLCLibraryTableView.h"
#import "library/VLCLibraryTableViewDataSource.h"
NS_ASSUME_NONNULL_BEGIN
......
......@@ -37,6 +37,8 @@ const CGFloat VLCLibraryTracksRowHeight = 40.;
@implementation VLCLibraryAlbumTracksDataSource
// TODO: Connect to library model
- (VLCMediaLibraryAlbum*)representedAlbum
{
return self.internalAlbum;
......
......@@ -22,8 +22,8 @@
#import <Cocoa/Cocoa.h>
#import "library/VLCLibraryTableView.h"
#import "library/VLCLibraryCollectionViewDataSource.h"
#import "library/VLCLibraryTableViewDataSource.h"
#include "views/iCarousel/iCarousel.h"
......@@ -76,11 +76,9 @@ extern NSString * const VLCLibraryAudioDataSourceDisplayedCollectionChangedNotif
+ (void)setupCollectionView:(NSCollectionView *)collectionView;
- (void)setup;
- (void)reloadData;
- (void)tableView:(NSTableView * const)tableView selectRow:(NSInteger)row;
@end
NS_ASSUME_NONNULL_END
......@@ -31,7 +31,6 @@
#import "library/VLCLibraryController.h"
#import "library/VLCLibraryDataTypes.h"
#import "library/VLCLibraryTableCellView.h"
#import "library/VLCLibraryTableView.h"
#import "library/VLCLibraryCollectionViewItem.h"
#import "library/VLCLibraryCollectionViewFlowLayout.h"
#import "library/VLCLibraryCollectionViewMediaItemSupplementaryDetailView.h"
......@@ -92,65 +91,6 @@ NSString * const VLCLibraryAudioDataSourceDisplayedCollectionChangedNotification
{
self = [super init];
if(self) {
NSNotificationCenter * const notificationCenter = NSNotificationCenter.defaultCenter;
[notificationCenter addObserver:self
selector:@selector(libraryModelAudioMediaItemsReset:)
name:VLCLibraryModelAudioMediaListReset
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelAudioMediaItemUpdated:)
name:VLCLibraryModelAudioMediaItemUpdated
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelAudioMediaItemDeleted:)
name:VLCLibraryModelAudioMediaItemDeleted
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelArtistsReset:)
name:VLCLibraryModelArtistListReset
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelArtistUpdated:)
name:VLCLibraryModelArtistUpdated
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelArtistDeleted:)
name:VLCLibraryModelArtistDeleted
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelAlbumsReset:)
name:VLCLibraryModelAlbumListReset
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelAlbumUpdated:)
name:VLCLibraryModelAlbumUpdated
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelAlbumDeleted:)
name:VLCLibraryModelAlbumDeleted
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelGenresReset:)
name:VLCLibraryModelGenreListReset
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelGenreUpdated:)
name:VLCLibraryModelGenreUpdated
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelGenreDeleted:)
name:VLCLibraryModelGenreDeleted
object:nil];
[notificationCenter addObserver:self
selector:@selector(currentlyPlayingItemChanged:)
name:VLCPlayerCurrentMediaItemChanged
object:nil];
_displayedCollectionUpdating = NO;
}
......@@ -369,6 +309,76 @@ NSString * const VLCLibraryAudioDataSourceDisplayedCollectionChangedNotification
[self setupTableViews];
// Force setAudioLibrarySegment to do something always on first try
_audioLibrarySegment = VLCAudioLibraryUnknownSegment;
[self connect];
}
- (void)connect
{
NSNotificationCenter * const notificationCenter = NSNotificationCenter.defaultCenter;
[notificationCenter addObserver:self
selector:@selector(libraryModelAudioMediaItemsReset:)
name:VLCLibraryModelAudioMediaListReset
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelAudioMediaItemUpdated:)
name:VLCLibraryModelAudioMediaItemUpdated
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelAudioMediaItemDeleted:)
name:VLCLibraryModelAudioMediaItemDeleted
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelArtistsReset:)
name:VLCLibraryModelArtistListReset
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelArtistUpdated:)
name:VLCLibraryModelArtistUpdated
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelArtistDeleted:)
name:VLCLibraryModelArtistDeleted
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelAlbumsReset:)
name:VLCLibraryModelAlbumListReset
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelAlbumUpdated:)
name:VLCLibraryModelAlbumUpdated
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelAlbumDeleted:)
name:VLCLibraryModelAlbumDeleted
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelGenresReset:)
name:VLCLibraryModelGenreListReset
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelGenreUpdated:)
name:VLCLibraryModelGenreUpdated
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelGenreDeleted:)
name:VLCLibraryModelGenreDeleted
object:nil];
[notificationCenter addObserver:self
selector:@selector(currentlyPlayingItemChanged:)
name:VLCPlayerCurrentMediaItemChanged
object:nil];
[self reloadData];
}
- (void)disconnect
{
[NSNotificationCenter.defaultCenter removeObserver:self];
}
+ (void)setupCollectionView:(NSCollectionView *)collectionView
......
......@@ -23,7 +23,7 @@
#import <Cocoa/Cocoa.h>
#import "library/VLCLibraryCollectionViewDataSource.h"
#import "library/VLCLibraryTableView.h"
#import "library/VLCLibraryTableViewDataSource.h"
#import <vlc_media_library.h>
......
......@@ -74,12 +74,7 @@
{
[self addObserver:self forKeyPath:@"collectionViews" options:NSKeyValueObservingOptionNew context:nil];
[self addObserver:self forKeyPath:@"tableViews" options:NSKeyValueObservingOptionNew context:nil];
NSNotificationCenter * const notificationCenter = NSNotificationCenter.defaultCenter;
[notificationCenter addObserver:self
selector:@selector(libraryModelAudioMediaItemsReset:)
name:VLCLibraryModelAudioMediaListReset
object:nil];
[self connect];
}
- (void)observeValueForKeyPath:(NSString *)keyPath
......@@ -103,6 +98,24 @@
[self updateRepresentedListOfAlbums];
}
- (void)connect
{
NSNotificationCenter * const notificationCenter = NSNotificationCenter.defaultCenter;
[notificationCenter addObserver:self
selector:@selector(libraryModelAudioMediaItemsReset:)
name:VLCLibraryModelAudioMediaListReset
object:nil];
// TODO: Handle item deletion, update
[self reloadData];
}
- (void)disconnect
{
[NSNotificationCenter.defaultCenter removeObserver:self];
}
- (void)reloadTableViews
{
NSArray<NSTableView *> * const tableViews = self.tableViews;
......
......@@ -26,6 +26,7 @@
@class VLCLibraryAudioDataSource;
@class VLCLibraryAudioGroupDataSource;
@class VLCLoadingOverlayView;
@class VLCLibraryWindow;
@protocol VLCMediaLibraryItemProtocol;
......@@ -55,6 +56,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (readonly) NSTextField *placeholderLabel;
@property (readonly) NSView *emptyLibraryView;
@property (readwrite, nonatomic) VLCLibrarySegmentType currentSegmentType;
@property (readonly) VLCLoadingOverlayView *loadingOverlayView;
@property (readonly) VLCLibraryAudioDataSource *audioDataSource;
@property (readonly) VLCLibraryAudioGroupDataSource *audioGroupDataSource;
......
......@@ -47,6 +47,8 @@
#import "main/VLCMain.h"
#import "views/VLCLoadingOverlayView.h"
#import "windows/video/VLCVoutView.h"
#import "windows/video/VLCMainVideoViewController.h"
......@@ -63,6 +65,8 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = @"VLCLibraryPlaceholderAudi
VLCLibraryAudioTableViewDelegate *_audioLibraryTableViewDelegate;
VLCLibraryAudioGroupTableViewDelegate *_audioGroupLibraryTableViewDelegate;
VLCLibraryTwoPaneSplitViewDelegate *_splitViewDelegate;
NSArray<NSLayoutConstraint *> *_loadingOverlayViewConstraints;
}
@end
......@@ -86,6 +90,7 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = @"VLCLibraryPlaceholderAudi
_splitViewDelegate = [[VLCLibraryTwoPaneSplitViewDelegate alloc] init];
[self setupAudioPlaceholderView];
[self setupLoadingOverlayView];
[self setupAudioCollectionView];
[self setupGridModeSplitView];
[self setupAudioTableViews];
......@@ -100,6 +105,29 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = @"VLCLibraryPlaceholderAudi
selector:@selector(libraryModelUpdated:)
name:VLCLibraryModelAudioMediaItemDeleted
object:nil];
NSString * const audioMediaResetLongLoadStartNotification = [VLCLibraryModelAudioMediaListReset stringByAppendingString:VLCLongNotificationNameStartSuffix];
NSString * const audioMediaResetLongLoadFinishNotification = [VLCLibraryModelAudioMediaListReset stringByAppendingString:VLCLongNotificationNameFinishSuffix];
NSString * const audioMediaDeletedLongLoadStartNotification = [VLCLibraryModelAudioMediaItemDeleted stringByAppendingString:VLCLongNotificationNameStartSuffix];
NSString * const audioMediaDeletedLongLoadFinishNotification = [VLCLibraryModelAudioMediaItemDeleted stringByAppendingString:VLCLongNotificationNameFinishSuffix];
[notificationCenter addObserver:self
selector:@selector(libraryModelLongLoadStarted:)
name:audioMediaResetLongLoadStartNotification
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelLongLoadFinished:)
name:audioMediaResetLongLoadFinishNotification
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelLongLoadStarted:)
name:audioMediaDeletedLongLoadStartNotification
object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelLongLoadFinished:)
name:audioMediaDeletedLongLoadFinishNotification
object:nil];
}
return self;
......@@ -245,6 +273,42 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = @"VLCLibraryPlaceholderAudi
];
}
- (void)setupLoadingOverlayView
{
_loadingOverlayView = [[VLCLoadingOverlayView alloc] init];
self.loadingOverlayView.translatesAutoresizingMaskIntoConstraints = NO;
_loadingOverlayViewConstraints = @[
[NSLayoutConstraint constraintWithItem:self.loadingOverlayView
attribute:NSLayoutAttributeTop
relatedBy:NSLayoutRelationEqual
toItem:self.libraryTargetView
attribute:NSLayoutAttributeTop
multiplier:1
constant:0],
[NSLayoutConstraint constraintWithItem:self.loadingOverlayView
attribute:NSLayoutAttributeRight
relatedBy:NSLayoutRelationEqual
toItem:self.libraryTargetView
attribute:NSLayoutAttributeRight
multiplier:1
constant:0],
[NSLayoutConstraint constraintWithItem:self.loadingOverlayView
attribute:NSLayoutAttributeBottom
relatedBy:NSLayoutRelationEqual
toItem:self.libraryTargetView
attribute:NSLayoutAttributeBottom
multiplier:1
constant:0],
[NSLayoutConstraint constraintWithItem:self.loadingOverlayView
attribute:NSLayoutAttributeLeft
relatedBy:NSLayoutRelationEqual
toItem:self.libraryTargetView
attribute:NSLayoutAttributeLeft
multiplier:1
constant:0]
];
}
- (void)setupAudioLibraryViews
{
_audioCollectionSelectionTableView.rowHeight = VLCLibraryUIUnits.mediumTableViewRowHeight;
......@@ -304,7 +368,11 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = @"VLCLibraryPlaceholderAudi
}
_emptyLibraryView.translatesAutoresizingMaskIntoConstraints = NO;
_libraryTargetView.subviews = @[_emptyLibraryView];
if ([self.libraryTargetView.subviews containsObject:self.loadingOverlayView]) {
_libraryTargetView.subviews = @[_emptyLibraryView, self.loadingOverlayView];
} else {
_libraryTargetView.subviews = @[_emptyLibraryView];
}
NSDictionary * const dict = NSDictionaryOfVariableBindings(_emptyLibraryView);
[_libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_emptyLibraryView(>=572.)]|" options:0 metrics:0 views:dict]];
[_libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_emptyLibraryView(>=444.)]|" options:0 metrics:0 views:dict]];
......@@ -314,11 +382,15 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = @"VLCLibraryPlaceholderAudi
- (void)prepareAudioLibraryView
{
_audioLibraryView.translatesAutoresizingMaskIntoConstraints = NO;
_libraryTargetView.subviews = @[_audioLibraryView];
self.audioLibraryView.translatesAutoresizingMaskIntoConstraints = NO;
if ([self.libraryTargetView.subviews containsObject:self.loadingOverlayView]) {
self.libraryTargetView.subviews = @[self.audioLibraryView, self.loadingOverlayView];
} else {
self.libraryTargetView.subviews = @[self.audioLibraryView];
}
NSDictionary *dict = NSDictionaryOfVariableBindings(_audioLibraryView);
[_libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_audioLibraryView(>=572.)]|" options:0 metrics:0 views:dict]];
[_libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_audioLibraryView(>=444.)]|" options:0 metrics:0 views:dict]];
[self.libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_audioLibraryView(>=572.)]|" options:0 metrics:0 views:dict]];
[self.libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_audioLibraryView(>=444.)]|" options:0 metrics:0 views:dict]];
}
- (void)hideAllViews
......@@ -539,4 +611,51 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = @"VLCLibraryPlaceholderAudi
}
}
- (void)libraryModelLongLoadStarted:(NSNotification *)notification
{
if ([self.libraryTargetView.subviews containsObject:self.loadingOverlayView]) {
return;
}
[self.audioDataSource disconnect];
[self.audioGroupDataSource disconnect];
self.loadingOverlayView.wantsLayer = YES;
self.loadingOverlayView.alphaValue = 0.0;
NSArray * const views = [self.libraryTargetView.subviews arrayByAddingObject:self.loadingOverlayView];
self.libraryTargetView.subviews = views;
[self.libraryTargetView addConstraints:_loadingOverlayViewConstraints];
[NSAnimationContext runAnimationGroup:^(NSAnimationContext * const context) {
context.duration = 0.5;
self.loadingOverlayView.animator.alphaValue = 1.0;
} completionHandler:nil];
[self.loadingOverlayView.indicator startAnimation:self];
}
- (void)libraryModelLongLoadFinished:(NSNotification *)notification
{
if (![self.libraryTargetView.subviews containsObject:self.loadingOverlayView]) {
return;
}
[self.audioDataSource connect];
[self.audioGroupDataSource connect];
self.loadingOverlayView.wantsLayer = YES;
self.loadingOverlayView.alphaValue = 1.0;
[NSAnimationContext runAnimationGroup:^(NSAnimationContext * const context) {
context.duration = 1.0;
self.loadingOverlayView.animator.alphaValue = 0.0;
} completionHandler:^{
[self.libraryTargetView removeConstraints:_loadingOverlayViewConstraints];
NSMutableArray * const views = self.libraryTargetView.subviews.mutableCopy;
[views removeObject:self.loadingOverlayView];
self.libraryTargetView.subviews = views.copy;
[self.loadingOverlayView.indicator stopAnimation:self];
}];
}
@end
......@@ -79,6 +79,7 @@
- (void)setup
{
[self setupView];
[self connect];
}
- (void)setupView
......@@ -117,6 +118,16 @@
self.carouselView.reenablePostInteractAutoscrollTimeout = 3.;
}
- (void)connect
{
[self.dataSource connect];
}
- (void)disconnect
{
[self.dataSource disconnect];
}
- (void)updateCarouselViewHeight
{
const CGFloat viewHeight = self.titleView.frame.size.height +
......
......@@ -28,6 +28,9 @@ NS_ASSUME_NONNULL_BEGIN
@property (readwrite, assign) NSArray<NSLayoutConstraint *> *constraintsWithSuperview;
- (void)connect;
- (void)disconnect;
@end
NS_ASSUME_NONNULL_END