MediaCategory.swift 3.07 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
/*****************************************************************************
 * MediaCategory.swift
 * VLC for iOS
 *****************************************************************************
 * Copyright (c) 2018 VideoLAN. All rights reserved.
 * $Id$
 *
 * Authors: Soomin Lee <bubu@mikan.io>
 *
 * Refer to the COPYING file of the official project for license.
 *****************************************************************************/

13
class VLCMovieCategoryViewController: VLCMediaCategoryViewController {
14
    init(_ services: Services) {
15 16
        let model = VideoModel(medialibrary: services.medialibraryManager)
        super.init(services: services, category: model)
17 18 19
        category.updateView = { [weak self] in
            self?.reloadData()
        }
20 21 22
    }
}

23
class VLCShowEpisodeCategoryViewController: VLCMediaCategoryViewController {
24
    init(_ services: Services) {
Soomin Lee's avatar
Soomin Lee committed
25
        let model = ShowEpisodeModel(medialibrary: services.medialibraryManager)
26
        super.init(services: services, category: model)
27 28 29
        category.updateView = { [weak self] in
            self?.reloadData()
        }
30 31 32
    }
}

33
class VLCVideoPlaylistCategoryViewController: VLCMediaCategoryViewController {
34
    init(_ services: Services) {
35
        let model = PlaylistModel(medialibrary: services.medialibraryManager)
36
        super.init(services: services, category: model)
37 38 39 40
        category.updateView = { [weak self] in
            self?.reloadData()
        }
    }
41 42
}

43
class VLCTrackCategoryViewController: VLCMediaCategoryViewController {
44
    init(_ services: Services) {
Soomin Lee's avatar
Soomin Lee committed
45
        let model = AudioModel(medialibrary: services.medialibraryManager)
46
        super.init(services: services, category: model)
47 48 49
        category.updateView = { [weak self] in
            self?.reloadData()
        }
50 51 52
    }
}

53
class VLCGenreCategoryViewController: VLCMediaCategoryViewController {
54
    init(_ services: Services) {
Soomin Lee's avatar
Soomin Lee committed
55
        let model = GenreModel(medialibrary: services.medialibraryManager)
56
        super.init(services: services, category: model)
57 58 59
        category.updateView = { [weak self] in
            self?.reloadData()
        }
60 61 62
    }
}

63
class VLCArtistCategoryViewController: VLCMediaCategoryViewController {
64
    init(_ services: Services) {
Soomin Lee's avatar
Soomin Lee committed
65
        let model = ArtistModel(medialibrary: services.medialibraryManager)
66
        super.init(services: services, category: model)
67 68 69
        category.updateView = { [weak self] in
            self?.reloadData()
        }
70 71 72
    }
}

73
class VLCAlbumCategoryViewController: VLCMediaCategoryViewController {
74
    init(_ services: Services) {
Soomin Lee's avatar
Soomin Lee committed
75
        let model = AlbumModel(medialibrary: services.medialibraryManager)
76
        super.init(services: services, category: model)
77 78 79
        category.updateView = { [weak self] in
            self?.reloadData()
        }
80 81 82
    }
}

83
class VLCAudioPlaylistCategoryViewController: VLCMediaCategoryViewController {
84
    init(_ services: Services) {
85
        let model = PlaylistModel(medialibrary: services.medialibraryManager)
86
        super.init(services: services, category: model)
87 88 89
        category.updateView = { [weak self] in
            self?.reloadData()
        }
90 91
    }
}