Permalink
Browse files

Merge pull request #40 from Cocotus/DolbyTrueHD_DTSHD/DTSHD-MA_Fix

Dolby true hd dtshd/dtshd ma fix
  • Loading branch information...
2 parents fb0658e + c10236f commit a3ca5ea6314e96514fa851472cb69dc0485a6942 @bodrick committed Dec 12, 2012
Showing with 2,078 additions and 89 deletions.
  1. +86 −23 .gitignore
  2. BIN .nuget/NuGet.exe
  3. +61 −54 Addons/scraper.EmberCore/Scraper/clsScrapeYouTube.vb
  4. +6 −0 Ember Media Manager.sln
  5. +15 −0 Ember Media Manager/App.config
  6. +4 −0 Ember Media Manager/Ember Media Manager.vbproj
  7. +13 −0 Ember Media Manager/dlgEditMovie.vb
  8. +79 −6 Ember Media Manager/frmMain.vb
  9. +86 −0 Ember.Plugins/Dummy/DummyPlugin.cs
  10. +107 −0 Ember.Plugins/Ember.Plugins.csproj
  11. +88 −0 Ember.Plugins/Ember/EmberWorkAroundPlugin.cs
  12. +38 −0 Ember.Plugins/Events/MovieScraper.cs
  13. +70 −0 Ember.Plugins/Events/ShowFormOnUIThread.cs
  14. +45 −0 Ember.Plugins/IPlugin.cs
  15. +9 −0 Ember.Plugins/PluginActionContext.cs
  16. +88 −0 Ember.Plugins/PluginActionResult.cs
  17. +82 −0 Ember.Plugins/PluginBase.cs
  18. +353 −0 Ember.Plugins/PluginManager.cs
  19. +118 −0 Ember.Plugins/PluginSectionHandler.cs
  20. +38 −0 Ember.Plugins/Properties/AssemblyInfo.cs
  21. +35 −0 Ember.Plugins/Properties/Settings.Designer.cs
  22. +9 −0 Ember.Plugins/Properties/Settings.settings
  23. +14 −0 Ember.Plugins/Scraper/Exceptions.cs
  24. +68 −0 Ember.Plugins/Scraper/IMovieImageScraper.cs
  25. +80 −0 Ember.Plugins/Scraper/IMovieInfoScraper.cs
  26. +9 −0 Ember.Plugins/Scraper/ITVImageScraper.cs
  27. +9 −0 Ember.Plugins/Scraper/ITVInfoScraper.cs
  28. +72 −0 Ember.Plugins/Scraper/ImageScrapeActionContext.cs
  29. +211 −0 Ember.Plugins/Scraper/MovieScraperManager.cs
  30. +79 −0 Ember.Plugins/Scraper/ScraperActionContext.cs
  31. +56 −0 Ember.Plugins/Utility.cs
  32. +15 −0 Ember.Plugins/app.config
  33. +16 −0 Ember.Plugins/log4net.config
  34. +4 −0 Ember.Plugins/packages.config
  35. +14 −6 EmberAPI/clsAPIMediaInfo.vb
  36. BIN packages/SharpZipLib.0.86.0/SharpZipLib.0.86.0.nupkg
  37. BIN packages/SharpZipLib.0.86.0/lib/11/ICSharpCode.SharpZipLib.dll
  38. BIN packages/SharpZipLib.0.86.0/lib/20/ICSharpCode.SharpZipLib.dll
  39. BIN packages/SharpZipLib.0.86.0/lib/SL3/SharpZipLib.Silverlight3.dll
  40. BIN packages/SharpZipLib.0.86.0/lib/SL4/SharpZipLib.Silverlight4.dll
  41. BIN packages/System.Data.SQLite.1.0.81.0/System.Data.SQLite.1.0.81.0.nupkg
  42. BIN packages/System.Data.SQLite.1.0.81.0/lib/net20/System.Data.SQLite.Linq.dll
  43. BIN packages/System.Data.SQLite.1.0.81.0/lib/net20/System.Data.SQLite.dll
  44. BIN packages/System.Data.SQLite.1.0.81.0/lib/net40/System.Data.SQLite.Linq.dll
  45. BIN packages/System.Data.SQLite.1.0.81.0/lib/net40/System.Data.SQLite.dll
  46. +1 −0 packages/repositories.config
View
@@ -1,30 +1,93 @@
+# EmberMM build output folders.
+EmberMM-Dev/
+EmberMM-Deploy/
-#ignore thumbnails created by windows
-Thumbs.db
-#Ignore files build by Visual Studio
-*.obj
-*.exe
-*.pdb
+# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
+[Bb]in/
+[Oo]bj/
+
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
*.user
-*.aps
-*.pch
-*.vspscc
+*.sln.docstates
+
+# Build results
+[Dd]ebug/
+[Rr]elease/
+x64/
*_i.c
*_p.c
-*.ncb
-*.suo
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
*.tlb
+*.tli
*.tlh
-*.bak
-*.cache
-*.ilk
+*.tmp
*.log
-[Bb]in
-[Dd]ebug*/
-*.lib
-*.sbr
-obj/
-[Rr]elease*/
-_ReSharper*/
-[Tt]est[Rr]esult*
-EmberMM*/
+*.vspscc
+*.vssscc
+.builds
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opensdf
+*.sdf
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*
+
+# NCrunch
+*.ncrunch*
+.*crunch*.local.xml
+
+# Installshield output folder
+[Ee]xpress
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish
+
+# Publish Web Output
+*.Publish.xml
+
+# NuGet Packages Directory
+packages
+
+# Windows Azure Build Output
+csx
+*.build.csdef
+
+# Backup & report files from converting an old project file to a newer
+# Visual Studio version. Backup files are not needed, because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
View
Binary file not shown.
@@ -151,61 +151,69 @@ Namespace YouTube
Dim fmtMatch As Match = Regex.Match(Html, "url_encoded_fmt_stream_map=(.*?)\\u0026amp;", RegexOptions.IgnoreCase)
If fmtMatch.Success Then
Dim FormatMap As String = fmtMatch.Groups(1).Value
+ Dim decoded As String = Web.HttpUtility.UrlDecode(FormatMap) & "," ' append comma for easier regex
+
+ Dim pattern As String = "itag=(\d+)&url=(.*?),"
+ Dim rgx As New Regex(pattern, RegexOptions.Singleline)
+ Dim matches As MatchCollection = rgx.Matches(decoded)
+ If matches.Count > 0 Then
+
+ For Each fmt As Match In matches
+ Dim groups As GroupCollection = fmt.Groups
+ Dim Link As New VideoLinkItem
+
+ 'Console.WriteLine("itag: " + groups.Item(1).Value)
+ 'Console.WriteLine("url: " + groups.Item(2).Value)
+ Select Case groups.Item(1).Value
+ Case "18"
+ Link.Description = "SQ (MP4)"
+ Link.FormatQuality = Enums.TrailerQuality.SQMP4
+ Case "22"
+ Link.Description = "720p"
+ Link.FormatQuality = Enums.TrailerQuality.HD720p
+ Case "34"
+ Link.Description = "SQ (FLV)"
+ Link.FormatQuality = Enums.TrailerQuality.SQFLV
+ Case "35"
+ Link.Description = "HQ (FLV)"
+ Link.FormatQuality = Enums.TrailerQuality.HQFLV
+ Case "37"
+ Link.Description = "1080p"
+ Link.FormatQuality = Enums.TrailerQuality.HD1080p
+ Case "46"
+ Link.Description = "1080p (VP8)"
+ Link.FormatQuality = Enums.TrailerQuality.HD1080pVP8
+ Case "45"
+ Link.Description = "720p (VP8)"
+ Link.FormatQuality = Enums.TrailerQuality.HD720pVP8
+ Case "44"
+ Link.Description = "HQ (VP8)"
+ Link.FormatQuality = Enums.TrailerQuality.HQVP8
+ Case "43"
+ Link.Description = "SQ (VP8)"
+ Link.FormatQuality = Enums.TrailerQuality.SQVP8
+ Case Else
+ Link.Description = "Other"
+ Link.FormatQuality = Enums.TrailerQuality.OTHERS
+ 'Continue For
+ End Select
+
+ Link.URL = Web.HttpUtility.UrlDecode(groups.Item(2).Value) & Web.HttpUtility.UrlEncode("&title=" & VideoTitle)
+ Link.URL = Link.URL.Replace("sig=", "signature=") ' sig= returns HTTP 403
+
+ If bwYT.CancellationPending Then Return DownloadLinks
+
+ If Not String.IsNullOrEmpty(Link.URL) AndAlso sHTTP.IsValidURL(Link.URL) Then
+ DownloadLinks.Add(Link)
+ End If
+
+ If bwYT.CancellationPending Then Return DownloadLinks
+
+ Next
- Dim Formats As String() = Web.HttpUtility.UrlDecode(FormatMap).Split(Convert.ToChar(","))
- For Each fmt As String In Formats
- Dim Splitter As String() = {"url=", "&itag="}
- Dim FormatElements As String() = fmt.Split(Splitter, StringSplitOptions.RemoveEmptyEntries)
-
- Dim Link As New VideoLinkItem
-
- Select Case FormatElements(1).Trim
- Case "18"
- Link.Description = "SQ (MP4)"
- Link.FormatQuality = Enums.TrailerQuality.SQMP4
- Case "22"
- Link.Description = "720p"
- Link.FormatQuality = Enums.TrailerQuality.HD720p
- Case "34"
- Link.Description = "SQ (FLV)"
- Link.FormatQuality = Enums.TrailerQuality.SQFLV
- Case "35"
- Link.Description = "HQ (FLV)"
- Link.FormatQuality = Enums.TrailerQuality.HQFLV
- Case "37"
- Link.Description = "1080p"
- Link.FormatQuality = Enums.TrailerQuality.HD1080p
- Case "46"
- Link.Description = "1080p (VP8)"
- Link.FormatQuality = Enums.TrailerQuality.HD1080pVP8
- Case "45"
- Link.Description = "720p (VP8)"
- Link.FormatQuality = Enums.TrailerQuality.HD720pVP8
- Case "44"
- Link.Description = "HQ (VP8)"
- Link.FormatQuality = Enums.TrailerQuality.HQVP8
- Case "43"
- Link.Description = "SQ (VP8)"
- Link.FormatQuality = Enums.TrailerQuality.SQVP8
- Case Else
- Link.Description = "Other"
- Link.FormatQuality = Enums.TrailerQuality.OTHERS
- 'Continue For
- End Select
-
- Link.URL = Web.HttpUtility.UrlDecode(FormatElements(0)) & "&title=" & VideoTitle
-
- If bwYT.CancellationPending Then Return DownloadLinks
-
- If Not String.IsNullOrEmpty(Link.URL) AndAlso sHTTP.IsValidURL(Link.URL) Then
- DownloadLinks.Add(Link)
- End If
-
- If bwYT.CancellationPending Then Return DownloadLinks
-
- Next
- End If
+ End If
+ End If
Return DownloadLinks
Catch ex As Exception
@@ -277,4 +285,3 @@ Namespace YouTube
End Class
End Namespace
-
View
@@ -33,6 +33,8 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "scraper.EmberCore", "Addons
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "scraper.EmberCore.XML", "Addons\scraper.EmberCore.XML\scraper.EmberCore.XML.vbproj", "{E567C031-1F7B-4637-9B3A-806988DE50CF}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ember.Plugins", "Ember.Plugins\Ember.Plugins.csproj", "{9496C697-5AFD-4813-AEDC-AF33FACEADF0}"
+EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{8564C91B-7F49-482F-A4B3-C3D7E818648F}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
@@ -106,6 +108,10 @@ Global
{E567C031-1F7B-4637-9B3A-806988DE50CF}.Debug|x86.Build.0 = Debug|x86
{E567C031-1F7B-4637-9B3A-806988DE50CF}.Release|x86.ActiveCfg = Release|x86
{E567C031-1F7B-4637-9B3A-806988DE50CF}.Release|x86.Build.0 = Release|x86
+ {9496C697-5AFD-4813-AEDC-AF33FACEADF0}.Debug|x86.ActiveCfg = Debug|x86
+ {9496C697-5AFD-4813-AEDC-AF33FACEADF0}.Debug|x86.Build.0 = Debug|x86
+ {9496C697-5AFD-4813-AEDC-AF33FACEADF0}.Release|x86.ActiveCfg = Release|x86
+ {9496C697-5AFD-4813-AEDC-AF33FACEADF0}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1,8 +1,23 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
+ <configSections>
+ <section name="plugins" type="Ember.Plugins.PluginSectionHandler, Ember.Plugins" />
+ </configSections>
+
<system.net>
<settings>
<httpWebRequest useUnsafeHeaderParsing="true"/>
</settings>
</system.net>
+
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <probing privatePath="Modules"/>
+ </assemblyBinding>
+ </runtime>
+
+ <plugins>
+ <!-- <plugin class="Ember.Plugins.Dummy.DummyPlugin, Ember.Plugins" /> -->
+ <plugin class="Ember.Plugins.Ember.EmberWorkAroundPlugin, Ember.Plugins" />
+ </plugins>
</configuration>
@@ -473,6 +473,10 @@
<None Include="Resources\EmberSplashScreen.jpg" />
</ItemGroup>
<ItemGroup>
+ <ProjectReference Include="..\Ember.Plugins\Ember.Plugins.csproj">
+ <Project>{9496C697-5AFD-4813-AEDC-AF33FACEADF0}</Project>
+ <Name>Ember.Plugins</Name>
+ </ProjectReference>
<ProjectReference Include="..\EmberAPI\EmberAPI.vbproj">
<Project>{208AA35E-C6AE-4D2D-A9DD-B6EFD19A4279}</Project>
<Name>EmberAPI</Name>
@@ -29,6 +29,7 @@ Public Class dlgEditMovie
Friend WithEvents bwThumbs As New System.ComponentModel.BackgroundWorker
+ Private MainForm As frmMain
Private CachePath As String = String.Empty
Private DeleteList As New List(Of String)
Private ExtraIndex As Integer = 0
@@ -46,6 +47,18 @@ Public Class dlgEditMovie
#End Region 'Fields
+#Region "Constructor"
+
+ Public Sub New(MainForm As frmMain)
+ ' This call is required by the designer.
+ InitializeComponent()
+
+ ' Add any initialization after the InitializeComponent() call.
+ Me.MainForm = MainForm
+ End Sub
+
+#End Region 'Constructor
+
#Region "Methods"
Private Sub btnActorDown_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnActorDown.Click
Oops, something went wrong.

0 comments on commit a3ca5ea

Please sign in to comment.