This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct MediaItem { | |
| var duration: Int? | |
| var title: String? | |
| var urlString: String? | |
| static func parseM3U(contentsOfFile: String) -> [MediaItem]? { | |
| var mediaItems = [MediaItem]() | |
| contentsOfFile.enumerateLines({ line, stop in | |
| if line.hasPrefix("#EXTINF:") { | |
| let infoLine = line.stringByReplacingOccurrencesOfString("#EXTINF:", withString: "") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'formula' | |
| # Adapted from https://trac.macports.org/browser/trunk/dports/www/webkit-gtk | |
| # Tested with newer glib and libsoup than currently in homebrew (also in tap). | |
| class Webkitgtk < Formula | |
| homepage 'http://webkitgtk.org/' | |
| url 'http://webkitgtk.org/releases/webkitgtk-1.11.92.tar.xz' | |
| sha1 'dbe9053eb8a9516cff6e796a4ba463bbb14fc464' | |
| depends_on 'pkg-config' => :build |
NewerOlder