Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main(args: Array[String]) {
- addMedia()
- val data = for {media: MediaInfo <- mediaCollection}
- yield {
- media.mediaType match {
- case "Movie" => "Movie:" + media.folderName
- case "Game" => "Game:" + media.folderName
- case "TvShow" => media match {
- case tvShow: TvShow => "TvShow:" + tvShow.mediaInfo.folderName + ":Seasons:" + tvShow.seasons
- case _ => throw new ClassCastException("Invalid type for MediaInfo, can't cast to TvShow")
- }
- }
- }
- Runtime.getRuntime.exec("curl --data-urlencode \"data="+data.mkString(";:;")+"\" "+ POST_URL)
- }
Advertisement
Add Comment
Please, Sign In to add comment