diff options
32 files changed, 12 insertions, 2573 deletions
diff --git a/Kodi.xcodeproj/project.pbxproj b/Kodi.xcodeproj/project.pbxproj index 34a98284b9..b68800878a 100644 --- a/Kodi.xcodeproj/project.pbxproj +++ b/Kodi.xcodeproj/project.pbxproj @@ -929,8 +929,6 @@ DF93D6AC1444A8B1007C6459 /* SlingboxFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D6891444A8B0007C6459 /* SlingboxFile.cpp */; }; DF93D6AD1444A8B1007C6459 /* SMBFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D68B1444A8B0007C6459 /* SMBFile.cpp */; }; DF93D6AE1444A8B1007C6459 /* SpecialProtocolFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D68D1444A8B0007C6459 /* SpecialProtocolFile.cpp */; }; - DF93D6AF1444A8B1007C6459 /* TuxBoxDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D68F1444A8B0007C6459 /* TuxBoxDirectory.cpp */; }; - DF93D6B01444A8B1007C6459 /* TuxBoxFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D6911444A8B0007C6459 /* TuxBoxFile.cpp */; }; DF93D6B11444A8B1007C6459 /* UDFFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D6931444A8B0007C6459 /* UDFFile.cpp */; }; DF93D6B21444A8B1007C6459 /* UPnPFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D6951444A8B0007C6459 /* UPnPFile.cpp */; }; DF93D6B31444A8B1007C6459 /* ZipFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D6971444A8B0007C6459 /* ZipFile.cpp */; }; @@ -1363,8 +1361,6 @@ DFF0F24E17528350002DA3A4 /* SpecialProtocolDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CEBD8A60F33A0D800CAF6AD /* SpecialProtocolDirectory.cpp */; }; DFF0F24F17528350002DA3A4 /* SpecialProtocolFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D68D1444A8B0007C6459 /* SpecialProtocolFile.cpp */; }; DFF0F25017528350002DA3A4 /* StackDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E17590D25F9FA00618676 /* StackDirectory.cpp */; }; - DFF0F25117528350002DA3A4 /* TuxBoxDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D68F1444A8B0007C6459 /* TuxBoxDirectory.cpp */; }; - DFF0F25217528350002DA3A4 /* TuxBoxFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D6911444A8B0007C6459 /* TuxBoxFile.cpp */; }; DFF0F25317528350002DA3A4 /* udf25.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 433219D312E4C6A500CD7486 /* udf25.cpp */; }; DFF0F25417528350002DA3A4 /* UDFDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 433219D512E4C6A500CD7486 /* UDFDirectory.cpp */; }; DFF0F25517528350002DA3A4 /* UDFFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D6931444A8B0007C6459 /* UDFFile.cpp */; }; @@ -1767,7 +1763,6 @@ DFF0F3F517528350002DA3A4 /* TextSearch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C848291D156D003E005A996F /* TextSearch.cpp */; }; DFF0F3F617528350002DA3A4 /* TimeSmoother.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CEE2E5913D6B71E000ABF2A /* TimeSmoother.cpp */; }; DFF0F3F717528350002DA3A4 /* TimeUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CCF7FC7106A0DF500992676 /* TimeUtils.cpp */; }; - DFF0F3F817528350002DA3A4 /* TuxBoxUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1E890D25F9FD00618676 /* TuxBoxUtil.cpp */; }; DFF0F3F917528350002DA3A4 /* URIUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 18B7C8EC12942613009E7A26 /* URIUtils.cpp */; }; DFF0F3FA17528350002DA3A4 /* UrlOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 36A9466815CF1FED00727135 /* UrlOptions.cpp */; }; DFF0F3FB17528350002DA3A4 /* Variant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CF1FB09123B1AF000B2CBCB /* Variant.cpp */; }; @@ -2233,7 +2228,6 @@ E38E22F20D25F9FE00618676 /* Stopwatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1E810D25F9FD00618676 /* Stopwatch.cpp */; }; E38E22F30D25F9FE00618676 /* SystemInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1E830D25F9FD00618676 /* SystemInfo.cpp */; }; E38E22F40D25F9FE00618676 /* Thread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1E850D25F9FD00618676 /* Thread.cpp */; }; - E38E22F60D25F9FE00618676 /* TuxBoxUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1E890D25F9FD00618676 /* TuxBoxUtil.cpp */; }; E38E22F70D25F9FE00618676 /* UdpClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1E8B0D25F9FD00618676 /* UdpClient.cpp */; }; E38E22F80D25F9FE00618676 /* Weather.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1E8D0D25F9FD00618676 /* Weather.cpp */; }; E38E22FB0D25F9FE00618676 /* VideoDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1E930D25F9FD00618676 /* VideoDatabase.cpp */; }; @@ -2614,8 +2608,6 @@ E49912B7174E5D9900741B6D /* SpecialProtocolDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CEBD8A60F33A0D800CAF6AD /* SpecialProtocolDirectory.cpp */; }; E49912B8174E5D9900741B6D /* SpecialProtocolFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D68D1444A8B0007C6459 /* SpecialProtocolFile.cpp */; }; E49912B9174E5D9900741B6D /* StackDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E17590D25F9FA00618676 /* StackDirectory.cpp */; }; - E49912BA174E5D9900741B6D /* TuxBoxDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D68F1444A8B0007C6459 /* TuxBoxDirectory.cpp */; }; - E49912BB174E5D9900741B6D /* TuxBoxFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D6911444A8B0007C6459 /* TuxBoxFile.cpp */; }; E49912BC174E5D9900741B6D /* udf25.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 433219D312E4C6A500CD7486 /* udf25.cpp */; }; E49912BD174E5D9900741B6D /* UDFDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 433219D512E4C6A500CD7486 /* UDFDirectory.cpp */; }; E49912BE174E5D9900741B6D /* UDFFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D6931444A8B0007C6459 /* UDFFile.cpp */; }; @@ -3018,7 +3010,6 @@ E4991479174E605900741B6D /* TextSearch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C848291D156D003E005A996F /* TextSearch.cpp */; }; E499147A174E605900741B6D /* TimeSmoother.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CEE2E5913D6B71E000ABF2A /* TimeSmoother.cpp */; }; E499147B174E605900741B6D /* TimeUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CCF7FC7106A0DF500992676 /* TimeUtils.cpp */; }; - E499147C174E605900741B6D /* TuxBoxUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E1E890D25F9FD00618676 /* TuxBoxUtil.cpp */; }; E499147D174E605900741B6D /* URIUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 18B7C8EC12942613009E7A26 /* URIUtils.cpp */; }; E499147E174E605900741B6D /* UrlOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 36A9466815CF1FED00727135 /* UrlOptions.cpp */; }; E499147F174E605900741B6D /* Variant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CF1FB09123B1AF000B2CBCB /* Variant.cpp */; }; @@ -4699,10 +4690,6 @@ DF93D68C1444A8B0007C6459 /* SMBFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SMBFile.h; sourceTree = "<group>"; }; DF93D68D1444A8B0007C6459 /* SpecialProtocolFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpecialProtocolFile.cpp; sourceTree = "<group>"; }; DF93D68E1444A8B0007C6459 /* SpecialProtocolFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpecialProtocolFile.h; sourceTree = "<group>"; }; - DF93D68F1444A8B0007C6459 /* TuxBoxDirectory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TuxBoxDirectory.cpp; sourceTree = "<group>"; }; - DF93D6901444A8B0007C6459 /* TuxBoxDirectory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TuxBoxDirectory.h; sourceTree = "<group>"; }; - DF93D6911444A8B0007C6459 /* TuxBoxFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TuxBoxFile.cpp; sourceTree = "<group>"; }; - DF93D6921444A8B0007C6459 /* TuxBoxFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TuxBoxFile.h; sourceTree = "<group>"; }; DF93D6931444A8B0007C6459 /* UDFFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UDFFile.cpp; sourceTree = "<group>"; }; DF93D6941444A8B0007C6459 /* UDFFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UDFFile.h; sourceTree = "<group>"; }; DF93D6951444A8B0007C6459 /* UPnPFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UPnPFile.cpp; sourceTree = "<group>"; }; @@ -5580,8 +5567,6 @@ E38E1E840D25F9FD00618676 /* SystemInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SystemInfo.h; sourceTree = "<group>"; }; E38E1E850D25F9FD00618676 /* Thread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Thread.cpp; sourceTree = "<group>"; }; E38E1E860D25F9FD00618676 /* Thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Thread.h; sourceTree = "<group>"; }; - E38E1E890D25F9FD00618676 /* TuxBoxUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TuxBoxUtil.cpp; sourceTree = "<group>"; }; - E38E1E8A0D25F9FD00618676 /* TuxBoxUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TuxBoxUtil.h; sourceTree = "<group>"; }; E38E1E8B0D25F9FD00618676 /* UdpClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UdpClient.cpp; sourceTree = "<group>"; }; E38E1E8C0D25F9FD00618676 /* UdpClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UdpClient.h; sourceTree = "<group>"; }; E38E1E8D0D25F9FD00618676 /* Weather.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Weather.cpp; sourceTree = "<group>"; }; @@ -9076,10 +9061,6 @@ DF93D68E1444A8B0007C6459 /* SpecialProtocolFile.h */, E38E17590D25F9FA00618676 /* StackDirectory.cpp */, E38E175A0D25F9FA00618676 /* StackDirectory.h */, - DF93D68F1444A8B0007C6459 /* TuxBoxDirectory.cpp */, - DF93D6901444A8B0007C6459 /* TuxBoxDirectory.h */, - DF93D6911444A8B0007C6459 /* TuxBoxFile.cpp */, - DF93D6921444A8B0007C6459 /* TuxBoxFile.h */, 433219D312E4C6A500CD7486 /* udf25.cpp */, 433219D412E4C6A500CD7486 /* udf25.h */, 433219D512E4C6A500CD7486 /* UDFDirectory.cpp */, @@ -9628,8 +9609,6 @@ 7CEE2E5A13D6B71E000ABF2A /* TimeSmoother.h */, 7CCF7FC7106A0DF500992676 /* TimeUtils.cpp */, 7CCF7FC8106A0DF500992676 /* TimeUtils.h */, - E38E1E890D25F9FD00618676 /* TuxBoxUtil.cpp */, - E38E1E8A0D25F9FD00618676 /* TuxBoxUtil.h */, 18B7C8EC12942613009E7A26 /* URIUtils.cpp */, 18B7C8ED12942613009E7A26 /* URIUtils.h */, 36A9466815CF1FED00727135 /* UrlOptions.cpp */, @@ -10765,7 +10744,6 @@ E38E22F20D25F9FE00618676 /* Stopwatch.cpp in Sources */, E38E22F30D25F9FE00618676 /* SystemInfo.cpp in Sources */, E38E22F40D25F9FE00618676 /* Thread.cpp in Sources */, - E38E22F60D25F9FE00618676 /* TuxBoxUtil.cpp in Sources */, E38E22F70D25F9FE00618676 /* UdpClient.cpp in Sources */, E38E22F80D25F9FE00618676 /* Weather.cpp in Sources */, E38E22FB0D25F9FE00618676 /* VideoDatabase.cpp in Sources */, @@ -11158,8 +11136,6 @@ DF93D6AD1444A8B1007C6459 /* SMBFile.cpp in Sources */, DF93D6AE1444A8B1007C6459 /* SpecialProtocolFile.cpp in Sources */, DF6A0D811A4584E80075BBFC /* OverrideDirectory.cpp in Sources */, - DF93D6AF1444A8B1007C6459 /* TuxBoxDirectory.cpp in Sources */, - DF93D6B01444A8B1007C6459 /* TuxBoxFile.cpp in Sources */, DF93D6B11444A8B1007C6459 /* UDFFile.cpp in Sources */, DF93D6B21444A8B1007C6459 /* UPnPFile.cpp in Sources */, DF93D6B31444A8B1007C6459 /* ZipFile.cpp in Sources */, @@ -11866,8 +11842,6 @@ DFF0F24E17528350002DA3A4 /* SpecialProtocolDirectory.cpp in Sources */, DFF0F24F17528350002DA3A4 /* SpecialProtocolFile.cpp in Sources */, DFF0F25017528350002DA3A4 /* StackDirectory.cpp in Sources */, - DFF0F25117528350002DA3A4 /* TuxBoxDirectory.cpp in Sources */, - DFF0F25217528350002DA3A4 /* TuxBoxFile.cpp in Sources */, DFF0F25317528350002DA3A4 /* udf25.cpp in Sources */, DFF0F25417528350002DA3A4 /* UDFDirectory.cpp in Sources */, DFF0F25517528350002DA3A4 /* UDFFile.cpp in Sources */, @@ -12291,7 +12265,6 @@ DFF0F3F517528350002DA3A4 /* TextSearch.cpp in Sources */, DFF0F3F617528350002DA3A4 /* TimeSmoother.cpp in Sources */, DFF0F3F717528350002DA3A4 /* TimeUtils.cpp in Sources */, - DFF0F3F817528350002DA3A4 /* TuxBoxUtil.cpp in Sources */, DFF0F3F917528350002DA3A4 /* URIUtils.cpp in Sources */, DFF0F3FA17528350002DA3A4 /* UrlOptions.cpp in Sources */, DFF0F3FB17528350002DA3A4 /* Variant.cpp in Sources */, @@ -12951,8 +12924,6 @@ E49912B7174E5D9900741B6D /* SpecialProtocolDirectory.cpp in Sources */, E49912B8174E5D9900741B6D /* SpecialProtocolFile.cpp in Sources */, E49912B9174E5D9900741B6D /* StackDirectory.cpp in Sources */, - E49912BA174E5D9900741B6D /* TuxBoxDirectory.cpp in Sources */, - E49912BB174E5D9900741B6D /* TuxBoxFile.cpp in Sources */, E49912BC174E5D9900741B6D /* udf25.cpp in Sources */, E49912BD174E5D9900741B6D /* UDFDirectory.cpp in Sources */, E49912BE174E5D9900741B6D /* UDFFile.cpp in Sources */, @@ -13375,7 +13346,6 @@ E4991479174E605900741B6D /* TextSearch.cpp in Sources */, E499147A174E605900741B6D /* TimeSmoother.cpp in Sources */, E499147B174E605900741B6D /* TimeUtils.cpp in Sources */, - E499147C174E605900741B6D /* TuxBoxUtil.cpp in Sources */, E499147D174E605900741B6D /* URIUtils.cpp in Sources */, E499147E174E605900741B6D /* UrlOptions.cpp in Sources */, E499147F174E605900741B6D /* Variant.cpp in Sources */, diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po index 6985299d80..74fb11b2dc 100644 --- a/addons/resource.language.en_gb/resources/strings.po +++ b/addons/resource.language.en_gb/resources/strings.po @@ -11071,38 +11071,14 @@ msgctxt "#21330" msgid "Show hidden files and directories" msgstr "" -#: xbmc/network/GUIDialogNetworkSetup.cpp -msgctxt "#21331" -msgid "TuxBox client" -msgstr "" - -msgctxt "#21332" -msgid "WARNING: Target TuxBox device is in recording-mode!" -msgstr "" - -msgctxt "#21333" -msgid "The stream will be stopped!" -msgstr "" - -msgctxt "#21334" -msgid "Zap to channel: %s failed!" -msgstr "" - -msgctxt "#21335" -msgid "Are you sure to start the stream?" -msgstr "" +#empty strings from id 21331 to 21335 #: xbmc/peripherals/devices/peripheralcecadapter.cpp msgctxt "#21336" msgid "Connecting to: %s" msgstr "" -msgctxt "#21337" -msgid "TuxBox device" -msgstr "" - -#empty strings from id 21338 to 21358 -#up to 21355 is reserved for the TuxBox Client!! ! +#empty strings from id 2133i7 to 21358 #: xbmc/dialogs/GUIDialogFileBrowser.cpp msgctxt "#21359" diff --git a/project/VS2010Express/XBMC.vcxproj b/project/VS2010Express/XBMC.vcxproj index d180647133..04e2dd2bf4 100644 --- a/project/VS2010Express/XBMC.vcxproj +++ b/project/VS2010Express/XBMC.vcxproj @@ -394,8 +394,6 @@ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> </ClCompile> - <ClCompile Include="..\..\xbmc\filesystem\TuxBoxDirectory.cpp" /> - <ClCompile Include="..\..\xbmc\filesystem\TuxBoxFile.cpp" /> <ClCompile Include="..\..\xbmc\filesystem\udf25.cpp" /> <ClCompile Include="..\..\xbmc\filesystem\UDFDirectory.cpp" /> <ClCompile Include="..\..\xbmc\filesystem\UDFFile.cpp" /> @@ -1153,8 +1151,6 @@ <ClInclude Include="..\..\xbmc\filesystem\SpecialProtocolDirectory.h" /> <ClInclude Include="..\..\xbmc\filesystem\SpecialProtocolFile.h" /> <ClInclude Include="..\..\xbmc\filesystem\StackDirectory.h" /> - <ClInclude Include="..\..\xbmc\filesystem\TuxBoxDirectory.h" /> - <ClInclude Include="..\..\xbmc\filesystem\TuxBoxFile.h" /> <ClInclude Include="..\..\xbmc\filesystem\udf25.h" /> <ClInclude Include="..\..\xbmc\filesystem\UDFDirectory.h" /> <ClInclude Include="..\..\xbmc\filesystem\UDFFile.h" /> @@ -1469,7 +1465,6 @@ </ClCompile> <ClCompile Include="..\..\xbmc\utils\TimeSmoother.cpp" /> <ClCompile Include="..\..\xbmc\utils\TimeUtils.cpp" /> - <ClCompile Include="..\..\xbmc\utils\TuxBoxUtil.cpp" /> <ClCompile Include="..\..\xbmc\utils\URIUtils.cpp" /> <ClCompile Include="..\..\xbmc\utils\UrlOptions.cpp" /> <ClCompile Include="..\..\xbmc\utils\Variant.cpp" /> @@ -2162,7 +2157,6 @@ <ClInclude Include="..\..\xbmc\utils\TextSearch.h" /> <ClInclude Include="..\..\xbmc\utils\TimeSmoother.h" /> <ClInclude Include="..\..\xbmc\utils\TimeUtils.h" /> - <ClInclude Include="..\..\xbmc\utils\TuxBoxUtil.h" /> <ClInclude Include="..\..\xbmc\utils\URIUtils.h" /> <ClInclude Include="..\..\xbmc\utils\UrlOptions.h" /> <ClInclude Include="..\..\xbmc\utils\Variant.h" /> diff --git a/project/VS2010Express/XBMC.vcxproj.filters b/project/VS2010Express/XBMC.vcxproj.filters index d32f6e0caa..66f6bc889a 100644 --- a/project/VS2010Express/XBMC.vcxproj.filters +++ b/project/VS2010Express/XBMC.vcxproj.filters @@ -1525,9 +1525,6 @@ <ClCompile Include="..\..\xbmc\utils\TimeUtils.cpp"> <Filter>utils</Filter> </ClCompile> - <ClCompile Include="..\..\xbmc\utils\TuxBoxUtil.cpp"> - <Filter>utils</Filter> - </ClCompile> <ClCompile Include="..\..\xbmc\utils\URIUtils.cpp"> <Filter>utils</Filter> </ClCompile> @@ -2185,12 +2182,6 @@ <ClCompile Include="..\..\xbmc\filesystem\StackDirectory.cpp"> <Filter>filesystem</Filter> </ClCompile> - <ClCompile Include="..\..\xbmc\filesystem\TuxBoxDirectory.cpp"> - <Filter>filesystem</Filter> - </ClCompile> - <ClCompile Include="..\..\xbmc\filesystem\TuxBoxFile.cpp"> - <Filter>filesystem</Filter> - </ClCompile> <ClCompile Include="..\..\xbmc\filesystem\udf25.cpp"> <Filter>filesystem</Filter> </ClCompile> @@ -4573,9 +4564,6 @@ <ClInclude Include="..\..\xbmc\utils\TimeUtils.h"> <Filter>utils</Filter> </ClInclude> - <ClInclude Include="..\..\xbmc\utils\TuxBoxUtil.h"> - <Filter>utils</Filter> - </ClInclude> <ClInclude Include="..\..\xbmc\utils\URIUtils.h"> <Filter>utils</Filter> </ClInclude> @@ -5233,12 +5221,6 @@ <ClInclude Include="..\..\xbmc\filesystem\StackDirectory.h"> <Filter>filesystem</Filter> </ClInclude> - <ClInclude Include="..\..\xbmc\filesystem\TuxBoxDirectory.h"> - <Filter>filesystem</Filter> - </ClInclude> - <ClInclude Include="..\..\xbmc\filesystem\TuxBoxFile.h"> - <Filter>filesystem</Filter> - </ClInclude> <ClInclude Include="..\..\xbmc\filesystem\udf25.h"> <Filter>filesystem</Filter> </ClInclude> diff --git a/userdata/PictureIcon/Picon/tuxbox.png b/userdata/PictureIcon/Picon/tuxbox.png Binary files differdeleted file mode 100644 index 5f40e8e45e..0000000000 --- a/userdata/PictureIcon/Picon/tuxbox.png +++ /dev/null diff --git a/userdata/PictureIcon/Readme.txt b/userdata/PictureIcon/Readme.txt deleted file mode 100644 index a69a57c421..0000000000 --- a/userdata/PictureIcon/Readme.txt +++ /dev/null @@ -1,24 +0,0 @@ -xbmc tuxbox client - -pictureIcon - -you can define your own picture icon for the channel -1. open and edit the picon.xml file - name: is the channel name - png: is the filename for the channel (defaul picon size: 128x128 pixel) - <service name="das erste" png="ard.png" /> -2. put the png file into the folder: \Picon\*.* - - -that's all! after connecting to your tuxbox device and listing the channels, -the defined picon in picon.xml will be used. - -you can also use the enigma "Picon plugin" (picon.xml and the icons!) -which can be download from several places. just unpack it and -copy the picon.xml and picon to this folder! - - -15.01.2005 -GeminiServer - - diff --git a/userdata/PictureIcon/picon.xml b/userdata/PictureIcon/picon.xml deleted file mode 100644 index 8a32a26c4a..0000000000 --- a/userdata/PictureIcon/picon.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- XBMC TuxBox Client - PictureIcon XML!--> -<!-- 15.01.2007 GeminiServer !--> -<picon> - <services> - <!-- name: here comes the channel name !--> - <!-- png: this is the picture icon png file, which must be located in \Picon\*.* folder!--> - <service name="tuxbox" png="tuxbox.png" /> - </services> -</picon>
\ No newline at end of file diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index 06537f8743..fc5d68a7f0 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -74,7 +74,6 @@ #ifdef HAS_FILESYSTEM_HTSP #include "filesystem/HTSPDirectory.h" #endif -#include "utils/TuxBoxUtil.h" #include "utils/SystemInfo.h" #include "utils/TimeUtils.h" #include "GUILargeTextureManager.h" @@ -2968,35 +2967,6 @@ PlayBackRet CApplication::PlayFile(const CFileItem& item, bool bRestart) if (item.IsStack()) return PlayStack(item, bRestart); - //Is TuxBox, this should probably be moved to CTuxBoxFile - if(item.IsTuxBox()) - { - CLog::LogF(LOGDEBUG, "TuxBox URL Detected %s",item.GetPath().c_str()); - - if(g_tuxboxService.IsRunning()) - g_tuxboxService.Stop(); - - PlayBackRet ret = PLAYBACK_FAIL; - CFileItem item_new; - if(g_tuxbox.CreateNewItem(item, item_new)) - { - - // Make sure it doesn't have a player - // so we actually select one normally - m_pPlayer->ResetPlayer(); - - // keep the tuxbox:// url as playing url - // and give the new url to the player - ret = PlayFile(item_new, true); - if(ret == PLAYBACK_OK) - { - if(!g_tuxboxService.IsRunning()) - g_tuxboxService.Start(); - } - } - return ret; - } - CPlayerOptions options; if( item.HasProperty("StartPercent") ) diff --git a/xbmc/FileItem.cpp b/xbmc/FileItem.cpp index c2c7f67dd7..127494c4d0 100644 --- a/xbmc/FileItem.cpp +++ b/xbmc/FileItem.cpp @@ -39,7 +39,6 @@ #include "CueDocument.h" #include "video/VideoDatabase.h" #include "music/MusicDatabase.h" -#include "utils/TuxBoxUtil.h" #include "epg/Epg.h" #include "pvr/channels/PVRChannel.h" #include "pvr/recordings/PVRRecording.h" @@ -275,8 +274,7 @@ CFileItem::CFileItem(const CURL& path, bool bIsFolder) Initialize(); m_strPath = path.Get(); m_bIsFolder = bIsFolder; - // tuxbox urls cannot have a / at end - if (m_bIsFolder && !m_strPath.empty() && !IsFileFolder() && !URIUtils::IsTuxBox(m_strPath)) + if (m_bIsFolder && !m_strPath.empty() && !IsFileFolder()); URIUtils::AddSlashAtEnd(m_strPath); FillInMimeType(false); } @@ -286,8 +284,7 @@ CFileItem::CFileItem(const std::string& strPath, bool bIsFolder) Initialize(); m_strPath = strPath; m_bIsFolder = bIsFolder; - // tuxbox urls cannot have a / at end - if (m_bIsFolder && !m_strPath.empty() && !IsFileFolder() && !URIUtils::IsTuxBox(m_strPath)) + if (m_bIsFolder && !m_strPath.empty() && !IsFileFolder()); URIUtils::AddSlashAtEnd(m_strPath); FillInMimeType(false); } @@ -684,7 +681,7 @@ bool CFileItem::IsVideo() const if (HasPictureInfoTag()) return false; if (IsPVRRecording()) return true; - if (IsHDHomeRun() || IsTuxBox() || URIUtils::IsDVD(m_strPath) || IsSlingbox()) + if (IsHDHomeRun() || URIUtils::IsDVD(m_strPath) || IsSlingbox()) return true; std::string extension; @@ -1048,11 +1045,6 @@ bool CFileItem::IsDAAP() const return URIUtils::IsDAAP(m_strPath); } -bool CFileItem::IsTuxBox() const -{ - return URIUtils::IsTuxBox(m_strPath); -} - bool CFileItem::IsMythTV() const { return URIUtils::IsMythTV(m_strPath); diff --git a/xbmc/FileItem.h b/xbmc/FileItem.h index 6eab44f4d0..c748462b4f 100644 --- a/xbmc/FileItem.h +++ b/xbmc/FileItem.h @@ -221,7 +221,6 @@ public: bool IsParentFolder() const; bool IsFileFolder(EFileFolderType types = EFILEFOLDER_MASK_ALL) const; bool IsRemovable() const; - bool IsTuxBox() const; bool IsMythTV() const; bool IsHDHomeRun() const; bool IsSlingbox() const; diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp index a6b2052425..b11e44ff69 100644 --- a/xbmc/GUIInfoManager.cpp +++ b/xbmc/GUIInfoManager.cpp @@ -42,7 +42,6 @@ #include "guilib/GUIWindowManager.h" #include "playlists/PlayList.h" #include "profiles/ProfilesManager.h" -#include "utils/TuxBoxUtil.h" #include "windowing/WindowingFactory.h" #include "powermanagement/PowerManager.h" #include "settings/AdvancedSettings.h" @@ -3521,7 +3520,7 @@ std::string CGUIInfoManager::GetDuration(TIME_FORMAT format) const return StringUtils::SecondsToTimeString(tag.GetDuration(), format); } if (g_application.m_pPlayer->IsPlayingVideo() && !m_currentMovieDuration.empty()) - return m_currentMovieDuration; // for tuxbox + return m_currentMovieDuration; unsigned int iTotal = (unsigned int)g_application.GetTotalTime(); if (iTotal > 0) return StringUtils::SecondsToTimeString(iTotal, format); @@ -5334,51 +5333,6 @@ void CGUIInfoManager::ResetCache() (*i)->SetDirty(); } -// Called from tuxbox service thread to update current status -void CGUIInfoManager::UpdateFromTuxBox() -{ - if(g_tuxbox.vVideoSubChannel.mode) - m_currentFile->GetVideoInfoTag()->m_strTitle = g_tuxbox.vVideoSubChannel.current_name; - - // Set m_currentMovieDuration - if(!g_tuxbox.sCurSrvData.current_event_duration.empty() && - !g_tuxbox.sCurSrvData.next_event_description.empty() && - g_tuxbox.sCurSrvData.current_event_duration != "-" && - g_tuxbox.sCurSrvData.next_event_description != "-") - { - StringUtils::Replace(g_tuxbox.sCurSrvData.current_event_duration, "(",""); - StringUtils::Replace(g_tuxbox.sCurSrvData.current_event_duration, ")",""); - - m_currentMovieDuration = StringUtils::Format("%s: %s %s (%s - %s)", - g_localizeStrings.Get(180).c_str(), - g_tuxbox.sCurSrvData.current_event_duration.c_str(), - g_localizeStrings.Get(12391).c_str(), - g_tuxbox.sCurSrvData.current_event_time.c_str(), - g_tuxbox.sCurSrvData.next_event_time.c_str()); - } - - //Set strVideoGenre - if (!g_tuxbox.sCurSrvData.current_event_description.empty() && - !g_tuxbox.sCurSrvData.next_event_description.empty() && - g_tuxbox.sCurSrvData.current_event_description != "-" && - g_tuxbox.sCurSrvData.next_event_description != "-") - { - std::string genre = StringUtils::Format("%s %s - (%s: %s)", - g_localizeStrings.Get(143).c_str(), - g_tuxbox.sCurSrvData.current_event_description.c_str(), - g_localizeStrings.Get(209).c_str(), - g_tuxbox.sCurSrvData.next_event_description.c_str()); - m_currentFile->GetVideoInfoTag()->m_genre = StringUtils::Split(genre, g_advancedSettings.m_videoItemSeparator); - } - - //Set m_currentMovie.m_director - if (g_tuxbox.sCurSrvData.current_event_details != "-" && - !g_tuxbox.sCurSrvData.current_event_details.empty()) - { - m_currentFile->GetVideoInfoTag()->m_director = StringUtils::Split(g_tuxbox.sCurSrvData.current_event_details, g_advancedSettings.m_videoItemSeparator); - } -} - std::string CGUIInfoManager::GetPictureLabel(int info) { if (info == SLIDE_FILE_NAME) diff --git a/xbmc/GUIInfoManager.h b/xbmc/GUIInfoManager.h index 3ccd4f9bcc..88f14601b2 100644 --- a/xbmc/GUIInfoManager.h +++ b/xbmc/GUIInfoManager.h @@ -828,9 +828,6 @@ public: std::string GetItemLabel(const CFileItem *item, int info, std::string *fallback = NULL); std::string GetItemImage(const CFileItem *item, int info, std::string *fallback = NULL); - // Called from tuxbox service thread to update current status - void UpdateFromTuxBox(); - /*! \brief containers call here to specify that the focus is changing \param id control id \param next true if we're moving to the next item, false if previous diff --git a/xbmc/URL.cpp b/xbmc/URL.cpp index 6b13a57ed4..e7eab6fd62 100644 --- a/xbmc/URL.cpp +++ b/xbmc/URL.cpp @@ -460,7 +460,6 @@ const std::string CURL::GetTranslatedProtocol() const if (IsProtocol("shout") || IsProtocol("daap") || IsProtocol("dav") - || IsProtocol("tuxbox") || IsProtocol("rss")) return "http"; diff --git a/xbmc/Util.cpp b/xbmc/Util.cpp index 1f48ca684c..53edfa778b 100644 --- a/xbmc/Util.cpp +++ b/xbmc/Util.cpp @@ -509,8 +509,7 @@ bool CUtil::IsLiveTV(const std::string& strFile) if (StringUtils::StartsWithNoCase(strFile, "pvr://channels")) return true; - if(URIUtils::IsTuxBox(strFile) - || URIUtils::IsVTP(strFile) + if(URIUtils::IsVTP(strFile) || URIUtils::IsHDHomeRun(strFile) || URIUtils::IsHTSP(strFile) || StringUtils::StartsWithNoCase(strFile, "sap:")) @@ -1192,8 +1191,6 @@ int CUtil::GetMatchingSource(const std::string& strPath1, VECSOURCES& VECSOURCES if (checkURL.IsProtocol("shout")) strPath = checkURL.GetHostName(); - if (checkURL.IsProtocol("tuxbox")) - return 1; if (checkURL.IsProtocol("plugin")) return 1; if (checkURL.IsProtocol("multipath")) diff --git a/xbmc/filesystem/DirectoryFactory.cpp b/xbmc/filesystem/DirectoryFactory.cpp index 327d815524..f1459d34cf 100644 --- a/xbmc/filesystem/DirectoryFactory.cpp +++ b/xbmc/filesystem/DirectoryFactory.cpp @@ -93,7 +93,6 @@ #ifdef HAS_FILESYSTEM_RAR #include "RarDirectory.h" #endif -#include "TuxBoxDirectory.h" #include "HDHomeRunDirectory.h" #include "SlingboxDirectory.h" #include "MythDirectory.h" @@ -189,7 +188,6 @@ IDirectory* CDirectoryFactory::Create(const CURL& url) bool networkAvailable = g_application.getNetwork().IsAvailable(true); // true to wait for the network (if possible) if (networkAvailable) { - if (url.IsProtocol("tuxbox")) return new CTuxBoxDirectory(); if (url.IsProtocol("ftp") || url.IsProtocol("ftps")) return new CFTPDirectory(); if (url.IsProtocol("http") || url.IsProtocol("https")) return new CHTTPDirectory(); if (url.IsProtocol("dav") || url.IsProtocol("davs")) return new CDAVDirectory(); diff --git a/xbmc/filesystem/FileFactory.cpp b/xbmc/filesystem/FileFactory.cpp index 38c6814775..2a74eb39b7 100644 --- a/xbmc/filesystem/FileFactory.cpp +++ b/xbmc/filesystem/FileFactory.cpp @@ -92,7 +92,6 @@ #include "MusicDatabaseFile.h" #include "SpecialProtocolFile.h" #include "MultiPathFile.h" -#include "TuxBoxFile.h" #include "UDFFile.h" #include "MythFile.h" #include "HDHomeRunFile.h" @@ -172,7 +171,6 @@ IFile* CFileFactory::CreateLoader(const CURL& url) else if (url.IsProtocol("sftp") || url.IsProtocol("ssh")) return new CSFTPFile(); #endif else if (url.IsProtocol("shout")) return new CShoutcastFile(); - else if (url.IsProtocol("tuxbox")) return new CTuxBoxFile(); else if (url.IsProtocol("hdhomerun")) return new CHomeRunFile(); else if (url.IsProtocol("sling")) return new CSlingboxFile(); else if (url.IsProtocol("myth")) return new CMythFile(); diff --git a/xbmc/filesystem/Makefile.in b/xbmc/filesystem/Makefile.in index 7cb3de87f0..0088ddb1fe 100644 --- a/xbmc/filesystem/Makefile.in +++ b/xbmc/filesystem/Makefile.in @@ -80,8 +80,6 @@ SRCS += SpecialProtocol.cpp SRCS += SpecialProtocolDirectory.cpp SRCS += SpecialProtocolFile.cpp SRCS += StackDirectory.cpp -SRCS += TuxBoxDirectory.cpp -SRCS += TuxBoxFile.cpp SRCS += udf25.cpp SRCS += UDFDirectory.cpp SRCS += UDFFile.cpp diff --git a/xbmc/filesystem/TuxBoxDirectory.cpp b/xbmc/filesystem/TuxBoxDirectory.cpp deleted file mode 100644 index c33906b130..0000000000 --- a/xbmc/filesystem/TuxBoxDirectory.cpp +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Copyright (C) 2005-2013 Team XBMC - * http://xbmc.org - * - * 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, 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 XBMC; see the file COPYING. If not, see - * <http://www.gnu.org/licenses/>. - * - */ - -#include "TuxBoxDirectory.h" -#include "DirectoryCache.h" -#include "CurlFile.h" -#include "utils/HttpHeader.h" -#include "utils/TuxBoxUtil.h" -#include "URL.h" -#include "utils/XBMCTinyXML.h" -#include "settings/AdvancedSettings.h" -#include "FileItem.h" -#include "utils/log.h" -#include "utils/URIUtils.h" -#include "utils/StringUtils.h" - -using namespace XFILE; - -CTuxBoxDirectory::CTuxBoxDirectory(void) -{ -} - -CTuxBoxDirectory::~CTuxBoxDirectory(void) -{ -} - -bool CTuxBoxDirectory::GetDirectory(const CURL& url2, CFileItemList &items) -{ - const std::string strPath = url2.Get(); - // so we know that we have enigma2 - static bool enigma2 = false; - // Detect and delete slash at end - std::string strRoot = strPath; - URIUtils::RemoveSlashAtEnd(strRoot); - - //Get the request strings - std::string strBQRequest; - std::string strXMLRootString; - std::string strXMLChildString; - if(!GetRootAndChildString(strRoot, strBQRequest, strXMLRootString, strXMLChildString)) - return false; - - //Set url Protocol - CURL url(strRoot); - std::string strFilter; - std::string protocol = url.GetProtocol(); - url.SetProtocol("http"); - bool bIsBouquet=false; - - if (url.HasOption("path")) - { - // send Zap! - return g_tuxbox.ZapToUrl(url, url.GetOption("path")); - } - else - { - if (url.HasOption("reference") || enigma2) - { - //List reference - strFilter = url.GetOption("reference"); - bIsBouquet = false; //On Empty is Bouquet - if (enigma2) - { - std::string strPort = StringUtils::Format(":%i",url.GetPort()); - if (!StringUtils::EndsWith(strRoot, strPort)) // If not root dir, enable Channels - strFilter = "e2"; // Disable Bouquets for Enigma2 - - GetRootAndChildStringEnigma2(strBQRequest, strXMLRootString, strXMLChildString); - } - url.SetOptions(""); - url.SetFileName(strBQRequest); - } - } - if(strFilter.empty()) - { - url.SetOptions(""); - url.SetFileName(strBQRequest); - bIsBouquet = true; - } - //Open - CCurlFile http; - int iTryConnect = 0; - int iWaitTimer = 20; - bool result = false; - - while (iTryConnect < 4) - { - http.SetTimeout(iWaitTimer); - if(http.Open(url)) - { - //We are connected! - iTryConnect = 4; - - // restore protocol - url.SetProtocol(protocol); - - int size_read = 0; - int size_total = (int)http.GetLength(); - int data_size = 0; - std::string data; - data.reserve(size_total); - - // read response from server into string buffer - char buffer[16384]; - while ((size_read = http.Read(buffer, sizeof(buffer)-1)) > 0) - { - buffer[size_read] = 0; - data += buffer; - data_size += size_read; - } - http.Close(); - - // parse returned xml - CXBMCTinyXML doc; - StringUtils::Replace(data, "></",">-</"); //FILL EMPTY ELEMENTS WITH "-"! - doc.Parse(data, http.GetServerReportedCharset()); - TiXmlElement *root = doc.RootElement(); - if(root == NULL) - { - CLog::Log(LOGERROR, "%s - Unable to parse xml", __FUNCTION__); - CLog::Log(LOGERROR, "%s - Sample follows...\n%s", __FUNCTION__, data.c_str()); - return false; - } - if(strXMLRootString == root->Value() && bIsBouquet) - { - data.clear(); - if (enigma2) - result = g_tuxbox.ParseBouquetsEnigma2(root, items, url, strFilter, strXMLChildString); - else - result = g_tuxbox.ParseBouquets(root, items, url, strFilter, strXMLChildString); - } - else if( strXMLRootString == root->Value() && !strFilter.empty() ) - { - data.clear(); - if (enigma2) - result = g_tuxbox.ParseChannelsEnigma2(root, items, url, strFilter, strXMLChildString); - else - result = g_tuxbox.ParseChannels(root, items, url, strFilter, strXMLChildString); - } - else - { - CLog::Log(LOGERROR, "%s - Invalid root xml element for TuxBox", __FUNCTION__); - CLog::Log(LOGERROR, "%s - Sample follows...\n%s", __FUNCTION__, data.c_str()); - data.clear(); - result = false; - } - } - else - { - CLog::Log(LOGERROR, "%s - Unable to get XML structure! Try count:%i, Wait Timer:%is",__FUNCTION__, iTryConnect, iWaitTimer); - iTryConnect++; - if (iTryConnect == 2) //try enigma2 instead of enigma1, best entrypoint here i thought - { - enigma2 = true; - GetRootAndChildStringEnigma2(strBQRequest, strXMLRootString, strXMLChildString); - url.SetOptions(""); - url.SetFileName(strBQRequest); -// iTryConnect = 0; - iWaitTimer = 20; - } - else - iWaitTimer = iWaitTimer+10; - - result = false; - http.Close(); // Close old connections - } - } - items.SetContent("movies"); - return result; -} - -void CTuxBoxDirectory::GetRootAndChildStringEnigma2(std::string& strBQRequest, std::string& strXMLRootString, std::string& strXMLChildString ) -{ - // Allways take getallservices for Enigma2 - strBQRequest = "web/getallservices"; //Bouquets and Channels - strXMLRootString = StringUtils::Format("e2servicelistrecursive"); - strXMLChildString = StringUtils::Format("e2bouquet"); -} - -bool CTuxBoxDirectory::GetRootAndChildString(const std::string& strPath, std::string& strBQRequest, std::string& strXMLRootString, std::string& strXMLChildString ) -{ - //Advanced Settings: RootMode! Movies: - if(g_advancedSettings.m_iTuxBoxDefaultRootMenu == 3) //Movies! Fixed-> mode=3&submode=4 - { - CLog::Log(LOGDEBUG, "%s - Default defined RootMenu : (3) Movies", __FUNCTION__); - strBQRequest = "xml/services?mode=3&submode=4"; - strXMLRootString = StringUtils::Format("movies"); - strXMLChildString = StringUtils::Format("service"); - } - else if(g_advancedSettings.m_iTuxBoxDefaultRootMenu <= 0 || g_advancedSettings.m_iTuxBoxDefaultRootMenu == 1 || - g_advancedSettings.m_iTuxBoxDefaultRootMenu > 4 ) - { - //Falling Back to the Default RootMenu => 0 Bouquets - if(g_advancedSettings.m_iTuxBoxDefaultRootMenu < 0 || g_advancedSettings.m_iTuxBoxDefaultRootMenu > 4) - { - g_advancedSettings.m_iTuxBoxDefaultRootMenu = 0; - } - - //Advanced Settings: SubMenu! - if(g_advancedSettings.m_bTuxBoxSubMenuSelection) - { - CLog::Log(LOGDEBUG, "%s SubMenu Channel Selection is Enabled! Requesting Submenu!", __FUNCTION__); - // DeActivated: Timing Problems, bug in TuxBox.. etc.! - bool bReqMoRe = true; - // Detect the RootMode ! - if (strPath.find("?mode=") != std::string::npos) - { - std::string strMode; - bReqMoRe=false; - strMode = g_tuxbox.DetectSubMode(strPath, strXMLRootString, strXMLChildString); - } - if(bReqMoRe) - { - //PopUp Context and Request SubMode with root and child string - strBQRequest = g_tuxbox.GetSubMode(g_advancedSettings.m_iTuxBoxDefaultRootMenu, strXMLRootString, strXMLChildString); - if(strBQRequest.empty()) - { - strBQRequest = "xml/services?mode=0&submode=4"; //Bouquets - strXMLRootString = StringUtils::Format("bouquets"); - strXMLChildString = StringUtils::Format("bouquet"); - } - } - } - else - { - //Advanced Settings: Set Default Subemnu - if(g_advancedSettings.m_iTuxBoxDefaultSubMenu == 1) - { - CLog::Log(LOGDEBUG, "%s - Default defined SubMenu : (1) Services", __FUNCTION__); - strBQRequest = "xml/services?mode=0&submode=1"; //Services - strXMLRootString = StringUtils::Format("services"); - strXMLChildString = StringUtils::Format("service"); - } - else if(g_advancedSettings.m_iTuxBoxDefaultSubMenu == 2) - { - CLog::Log(LOGDEBUG, "%s - Default defined SubMenu : (2) Satellites", __FUNCTION__); - strBQRequest = "xml/services?mode=0&submode=2"; //Satellites - strXMLRootString = StringUtils::Format("satellites"); - strXMLChildString = StringUtils::Format("satellite"); - } - else if(g_advancedSettings.m_iTuxBoxDefaultSubMenu == 3) - { - CLog::Log(LOGDEBUG, "%s - Default defined SubMenu : (3) Providers", __FUNCTION__); - strBQRequest = "xml/services?mode=0&submode=3"; //Providers - strXMLRootString = StringUtils::Format("providers"); - strXMLChildString = StringUtils::Format("provider"); - } - else - { - CLog::Log(LOGDEBUG, "%s - Default defined SubMenu : (4) Bouquets", __FUNCTION__); - strBQRequest = "xml/services?mode=0&submode=4"; //Bouquets - strXMLRootString = StringUtils::Format("bouquets"); - strXMLChildString = StringUtils::Format("bouquet"); - } - } - } - if(strBQRequest.empty() || strXMLRootString.empty() || strXMLChildString.empty()) - return false; - else - return true; -} diff --git a/xbmc/filesystem/TuxBoxDirectory.h b/xbmc/filesystem/TuxBoxDirectory.h deleted file mode 100644 index ce3173a7fd..0000000000 --- a/xbmc/filesystem/TuxBoxDirectory.h +++ /dev/null @@ -1,43 +0,0 @@ -#pragma once -/* - * Copyright (C) 2005-2013 Team XBMC - * http://xbmc.org - * - * 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, 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 XBMC; see the file COPYING. If not, see - * <http://www.gnu.org/licenses/>. - * - */ - -#include "IDirectory.h" -#include <string> - -class CURL; -class TiXmlElement; - -namespace XFILE -{ - class CTuxBoxDirectory : public IDirectory - { - public: - CTuxBoxDirectory(void); - virtual ~CTuxBoxDirectory(void); - virtual bool GetDirectory(const CURL& url, CFileItemList &items); - virtual bool AllowAll() const { return true; } - virtual DIR_CACHE_TYPE GetCacheType(const CURL& url) const { return DIR_CACHE_ALWAYS; }; - private: - bool GetRootAndChildString(const std::string& strPath, std::string& strBQRequest, std::string& strXMLRootString, std::string& strXMLChildString ); - void GetRootAndChildStringEnigma2(std::string& strBQRequest, std::string& strXMLRootString, std::string& strXMLChildString ); - }; -} - diff --git a/xbmc/filesystem/TuxBoxFile.cpp b/xbmc/filesystem/TuxBoxFile.cpp deleted file mode 100644 index 8290035003..0000000000 --- a/xbmc/filesystem/TuxBoxFile.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2005-2013 Team XBMC - * http://xbmc.org - * - * 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, 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 XBMC; see the file COPYING. If not, see - * <http://www.gnu.org/licenses/>. - * - */ - -#include "TuxBoxFile.h" -#include <errno.h> - -//Reserved for TuxBox Recording! - -using namespace XFILE; - -CTuxBoxFile::CTuxBoxFile() -{} - -CTuxBoxFile::~CTuxBoxFile() -{ -} - -int64_t CTuxBoxFile::GetPosition() -{ - return 0; -} - -int64_t CTuxBoxFile::GetLength() -{ - return 0; -} - -bool CTuxBoxFile::Open(const CURL& url) -{ - return true; -} - -ssize_t CTuxBoxFile::Read(void* lpBuf, size_t uiBufSize) -{ - return -1; -} - -int64_t CTuxBoxFile::Seek(int64_t iFilePosition, int iWhence) -{ - return 0; -} - -void CTuxBoxFile::Close() -{ -} - -bool CTuxBoxFile::Exists(const CURL& url) -{ - return true; -} - -int CTuxBoxFile::Stat(const CURL& url, struct __stat64* buffer) -{ - errno = ENOENT; - return -1; -} - diff --git a/xbmc/filesystem/TuxBoxFile.h b/xbmc/filesystem/TuxBoxFile.h deleted file mode 100644 index 9498f459c3..0000000000 --- a/xbmc/filesystem/TuxBoxFile.h +++ /dev/null @@ -1,44 +0,0 @@ -#pragma once -/* - * Copyright (C) 2005-2013 Team XBMC - * http://xbmc.org - * - * 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, 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 XBMC; see the file COPYING. If not, see - * <http://www.gnu.org/licenses/>. - * - */ - -#include "IFile.h" - -namespace XFILE -{ - class CTuxBoxFile : public IFile - { - public: - CTuxBoxFile(); - virtual ~CTuxBoxFile(); - virtual int64_t GetPosition(); - virtual int64_t GetLength(); - virtual bool Open(const CURL& url); - virtual void Close(); - virtual bool Exists(const CURL& url); - virtual int Stat(const CURL& url, struct __stat64* buffer); - virtual ssize_t Read(void* lpBuf, size_t uiBufSize); - virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET); - protected: - }; -} - - - diff --git a/xbmc/network/GUIDialogNetworkSetup.cpp b/xbmc/network/GUIDialogNetworkSetup.cpp index d2b1ab6251..2716cbeffb 100644 --- a/xbmc/network/GUIDialogNetworkSetup.cpp +++ b/xbmc/network/GUIDialogNetworkSetup.cpp @@ -123,7 +123,6 @@ void CGUIDialogNetworkSetup::OnInitWindow() #ifdef HAS_MYSQL labels.push_back(make_pair(g_localizeStrings.Get(20258), NET_PROTOCOL_MYTH)); #endif - labels.push_back(make_pair(g_localizeStrings.Get(21331), NET_PROTOCOL_TUXBOX)); labels.push_back(make_pair(g_localizeStrings.Get(20301), NET_PROTOCOL_HTTPS)); labels.push_back(make_pair(g_localizeStrings.Get(20300), NET_PROTOCOL_HTTP)); labels.push_back(make_pair(g_localizeStrings.Get(20254), NET_PROTOCOL_DAVS)); @@ -201,7 +200,6 @@ void CGUIDialogNetworkSetup::OnProtocolChange() m_port = "21"; else if (m_protocol == NET_PROTOCOL_HTTP || m_protocol == NET_PROTOCOL_RSS || - m_protocol == NET_PROTOCOL_TUXBOX || m_protocol == NET_PROTOCOL_DAV) m_port = "80"; else if (m_protocol == NET_PROTOCOL_HTTPS || m_protocol == NET_PROTOCOL_DAVS) @@ -242,7 +240,6 @@ void CGUIDialogNetworkSetup::UpdateButtons() SET_CONTROL_LABEL2(CONTROL_REMOTE_PATH, m_path); CONTROL_ENABLE_ON_CONDITION(CONTROL_REMOTE_PATH, m_protocol != NET_PROTOCOL_DAAP && m_protocol != NET_PROTOCOL_UPNP && - m_protocol != NET_PROTOCOL_TUXBOX && m_protocol != NET_PROTOCOL_HTSP && m_protocol != NET_PROTOCOL_VTP && m_protocol != NET_PROTOCOL_MYTH); @@ -279,7 +276,6 @@ void CGUIDialogNetworkSetup::UpdateButtons() m_protocol == NET_PROTOCOL_HTTPS || m_protocol == NET_PROTOCOL_DAV || m_protocol == NET_PROTOCOL_DAVS || - m_protocol == NET_PROTOCOL_TUXBOX || m_protocol == NET_PROTOCOL_HTSP || m_protocol == NET_PROTOCOL_VTP || m_protocol == NET_PROTOCOL_MYTH || @@ -299,7 +295,7 @@ void CGUIDialogNetworkSetup::UpdateButtons() SendMessage(GUI_MSG_SET_TYPE, CONTROL_PASSWORD, CGUIEditControl::INPUT_TYPE_PASSWORD, 12326); // TODO: FIX BETTER DAAP SUPPORT - // server browse should be disabled if we are in DAAP, FTP, HTTP, HTTPS, RSS, HTSP, VTP, TUXBOX, DAV or DAVS + // server browse should be disabled if we are in DAAP, FTP, HTTP, HTTPS, RSS, HTSP, VTP, DAV or DAVS CONTROL_ENABLE_ON_CONDITION(CONTROL_SERVER_BROWSE, !m_server.empty() || !(m_protocol == NET_PROTOCOL_FTP || m_protocol == NET_PROTOCOL_HTTP || m_protocol == NET_PROTOCOL_HTTPS || @@ -310,7 +306,6 @@ void CGUIDialogNetworkSetup::UpdateButtons() m_protocol == NET_PROTOCOL_HTSP || m_protocol == NET_PROTOCOL_VTP || m_protocol == NET_PROTOCOL_MYTH || - m_protocol == NET_PROTOCOL_TUXBOX|| m_protocol == NET_PROTOCOL_SFTP || m_protocol == NET_PROTOCOL_AFP)); } @@ -334,8 +329,6 @@ std::string CGUIDialogNetworkSetup::ConstructPath() const url.SetProtocol("daap"); else if (m_protocol == NET_PROTOCOL_UPNP) url.SetProtocol("upnp"); - else if (m_protocol == NET_PROTOCOL_TUXBOX) - url.SetProtocol("tuxbox"); else if (m_protocol == NET_PROTOCOL_RSS) url.SetProtocol("rss"); else if (m_protocol == NET_PROTOCOL_HTSP) @@ -369,7 +362,6 @@ std::string CGUIDialogNetworkSetup::ConstructPath() const (m_protocol == NET_PROTOCOL_HTSP) || (m_protocol == NET_PROTOCOL_VTP) || (m_protocol == NET_PROTOCOL_MYTH) || - (m_protocol == NET_PROTOCOL_TUXBOX) || (m_protocol == NET_PROTOCOL_SFTP) || (m_protocol == NET_PROTOCOL_NFS)) && !m_port.empty() && atoi(m_port.c_str()) > 0) @@ -400,8 +392,6 @@ void CGUIDialogNetworkSetup::SetPath(const std::string &path) m_protocol = NET_PROTOCOL_DAAP; else if (url.IsProtocol("upnp")) m_protocol = NET_PROTOCOL_UPNP; - else if (url.IsProtocol("tuxbox")) - m_protocol = NET_PROTOCOL_TUXBOX; else if (url.IsProtocol("htsp")) m_protocol = NET_PROTOCOL_HTSP; else if (url.IsProtocol("vtp")) diff --git a/xbmc/network/GUIDialogNetworkSetup.h b/xbmc/network/GUIDialogNetworkSetup.h index d5276f4735..c8de292b31 100644 --- a/xbmc/network/GUIDialogNetworkSetup.h +++ b/xbmc/network/GUIDialogNetworkSetup.h @@ -39,7 +39,6 @@ public: NET_PROTOCOL_HTSP, NET_PROTOCOL_VTP, NET_PROTOCOL_MYTH, - NET_PROTOCOL_TUXBOX, NET_PROTOCOL_SFTP, NET_PROTOCOL_NFS, NET_PROTOCOL_AFP}; diff --git a/xbmc/settings/AdvancedSettings.cpp b/xbmc/settings/AdvancedSettings.cpp index 09a3fa1836..277908c9c7 100644 --- a/xbmc/settings/AdvancedSettings.cpp +++ b/xbmc/settings/AdvancedSettings.cpp @@ -288,18 +288,6 @@ void CAdvancedSettings::Initialize() m_bVideoScannerIgnoreErrors = false; m_iVideoLibraryDateAdded = 1; // prefer mtime over ctime and current time - m_iTuxBoxStreamtsPort = 31339; - m_bTuxBoxAudioChannelSelection = false; - m_bTuxBoxSubMenuSelection = false; - m_bTuxBoxPictureIcon= true; - m_bTuxBoxSendAllAPids= false; - m_iTuxBoxEpgRequestTime = 10; //seconds - m_iTuxBoxDefaultSubMenu = 4; - m_iTuxBoxDefaultRootMenu = 0; //default TV Mode - m_iTuxBoxZapWaitTime = 0; // Time in sec. Default 0:OFF - m_bTuxBoxZapstream = true; - m_iTuxBoxZapstreamPort = 31344; - m_iMythMovieLength = 0; // 0 == Off m_iEpgLingerTime = 60 * 24; /* keep 24 hours by default */ @@ -872,23 +860,6 @@ void CAdvancedSettings::ParseSettingsFile(const std::string &file) XMLUtils::GetBoolean(pRootElement,"virtualshares", m_bVirtualShares); XMLUtils::GetUInt(pRootElement, "packagefoldersize", m_addonPackageFolderSize); - //Tuxbox - pElement = pRootElement->FirstChildElement("tuxbox"); - if (pElement) - { - XMLUtils::GetInt(pElement, "streamtsport", m_iTuxBoxStreamtsPort, 0, 65535); - XMLUtils::GetBoolean(pElement, "audiochannelselection", m_bTuxBoxAudioChannelSelection); - XMLUtils::GetBoolean(pElement, "submenuselection", m_bTuxBoxSubMenuSelection); - XMLUtils::GetBoolean(pElement, "pictureicon", m_bTuxBoxPictureIcon); - XMLUtils::GetBoolean(pElement, "sendallaudiopids", m_bTuxBoxSendAllAPids); - XMLUtils::GetInt(pElement, "epgrequesttime", m_iTuxBoxEpgRequestTime, 0, 3600); - XMLUtils::GetInt(pElement, "defaultsubmenu", m_iTuxBoxDefaultSubMenu, 1, 4); - XMLUtils::GetInt(pElement, "defaultrootmenu", m_iTuxBoxDefaultRootMenu, 0, 4); - XMLUtils::GetInt(pElement, "zapwaittime", m_iTuxBoxZapWaitTime, 0, 120); - XMLUtils::GetBoolean(pElement, "zapstream", m_bTuxBoxZapstream); - XMLUtils::GetInt(pElement, "zapstreamport", m_iTuxBoxZapstreamPort, 0, 65535); - } - // Myth TV pElement = pRootElement->FirstChildElement("myth"); if (pElement) diff --git a/xbmc/settings/AdvancedSettings.h b/xbmc/settings/AdvancedSettings.h index da319ab1e9..4b0e926e1b 100644 --- a/xbmc/settings/AdvancedSettings.h +++ b/xbmc/settings/AdvancedSettings.h @@ -288,18 +288,6 @@ class CAdvancedSettings : public ISettingCallback, public ISettingsHandler int m_iVideoLibraryDateAdded; std::set<std::string> m_vecTokens; - //TuxBox - int m_iTuxBoxStreamtsPort; - bool m_bTuxBoxSubMenuSelection; - int m_iTuxBoxDefaultSubMenu; - int m_iTuxBoxDefaultRootMenu; - bool m_bTuxBoxAudioChannelSelection; - bool m_bTuxBoxPictureIcon; - int m_iTuxBoxEpgRequestTime; - int m_iTuxBoxZapWaitTime; - bool m_bTuxBoxSendAllAPids; - bool m_bTuxBoxZapstream; - int m_iTuxBoxZapstreamPort; int m_iMythMovieLength; // minutes diff --git a/xbmc/utils/Makefile.in b/xbmc/utils/Makefile.in index abe863f8ae..10b4867545 100644 --- a/xbmc/utils/Makefile.in +++ b/xbmc/utils/Makefile.in @@ -70,7 +70,6 @@ SRCS += SystemInfo.cpp SRCS += TextSearch.cpp SRCS += TimeSmoother.cpp SRCS += TimeUtils.cpp -SRCS += TuxBoxUtil.cpp SRCS += URIUtils.cpp SRCS += UrlOptions.cpp SRCS += Variant.cpp diff --git a/xbmc/utils/TuxBoxUtil.cpp b/xbmc/utils/TuxBoxUtil.cpp deleted file mode 100644 index 70cc98e813..0000000000 --- a/xbmc/utils/TuxBoxUtil.cpp +++ /dev/null @@ -1,1649 +0,0 @@ -/* - * Copyright (C) 2005-2013 Team XBMC - * http://xbmc.org - * - * 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, 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 XBMC; see the file COPYING. If not, see - * <http://www.gnu.org/licenses/>. - * - */ - -// -// GeminiServer -// - -#include "TuxBoxUtil.h" -#include "URIUtils.h" -#include "filesystem/CurlFile.h" -#include "dialogs/GUIDialogContextMenu.h" -#include "Application.h" -#include "ApplicationMessenger.h" -#include "GUIInfoManager.h" -#include "video/VideoInfoTag.h" -#include "guilib/GUIWindowManager.h" -#include "dialogs/GUIDialogOK.h" -#include "dialogs/GUIDialogYesNo.h" -#include "filesystem/File.h" -#include "URL.h" -#include "settings/AdvancedSettings.h" -#include "FileItem.h" -#include "guilib/LocalizeStrings.h" -#include "StringUtils.h" -#include "utils/XBMCTinyXML.h" -#include "utils/XMLUtils.h" -#include "log.h" - -using namespace XFILE; -using namespace std; - -CTuxBoxUtil g_tuxbox; -CTuxBoxService g_tuxboxService; - -CTuxBoxService::CTuxBoxService() : CThread("TuxBoxService") -{ -} -CTuxBoxService::~CTuxBoxService() -{ -} -CTuxBoxUtil::CTuxBoxUtil(void) -{ - sCurSrvData.requested_audio_channel = 0; - vVideoSubChannel.mode = false; - sZapstream.initialized = false; - sZapstream.available = false; -} -CTuxBoxUtil::~CTuxBoxUtil(void) -{ -} -bool CTuxBoxService::Start() -{ - if(g_advancedSettings.m_iTuxBoxEpgRequestTime != 0) - { - StopThread(); - Create(false); - return true; - } - else - return false; -} -void CTuxBoxService::Stop() -{ - CLog::Log(LOGDEBUG, "%s - Stopping CTuxBoxService thread", __FUNCTION__); - StopThread(); -} -void CTuxBoxService::OnStartup() -{ - CLog::Log(LOGDEBUG, "%s - Starting CTuxBoxService thread", __FUNCTION__); - SetPriority( GetMinPriority() ); -} -void CTuxBoxService::OnExit() -{ - CThread::m_bStop = true; -} -bool CTuxBoxService::IsRunning() -{ - return !CThread::m_bStop; -} -void CTuxBoxService::Process() -{ - std::string strCurrentServiceName = g_tuxbox.sCurSrvData.service_name; - std::string strURL; - - while(!CThread::m_bStop && g_application.m_pPlayer->IsPlaying()) - { - strURL = g_application.CurrentFileItem().GetPath(); - if(!URIUtils::IsTuxBox(strURL)) - break; - - int iRequestTimer = g_advancedSettings.m_iTuxBoxEpgRequestTime *1000; //seconds - Sleep(iRequestTimer); - - CURL url(strURL); - if(g_tuxbox.GetHttpXML(url,"currentservicedata")) - { - CLog::Log(LOGDEBUG, "%s - receive current service data was successful", __FUNCTION__); - if(!strCurrentServiceName.empty()&& - strCurrentServiceName != "NULL" && - !g_tuxbox.sCurSrvData.service_name.empty() && - g_tuxbox.sCurSrvData.service_name != "-" && - !g_tuxbox.vVideoSubChannel.mode) - { - //Detect Channel Change - //We need to detect the channel on the TuxBox Device! - //On changing the channel on the device we will loose the stream and mplayer seems not able to detect it to stop - if (strCurrentServiceName != g_tuxbox.sCurSrvData.service_name && g_application.m_pPlayer->IsPlaying() && !g_tuxbox.sZapstream.available) - { - CLog::Log(LOGDEBUG," - ERROR: Non controlled channel change detected! Stopping current playing stream!"); - CApplicationMessenger::Get().MediaStop(); - break; - } - } - //Update infomanager from tuxbox client - g_infoManager.UpdateFromTuxBox(); - } - else - CLog::Log(LOGDEBUG, "%s - Could not receive current service data", __FUNCTION__); - } -} -bool CTuxBoxUtil::CreateNewItem(const CFileItem& item, CFileItem& item_new) -{ - //Build new Item - item_new.SetLabel(item.GetLabel()); - item_new.SetPath(item.GetPath()); - item_new.SetArt("thumb", item.GetArt("thumb")); - - if(g_tuxbox.GetZapUrl(item.GetPath(), item_new)) - { - if(vVideoSubChannel.mode) - vVideoSubChannel.current_name = item_new.GetLabel()+" ("+vVideoSubChannel.current_name+")"; - return true; - } - else - { - if(sBoxStatus.recording != "1") //Don't Show this Dialog, if the Box is in Recording mode! A previos YN Dialog was send to user! - { - CLog::Log(LOGDEBUG, "%s ---------------------------------------------------------", __FUNCTION__); - CLog::Log(LOGDEBUG, "%s - WARNING: Zaping Failed no Zap Point found!", __FUNCTION__); - CLog::Log(LOGDEBUG, "%s ---------------------------------------------------------", __FUNCTION__); - std::string strText = StringUtils::Format(g_localizeStrings.Get(21334).c_str(), item.GetLabel().c_str()); - CGUIDialogOK::ShowAndGetInput(21331, strText, 21333, 0); - } - } - return false; -} -bool CTuxBoxUtil::ParseBouquets(TiXmlElement *root, CFileItemList &items, CURL &url, std::string strFilter, std::string strChild) -{ - std::string strOptions; - TiXmlElement *pRootElement =root; - TiXmlNode *pNode = NULL; - TiXmlNode *pIt = NULL; - items.m_idepth =1; - // Get Options - strOptions = url.GetOptions(); - - if (!pRootElement) - { - CLog::Log(LOGWARNING, "%s - No %s found", __FUNCTION__, strChild.c_str()); - return false; - } - if (strFilter.empty()) - { - pNode = pRootElement->FirstChild(strChild.c_str()); - if (!pNode) - { - CLog::Log(LOGWARNING, "%s - No %s found", __FUNCTION__,strChild.c_str()); - return false; - } - while(pNode) - { - pIt = pNode->FirstChild("name"); - if (pIt) - { - std::string strItemName = pIt->FirstChild()->Value(); - - pIt = pNode->FirstChild("reference"); - if (pIt) - { - std::string strItemPath = pIt->FirstChild()->Value(); - // add. bouquets to item list! - CFileItemPtr pItem(new CFileItem); - pItem->m_bIsFolder = true; - pItem->SetLabel(strItemName); - { - CURL fileUrl; - fileUrl.SetProtocol("tuxbox"); - fileUrl.SetUserName(url.GetUserName()); - fileUrl.SetPassword(url.GetPassWord()); - fileUrl.SetHostName(url.GetHostName()); - if (url.GetPort() != 0 && url.GetPort() != 80) - fileUrl.SetPort(url.GetPort()); - fileUrl.SetOptions(url.GetOptions()); - fileUrl.SetOption("reference", strItemPath); - pItem->SetPath(fileUrl.Get()); - } - items.Add(pItem); - //DEBUG Log - CLog::Log(LOGDEBUG, "%s - Name: %s", __FUNCTION__,strItemName.c_str()); - CLog::Log(LOGDEBUG, "%s - Adress: %s", __FUNCTION__,pItem->GetPath().c_str()); - } - } - pNode = pNode->NextSibling(strChild.c_str()); - } - } - return true; -} -bool CTuxBoxUtil::ParseBouquetsEnigma2(TiXmlElement *root, CFileItemList &items, CURL &url, std::string& strFilter, std::string& strChild) -{ - TiXmlElement *pRootElement = root; - TiXmlNode *pNode = NULL; - TiXmlNode *pIt = NULL; - items.m_idepth = 1; - - if (!pRootElement) - { - CLog::Log(LOGWARNING, "%s - No %s found", __FUNCTION__, strChild.c_str()); - return false; - } - if (strFilter.empty()) - { - pNode = pRootElement->FirstChildElement("e2bouquet"); - if (!pNode) - { - CLog::Log(LOGWARNING, "%s - No %s found", __FUNCTION__,strChild.c_str()); - return false; - } - while(pNode) - { - CFileItemPtr pItem(new CFileItem); - pIt = pNode->FirstChildElement("e2servicereference"); - std::string strItemPath = pIt->FirstChild()->Value(); - pIt = pNode->FirstChildElement("e2servicename"); - std::string strItemName = pIt->FirstChild()->Value(); - pItem->m_bIsFolder = true; - pItem->SetLabel(strItemName); - { - CURL fileUrl; - fileUrl.SetProtocol("tuxbox"); - fileUrl.SetHostName(url.GetHostName()); - if (url.GetPort() != 0 && url.GetPort() != 80) - fileUrl.SetPort(url.GetPort()); - fileUrl.SetFileName(strItemName + "/"); - pItem->SetPath(fileUrl.Get()); - } - items.Add(pItem); - pNode = pNode->NextSiblingElement("e2bouquet"); - } - } - return true; -} -bool CTuxBoxUtil::ParseChannels(TiXmlElement *root, CFileItemList &items, CURL &url, std::string strFilter, std::string strChild) -{ - TiXmlElement *pRootElement =root; - TiXmlNode *pNode = NULL; - TiXmlNode *pIt = NULL; - TiXmlNode *pIta = NULL; - items.m_idepth =2; - - if (!pRootElement) - { - CLog::Log(LOGWARNING, "%s - No %ss found", __FUNCTION__,strChild.c_str()); - return false; - } - if(!strFilter.empty()) - { - pNode = pRootElement->FirstChild(strChild.c_str()); - if (!pNode) - { - CLog::Log(LOGWARNING, "%s - No %s found", __FUNCTION__,strChild.c_str()); - return false; - } - while(pNode) - { - pIt = pNode->FirstChild("name"); - if (pIt) - { - std::string strItemName = pIt->FirstChild()->Value(); - - pIt = pNode->FirstChild("reference"); - if (strFilter == pIt->FirstChild()->Value()) - { - pIt = pNode->FirstChild("service"); - if (!pIt) - { - CLog::Log(LOGWARNING, "%s - No service found", __FUNCTION__); - return false; - } - while(pIt) - { - pIta = pIt->FirstChild("name"); - if (pIta) - { - strItemName = pIta->FirstChild()->Value(); - - pIta = pIt->FirstChild("reference"); - if (pIta) - { - std::string strItemPath = pIta->FirstChild()->Value(); - // channel listing add. to item list! - CFileItemPtr pbItem(new CFileItem); - pbItem->m_bIsFolder = false; - pbItem->SetLabel(strItemName); - pbItem->SetLabelPreformated(true); - { - CURL fileUrl; - fileUrl.SetProtocol("tuxbox"); - fileUrl.SetUserName(url.GetUserName()); - fileUrl.SetPassword(url.GetPassWord()); - fileUrl.SetHostName(url.GetHostName()); - if (url.GetPort() != 0 && url.GetPort() != 80) - fileUrl.SetPort(url.GetPort()); - fileUrl.SetFileName("cgi-bin/zapTo"); - fileUrl.SetOption("path", strItemPath+".ts"); - pbItem->SetPath(fileUrl.Get()); - } - pbItem->SetArt("thumb", GetPicon(strItemName)); //Set Picon Image - - //DEBUG Log - CLog::Log(LOGDEBUG, "%s - Name: %s", __FUNCTION__,strItemName.c_str()); - CLog::Log(LOGDEBUG, "%s - Adress: %s", __FUNCTION__,pbItem->GetPath().c_str()); - - //add to the list - items.Add(pbItem); - } - } - pIt = pIt->NextSibling("service"); - } - } - } - pNode = pNode->NextSibling(strChild.c_str()); - } - return true; - } - return false; -} -bool CTuxBoxUtil::ParseChannelsEnigma2(TiXmlElement *root, CFileItemList &items, CURL &url, std::string& strFilter, std::string& strChild) -{ - TiXmlElement *pRootElement = root; - TiXmlNode *pNode = NULL; - TiXmlNode *pIt = NULL; - TiXmlNode *pIta = NULL; - TiXmlNode *pItb = NULL; - items.m_idepth = 2; - - if (!pRootElement) - { - CLog::Log(LOGWARNING, "%s - No %ss found", __FUNCTION__,strChild.c_str()); - return false; - } - if(!strFilter.empty()) - { - pNode = pRootElement->FirstChild(strChild.c_str()); - if (!pNode) - { - CLog::Log(LOGWARNING, "%s - No %s found", __FUNCTION__,strChild.c_str()); - return false; - } - while(pNode) - { - pIt = pNode->FirstChildElement("e2servicename"); - std::string bqtName = pIt->FirstChild()->Value(); - pIt = pNode->FirstChildElement("e2servicelist"); - pIta = pIt->FirstChildElement("e2service"); - while(pIta) - { - pItb = pIta->FirstChildElement("e2servicereference"); - std::string strItemPath = pItb->FirstChild()->Value(); - pItb = pIta->FirstChildElement("e2servicename"); - std::string strItemName = pItb->FirstChild()->Value(); - if(bqtName == url.GetShareName()) - { - CFileItemPtr pbItem(new CFileItem); - pbItem->m_bIsFolder = false; - pbItem->SetLabel(strItemName); - { - CURL fileUrl; - fileUrl.SetProtocol("http"); - fileUrl.SetHostName(url.GetHostName()); - fileUrl.SetPort(8001); - fileUrl.SetFileName(strItemPath); - pbItem->SetPath(fileUrl.Get()); - } - pbItem->SetMimeType("video/mpeg2"); - items.Add(pbItem); - CLog::Log(LOGDEBUG, "%s - Name: %s", __FUNCTION__,strItemName.c_str()); - CLog::Log(LOGDEBUG, "%s - Adress: %s", __FUNCTION__,pbItem->GetPath().c_str()); - } - pIta = pIta->NextSiblingElement("e2service"); - } - pNode = pNode->NextSiblingElement("e2bouquet"); - } - } - return true; -} -bool CTuxBoxUtil::ZapToUrl(CURL url, const std::string &pathOption) -{ - // send Zap - //Extract the ZAP to Service String - //Remove the ".ts" - std::string strFilter = pathOption.substr(0, pathOption.size() - 3); - //Get the Service Name - - // Create ZAP URL - CURL urlx; - urlx.SetProtocol("http"); - urlx.SetUserName(url.GetUserName()); - urlx.SetPassword(url.GetPassWord()); - urlx.SetHostName(url.GetHostName()); - if (url.GetPort() != 0 && url.GetPort() != 80) - urlx.SetPort(url.GetPort()); - CURL postUrl(urlx); - postUrl.SetFileName("cgi-bin/zapTo"); - postUrl.SetOption("path", strFilter); - - //Check Recording State! - if(GetHttpXML(urlx,"boxstatus")) - { - if(sBoxStatus.recording == "1") - { - CLog::Log(LOGDEBUG, "%s ---------------------------------------------------------", __FUNCTION__); - CLog::Log(LOGDEBUG, "%s - WARNING: Device is Recording! Record Mode is: %s", __FUNCTION__,sBoxStatus.recording.c_str()); - CLog::Log(LOGDEBUG, "%s ---------------------------------------------------------", __FUNCTION__); - CGUIDialogYesNo* dialog = (CGUIDialogYesNo*)g_windowManager.GetWindow(WINDOW_DIALOG_YES_NO); - if (dialog) - { - //Target TuxBox is in Recording mode! Are you sure to stream ?YN - dialog->SetHeading(21331); - dialog->SetLine( 0, 21332); - dialog->SetLine( 1, 21335); - dialog->SetLine( 2, "" ); - dialog->DoModal(); - if (!dialog->IsConfirmed()) - { - //DialogYN = NO -> Return false! - return false; - } - } - } - } - - //Send ZAP Command - CCurlFile http; - if(http.Open(postUrl)) - { - //DEBUG LOG - CLog::Log(LOGDEBUG, "%s - Zapped to: %s", __FUNCTION__,postUrl.Get().c_str()); - - //Request StreamInfo - GetHttpXML(urlx,"streaminfo"); - - //Extract StreamInformations - int iRetry=0; - //PMT must be a valid value to be sure that the ZAP is OK and we can stream! - while(sStrmInfo.pmt == "ffffffffh" && iRetry!=10) //try 10 Times - { - CLog::Log(LOGDEBUG, "%s - Requesting STREAMINFO! TryCount: %i!", __FUNCTION__,iRetry); - GetHttpXML(urlx,"streaminfo"); - iRetry=iRetry+1; - Sleep(200); - } - - // PMT Not Valid? Try Time 10 reached, checking for advancedSettings m_iTuxBoxZapWaitTime - if(sStrmInfo.pmt == "ffffffffh" && g_advancedSettings.m_iTuxBoxZapWaitTime > 0 ) - { - iRetry = 0; - CLog::Log(LOGDEBUG, "%s - Starting TuxBox ZapWaitTimer!", __FUNCTION__); - while(sStrmInfo.pmt == "ffffffffh" && iRetry!=10) //try 10 Times - { - CLog::Log(LOGDEBUG, "%s - Requesting STREAMINFO! TryCount: %i!", __FUNCTION__,iRetry); - GetHttpXML(urlx,"streaminfo"); - iRetry=iRetry+1; - if(sStrmInfo.pmt == "ffffffffh") - { - CLog::Log(LOGERROR, "%s - STREAMINFO ERROR! Could not receive all data, TryCount: %i!", __FUNCTION__,iRetry); - CLog::Log(LOGERROR, "%s - PMT is: %s (not a Valid Value)! Waiting %i sec.", __FUNCTION__,sStrmInfo.pmt.c_str(), g_advancedSettings.m_iTuxBoxZapWaitTime); - Sleep(g_advancedSettings.m_iTuxBoxZapWaitTime*1000); - } - } - } - - //PMT Failed! No StreamInformations availible.. closing stream - if (sStrmInfo.pmt == "ffffffffh") - { - CLog::Log(LOGERROR, "%s-------------------------------------------------------------", __FUNCTION__); - CLog::Log(LOGERROR, "%s - STREAMINFO ERROR! Could not receive all data, TryCount: %i!", __FUNCTION__,iRetry); - CLog::Log(LOGERROR, "%s - PMT is: %s (not a Valid Value)! There is nothing to Stream!", __FUNCTION__,sStrmInfo.pmt.c_str()); - CLog::Log(LOGERROR, "%s - The Stream will stopped!", __FUNCTION__); - CLog::Log(LOGERROR, "%s-------------------------------------------------------------", __FUNCTION__); - return false; - } - //Currentservicedata - GetHttpXML(urlx,"currentservicedata"); - //boxstatus - GetHttpXML(urlx,"boxstatus"); - //boxinfo - GetHttpXML(urlx,"boxinfo"); - //serviceepg - GetHttpXML(urlx,"serviceepg"); - return true; - } - return false; -} -bool CTuxBoxUtil::GetZapUrl(const std::string& strPath, CFileItem &items ) -{ - CURL url(strPath); - std::string strOptions = url.GetOptions(); - if (strOptions.empty()) - return false; - - if (url.HasOption("path")) - { - if(ZapToUrl(url, url.GetOption("path"))) - { - //Check VideoSubChannels - if(GetHttpXML(url,"currentservicedata")) //Update Currentservicedata - { - //Detect VideoSubChannels - std::string strVideoSubChannelName, strVideoSubChannelPID; - if(GetVideoSubChannels(strVideoSubChannelName,strVideoSubChannelPID )) - { - // new videosubchannel selected! settings options to new video zap id - // zap again now to new videosubchannel - if(ZapToUrl(url, strVideoSubChannelPID + ".ts")) - { - vVideoSubChannel.mode = true; - vVideoSubChannel.current_name = strVideoSubChannelName; - } - } - else - vVideoSubChannel.mode= false; - } - - std::string strVideoStream; - std::string strLabel, strLabel2; - std::string strAudioChannelPid; - std::string strAPids; - sAudioChannel sRequestedAudioChannel; - - if (!GetGUIRequestedAudioChannel(sRequestedAudioChannel)) - { - if (g_advancedSettings.m_bTuxBoxSendAllAPids && sCurSrvData.audio_channels.size() > 1) - { - for (vector<sAudioChannel>::iterator sChannel = sCurSrvData.audio_channels.begin(); sChannel!=sCurSrvData.audio_channels.end(); ++sChannel) - { - if (sChannel->pid != sRequestedAudioChannel.pid && sChannel->pid.size() >= 4) - strAPids += "," + sChannel->pid.substr(sChannel->pid.size() - 4); - } - CLog::Log(LOGDEBUG, "%s - Sending all audio pids: %s%s", __FUNCTION__, strAudioChannelPid.c_str(), strAPids.c_str()); - - strVideoStream = StringUtils::Format("0,%s,%s,%s%s", - sStrmInfo.pmt.substr(0, 4).c_str(), - sStrmInfo.vpid.substr(0, 4).c_str(), - sStrmInfo.apid.substr(0, 4).c_str(), - strAPids.c_str()); - } - else - strVideoStream = StringUtils::Format("0,%s,%s,%s", - sStrmInfo.pmt.substr(0, 4).c_str(), - sStrmInfo.vpid.substr(0, 4).c_str(), - sStrmInfo.apid.substr(0, 4).c_str()); - } - else - strVideoStream = StringUtils::Format("0,%s,%s,%s", - sStrmInfo.pmt.substr(0, 4).c_str(), - sStrmInfo.vpid.substr(0, 4).c_str(), - strAudioChannelPid.substr(0, 4).c_str()); - - CURL streamURL; - streamURL.SetProtocol("http"); - streamURL.SetUserName(url.GetUserName()); - streamURL.SetPassword(url.GetPassWord()); - streamURL.SetHostName(url.GetHostName()); - streamURL.SetPort(g_advancedSettings.m_iTuxBoxStreamtsPort); - streamURL.SetFileName(strVideoStream.c_str()); - - if (!g_tuxbox.sZapstream.initialized) - g_tuxbox.InitZapstream(strPath); - - // Use the Zapstream service when available. - if (g_tuxbox.sZapstream.available) - { - sAudioChannel sSelectedAudioChannel; - if (GetRequestedAudioChannel(sSelectedAudioChannel)) - { - if (sSelectedAudioChannel.pid != sStrmInfo.apid) - { - if (SetAudioChannel(strPath, sSelectedAudioChannel)) - CLog::Log(LOGDEBUG, "%s - Zapstream: Requested audio channel is %s, pid %s.", __FUNCTION__, sSelectedAudioChannel.name.c_str(), sSelectedAudioChannel.pid.c_str()); - } - } - streamURL.SetFileName(""); - streamURL.SetPort(g_advancedSettings.m_iTuxBoxZapstreamPort); - } - - if (g_application.m_pPlayer->IsPlaying() && !g_tuxbox.sZapstream.available) - CApplicationMessenger::Get().MediaStop(); - - strLabel = StringUtils::Format("%s: %s %s-%s", - items.GetLabel().c_str(), - sCurSrvData.current_event_date.c_str(), - sCurSrvData.current_event_start.c_str(), - sCurSrvData.current_event_start.c_str()); - strLabel2 = StringUtils::Format("%s", sCurSrvData.current_event_description.c_str()); - - // Set Event details - std::string strGenre, strTitle; - strGenre = StringUtils::Format("%s %s - (%s: %s)", - g_localizeStrings.Get(143).c_str(), sCurSrvData.current_event_description.c_str(), - g_localizeStrings.Get(209).c_str(), sCurSrvData.next_event_description.c_str()); - strTitle = StringUtils::Format("%s", sCurSrvData.current_event_details.c_str()); - int iDuration = atoi(sCurSrvData.current_event_duration.c_str()); - - items.GetVideoInfoTag()->m_genre = StringUtils::Split(strGenre, g_advancedSettings.m_videoItemSeparator); // VIDEOPLAYER_GENRE: current_event_description (Film Name) - items.GetVideoInfoTag()->m_strTitle = strTitle; // VIDEOPLAYER_TITLE: current_event_details (Film beschreibung) - items.GetVideoInfoTag()->m_duration = iDuration; //VIDEOPLAYER_DURATION: current_event_duration (laufzeit in sec.) - - items.SetPath(streamURL.Get()); - items.m_iDriveType = url.GetPort(); // Dirty Hack! But i need to hold the Port ;) - items.SetLabel(items.GetLabel()); // VIDEOPLAYER_DIRECTOR: service_name (Program Name) - items.SetLabel2(sCurSrvData.current_event_description); // current_event_description (Film Name) - items.m_bIsFolder = false; - items.SetMimeType("video/x-mpegts"); - return true; - } - } - return false; -} - -// Notice: Zapstream is a streamts enhancement from PLi development team. -// If you are using a non-PLi based image you might not have Zapstream installed. -bool CTuxBoxUtil::InitZapstream(const std::string& strPath) -{ - CURL url(strPath); - CCurlFile http; - int iTryConnect = 0; - int iTimeout = 2; - - g_tuxbox.sZapstream.initialized = true; - - if (!g_advancedSettings.m_bTuxBoxZapstream) - { - CLog::Log(LOGDEBUG, "%s - Zapstream is disabled in advancedsettings.xml.", __FUNCTION__); - return g_tuxbox.sZapstream.available = false; - } - - url.SetProtocol("http"); - url.SetFileName(""); - url.SetOptions(""); - url.SetPort(g_advancedSettings.m_iTuxBoxZapstreamPort); - - while (iTryConnect < 3) - { - http.SetTimeout(iTimeout); - - if (http.Open(url)) - { - http.Close(); - CHttpHeader h = http.GetHttpHeader(); - std::string strValue = h.GetValue("server"); - - if (strValue.find("zapstream") != std::string::npos) - { - CLog::Log(LOGDEBUG, "%s - Zapstream is available on port %i.", __FUNCTION__, g_advancedSettings.m_iTuxBoxZapstreamPort); - return g_tuxbox.sZapstream.available = true; - } - } - - iTryConnect++; - iTimeout+=5; - } - - CLog::Log(LOGDEBUG, "%s - Zapstream is not available on port %i.", __FUNCTION__, g_advancedSettings.m_iTuxBoxZapstreamPort); - return false; -} -bool CTuxBoxUtil::SetAudioChannel( const std::string& strPath, const AUDIOCHANNEL& sAC ) -{ - CURL url(strPath); - CCurlFile http; - int iTryConnect = 0; - int iTimeout = 2; - - url.SetProtocol("http"); - url.SetFileName("cgi-bin/setAudio"); - url.SetOptions("?channel=1&language=" + sAC.pid); - url.SetPort(80); - - g_tuxbox.sZapstream.initialized = true; - - while (iTryConnect < 3) - { - http.SetTimeout(iTimeout); - - if (http.Open(url)) - { - http.Close(); - return true; - } - - iTryConnect++; - iTimeout+=5; - } - - return false; -} -bool CTuxBoxUtil::GetHttpXML(CURL url,std::string strRequestType) -{ - // Check and Set URL Request Option - if(!strRequestType.empty()) - { - if(strRequestType == "streaminfo") - { - url.SetOptions("xml/streaminfo"); - } - else if(strRequestType == "currentservicedata") - { - url.SetOptions("xml/currentservicedata"); - } - else if(strRequestType == "boxstatus") - { - url.SetOptions("xml/boxstatus"); - } - else if(strRequestType == "boxinfo") - { - url.SetOptions("xml/boxinfo"); - } - else if(strRequestType == "serviceepg") - { - url.SetOptions("xml/serviceepg"); - } - else - { - CLog::Log(LOGERROR, "%s - Request Type is not defined! You requested: %s", __FUNCTION__,strRequestType.c_str()); - return false; - } - } - else - { - CLog::Log(LOGERROR, "%s - strRequestType Request Type is Empty!", __FUNCTION__); - return false; - } - - // Clean Up the URL, so we have a clean request! - url.SetFileName(""); - - //Open - CCurlFile http; - http.SetTimeout(20); - if(http.Open(url)) - { - int size_read = 0; - int size_total = (int)http.GetLength(); - - if(size_total > 0) - { - // read response from server into string buffer - std::string strTmp; - strTmp.reserve(size_total); - char buffer[16384]; - while( (size_read = http.Read( buffer, sizeof(buffer)-1) ) > 0 ) - { - buffer[size_read] = 0; - strTmp += buffer; - } - - // parse returned xml - CXBMCTinyXML doc; - TiXmlElement *XMLRoot=NULL; - StringUtils::Replace(strTmp, "></",">-</"); //FILL EMPTY ELEMENTS WITH "-"! - doc.Parse(strTmp, http.GetServerReportedCharset()); - strTmp.clear(); - - XMLRoot = doc.RootElement(); - std::string strRoot = XMLRoot->Value(); - if( strRoot == "streaminfo") - return StreamInformations(XMLRoot); - if(strRoot == "currentservicedata") - return CurrentServiceData(XMLRoot); - if(strRoot == "boxstatus") - return BoxStatus(XMLRoot); - if(strRoot == "boxinfo") - return BoxInfo(XMLRoot); - if(strRoot == "serviceepg" || - strRoot == "service_epg") - return ServiceEPG(XMLRoot); - - CLog::Log(LOGERROR, "%s - Unable to parse xml", __FUNCTION__); - CLog::Log(LOGERROR, "%s - Request String: %s", __FUNCTION__,strRoot.c_str()); - return false; - } - else - { - CLog::Log(LOGERROR, "%s - http length is invalid!", __FUNCTION__); - return false; - } - } - CLog::Log(LOGERROR, "%s - Open URL Failed! Unable to get XML structure", __FUNCTION__); - return false; -} -bool CTuxBoxUtil::StreamInformations(TiXmlElement *pRootElement) -{ - /* - Sample: - http://192.168.0.110:31339/0,0065,01ff,0200,0201,0203,01ff - - http://getIP:31339/0,pmtpid,vpid,apid,apids,apids,pcrpid; - - vpid,pmtpid,pcrpid,apid --> xml/streaminfo - apids --> /xml/currentservicedata - - apid: is the defined audio stream! - Normal Stereo: http://192.168.0.110:31339/0,0065,01ff,0200,0201,0203,01ff - Normal English: http://192.168.0.110:31339/0,0065,01ff,0201,,,01ff - Normal DD5.1/AC3: http://192.168.0.110:31339/0,0065,01ff,0203,,,01ff - */ - - TiXmlNode *pNode = NULL; - TiXmlNode *pIt = NULL; - if(pRootElement != NULL) - { - pNode = pRootElement->FirstChild("frontend"); - if (pNode) - { - sStrmInfo.frontend = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Frontend: %s", __FUNCTION__, sStrmInfo.frontend.c_str()); - } - pNode = pRootElement->FirstChild("service"); - if (pNode) - { - CLog::Log(LOGDEBUG, "%s - Service", __FUNCTION__); - pIt = pNode->FirstChild("name"); - if (pIt) - { - sStrmInfo.service_name = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Name: %s", __FUNCTION__, sStrmInfo.service_name.c_str()); - } - pIt = pNode->FirstChild("reference"); - if (pIt) - { - sStrmInfo.service_reference = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Reference: %s", __FUNCTION__, sStrmInfo.service_reference.c_str()); - } - } - - pNode = pRootElement->FirstChild("provider"); - if(pNode && pNode->FirstChild()) - { - sStrmInfo.provider= pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Provider: %s", __FUNCTION__, sStrmInfo.provider.c_str()); - } - pNode = pRootElement->FirstChild("vpid"); - if (pNode) - { - sStrmInfo.vpid = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Vpid: %s", __FUNCTION__, sStrmInfo.vpid.c_str()); - } - pNode = pRootElement->FirstChild("apid"); - if (pNode) - { - sStrmInfo.apid = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Apid: %s", __FUNCTION__, sStrmInfo.apid.c_str()); - } - pNode = pRootElement->FirstChild("pcrpid"); - if (pNode) - { - sStrmInfo.pcrpid = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - PcrPid: %s", __FUNCTION__, sStrmInfo.pcrpid.c_str()); - } - pNode = pRootElement->FirstChild("tpid"); - if (pNode) - { - sStrmInfo.tpid = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Tpid: %s", __FUNCTION__, sStrmInfo.tpid.c_str()); - } - pNode = pRootElement->FirstChild("tsid"); - if (pNode) - { - sStrmInfo.tsid = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Tsid: %s", __FUNCTION__, sStrmInfo.tsid.c_str()); - } - pNode = pRootElement->FirstChild("onid"); - if (pNode) - { - sStrmInfo.onid = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Onid: %s", __FUNCTION__, sStrmInfo.onid.c_str()); - } - pNode = pRootElement->FirstChild("sid"); - if (pNode) - { - sStrmInfo.sid = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Sid: %s", __FUNCTION__, sStrmInfo.sid.c_str()); - } - pNode = pRootElement->FirstChild("pmt"); - if (pNode) - { - sStrmInfo.pmt = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Pmt: %s", __FUNCTION__, sStrmInfo.pmt.c_str()); - } - pNode = pRootElement->FirstChild("video_format"); - if (pNode) - { - sStrmInfo.video_format = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Video Format: %s", __FUNCTION__, sStrmInfo.video_format.c_str()); - } - pNode = pRootElement->FirstChild("supported_crypt_systems"); - if (pNode) - { - sStrmInfo.supported_crypt_systems = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Supported Crypt Systems: %s", __FUNCTION__, sStrmInfo.supported_crypt_systems.c_str()); - } - pNode = pRootElement->FirstChild("used_crypt_systems"); - if (pNode) - { - sStrmInfo.used_crypt_systems = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Used Crypt Systems: %s", __FUNCTION__, sStrmInfo.used_crypt_systems.c_str()); - } - pNode = pRootElement->FirstChild("satellite"); - if (pNode) - { - sStrmInfo.satellite = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Satellite: %s", __FUNCTION__, sStrmInfo.satellite.c_str()); - } - pNode = pRootElement->FirstChild("frequency"); - if (pNode) - { - sStrmInfo.frequency = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Frequency: %s", __FUNCTION__, sStrmInfo.frequency.c_str()); - } - pNode = pRootElement->FirstChild("symbol_rate"); - if (pNode) - { - sStrmInfo.symbol_rate = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Symbol Rate: %s", __FUNCTION__, sStrmInfo.symbol_rate.c_str()); - } - pNode = pRootElement->FirstChild("polarisation"); - if (pNode) - { - sStrmInfo.polarisation = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Polarisation: %s", __FUNCTION__, sStrmInfo.polarisation.c_str()); - } - pNode = pRootElement->FirstChild("inversion"); - if (pNode) - { - sStrmInfo.inversion = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Inversion: %s", __FUNCTION__, sStrmInfo.inversion.c_str()); - } - pNode = pRootElement->FirstChild("fec"); - if (pNode) - { - sStrmInfo.fec = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Fec: %s", __FUNCTION__, sStrmInfo.fec.c_str()); - } - pNode = pRootElement->FirstChild("snr"); - if (pNode) - { - sStrmInfo.snr = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Snr: %s", __FUNCTION__, sStrmInfo.snr.c_str()); - } - pNode = pRootElement->FirstChild("agc"); - if (pNode) - { - sStrmInfo.agc = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Agc: %s", __FUNCTION__, sStrmInfo.agc.c_str()); - } - pNode = pRootElement->FirstChild("ber"); - if (pNode) - { - sStrmInfo.ber = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - ber: %s", __FUNCTION__, sStrmInfo.ber.c_str()); - } - pNode = pRootElement->FirstChild("lock"); - if (pNode) - { - sStrmInfo.lock = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Lock: %s", __FUNCTION__, sStrmInfo.lock.c_str()); - } - pNode = pRootElement->FirstChild("sync"); - if (pNode) - { - sStrmInfo.sync = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Sync: %s", __FUNCTION__, sStrmInfo.sync.c_str()); - } - return true; - } - return false; -} -bool CTuxBoxUtil::CurrentServiceData(TiXmlElement *pRootElement) -{ - TiXmlNode *pNode = NULL; - TiXmlNode *pIt = NULL; - TiXmlNode *pVal = NULL; - if(pRootElement) - { - CLog::Log(LOGDEBUG, "%s - Current Service Data", __FUNCTION__); - pNode = pRootElement->FirstChild("service"); - if (pNode) - { - CLog::Log(LOGDEBUG, "%s - Service", __FUNCTION__); - pIt = pNode->FirstChild("name"); - if (pIt) - { - sCurSrvData.service_name = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Service Name: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - pIt = pNode->FirstChild("reference"); - if (pIt) - { - sCurSrvData.service_reference = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Service Reference: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - } - - pNode = pRootElement->FirstChild("audio_channels"); - if (pNode) - { - CLog::Log(LOGDEBUG, "%s - Audio Channels", __FUNCTION__); - int i = 0; - - pIt = pNode->FirstChild("channel"); - sCurSrvData.audio_channels.clear(); - - while(pIt) - { - sAudioChannel newChannel; - - pVal = pIt->FirstChild("pid"); - if(pVal) - newChannel.pid = pVal->FirstChild()->Value(); - - pVal = pIt->FirstChild("selected"); - if(pVal) - newChannel.selected = pVal->FirstChild()->Value(); - - pVal = pIt->FirstChild("name"); - if(pVal) - newChannel.name = pVal->FirstChild()->Value(); - - CLog::Log(LOGDEBUG, "%s - Audio Channels: Channel %i -> PID: %s Selected: %s Name: %s", __FUNCTION__, i, newChannel.pid.c_str(), newChannel.selected.c_str(), newChannel.name.c_str() ); - - i=i+1; - sCurSrvData.audio_channels.push_back( newChannel ); - pIt = pIt->NextSibling("channel"); - } - } - pNode = pRootElement->FirstChild("audio_track"); - if (pNode) - { - sCurSrvData.audio_track = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Audio Track: %s", __FUNCTION__, pNode->FirstChild()->Value() ); - } - pNode = pRootElement->FirstChild("video_channels"); - if (pNode) - { - CLog::Log(LOGDEBUG, "%s - Video Channels", __FUNCTION__); - pIt = pNode->FirstChild("service"); - if (pIt) - { - vVideoSubChannel.name.clear(); - vVideoSubChannel.reference.clear(); - vVideoSubChannel.selected.clear(); - int i = 0; - while(pIt) - { - pVal = pIt->FirstChild("name"); - if(pVal) - { - vVideoSubChannel.name.push_back(pVal->FirstChild()->Value()); - CLog::Log(LOGDEBUG, "%s - Video Sub Channel %i: Name: %s", __FUNCTION__, i,pVal->FirstChild()->Value()); - } - pVal = pIt->FirstChild("reference"); - if(pVal) - { - vVideoSubChannel.reference.push_back(pVal->FirstChild()->Value()); - CLog::Log(LOGDEBUG, "%s - Video Sub Channel %i: Reference: %s", __FUNCTION__, i,pVal->FirstChild()->Value()); - } - pVal = pIt->FirstChild("selected"); - if(pVal) - { - vVideoSubChannel.selected.push_back(pVal->FirstChild()->Value()); - CLog::Log(LOGDEBUG, "%s - Video Sub Channel %i: Selected: %s", __FUNCTION__, i,pVal->FirstChild()->Value()); - } - pIt = pIt->NextSibling("service"); - i++; - } - } - else - { - vVideoSubChannel.name.clear(); - vVideoSubChannel.reference.clear(); - vVideoSubChannel.selected.clear(); - } - } - pNode = pRootElement->FirstChild("current_event"); - if (pNode) - { - CLog::Log(LOGDEBUG, "%s - Current Event", __FUNCTION__); - pIt = pNode->FirstChild("date"); - if (pIt) - { - sCurSrvData.current_event_date = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Date: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - pIt = pNode->FirstChild("time"); - if (pIt) - { - sCurSrvData.current_event_time = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Time: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - - pIt = pNode->FirstChild("start"); - if (pIt) - { - sCurSrvData.current_event_start = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Start: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - - pIt = pNode->FirstChild("duration"); - if (pIt) - { - sCurSrvData.current_event_duration = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Duration: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - - pIt = pNode->FirstChild("description"); - if (pIt) - { - sCurSrvData.current_event_description = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Description: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - pIt = pNode->FirstChild("details"); - if (pIt) - { - sCurSrvData.current_event_details = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Details: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - } - pNode = pRootElement->FirstChild("next_event"); - if (pNode) - { - CLog::Log(LOGDEBUG, "%s - Next Event", __FUNCTION__); - pIt = pNode->FirstChild("date"); - if (pIt) - { - sCurSrvData.next_event_date = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Date: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - pIt = pNode->FirstChild("time"); - if (pIt) - { - sCurSrvData.next_event_time = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Time: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - - pIt = pNode->FirstChild("start"); - if (pIt) - { - sCurSrvData.next_event_start = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Start: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - - pIt = pNode->FirstChild("duration"); - if (pIt) - { - sCurSrvData.next_event_duration = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Duration: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - - pIt = pNode->FirstChild("description"); - if (pIt) - { - sCurSrvData.next_event_description = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Description: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - pIt = pNode->FirstChild("details"); - if (pIt) - { - sCurSrvData.next_event_details = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Details: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - } - return true; - } - return false; - -} -bool CTuxBoxUtil::BoxStatus(TiXmlElement *pRootElement) -{ - //Tuxbox Controll Commands - /* - /cgi-bin/admin?command=wakeup - /cgi-bin/admin?command=standby - /cgi-bin/admin?command=shutdown - /cgi-bin/admin?command=reboot - /cgi-bin/admin?command=restart - */ - - TiXmlNode *pNode = NULL; - - if(pRootElement) - { - CLog::Log(LOGDEBUG, "%s - BoxStatus", __FUNCTION__); - pNode = pRootElement->FirstChild("current_time"); - if (pNode) - { - sBoxStatus.current_time = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Current Time: %s", __FUNCTION__, pNode->FirstChild()->Value()); - } - pNode = pRootElement->FirstChild("standby"); - if (pNode) - { - sBoxStatus.standby = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Standby: %s", __FUNCTION__, pNode->FirstChild()->Value()); - } - pNode = pRootElement->FirstChild("recording"); - if (pNode) - { - sBoxStatus.recording = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Recording: %s", __FUNCTION__, pNode->FirstChild()->Value()); - } - pNode = pRootElement->FirstChild("mode"); - if (pNode) - { - sBoxStatus.mode = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Mode: %s", __FUNCTION__, pNode->FirstChild()->Value()); - } - pNode = pRootElement->FirstChild("ip"); - if (pNode) - { - if (sBoxStatus.ip != pNode->FirstChild()->Value() ) - { - g_tuxbox.sZapstream.initialized = false; - g_tuxbox.sZapstream.available = false; - } - sBoxStatus.ip = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Ip: %s", __FUNCTION__, pNode->FirstChild()->Value()); - } - return true; - } - return false; -} -bool CTuxBoxUtil::BoxInfo(TiXmlElement *pRootElement) -{ - TiXmlNode *pNode = NULL; - TiXmlNode *pIt = NULL; - - if(pRootElement) - { - CLog::Log(LOGDEBUG, "%s - BoxInfo", __FUNCTION__); - pNode = pRootElement->FirstChild("image"); - if (pNode) - { - CLog::Log(LOGDEBUG, "%s - Image", __FUNCTION__); - pIt = pNode->FirstChild("version"); - if (pIt) - { - sBoxInfo.image_version = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Image Version: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - pIt = pNode->FirstChild("url"); - if (pIt) - { - sBoxInfo.image_url = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Image Url: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - pIt = pNode->FirstChild("comment"); - if (pIt) - { - sBoxInfo.image_comment = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Image Comment: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - pIt = pNode->FirstChild("catalog"); - if (pIt) - { - sBoxInfo.image_catalog = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Image Catalog: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - } - pNode = pRootElement->FirstChild("firmware"); - if (pNode) - { - sBoxInfo.firmware = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Firmware: %s", __FUNCTION__, pNode->FirstChild()->Value()); - } - pNode = pRootElement->FirstChild("fpfirmware"); - if (pNode) - { - sBoxInfo.fpfirmware = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - FP Firmware: %s", __FUNCTION__, pNode->FirstChild()->Value()); - } - pNode = pRootElement->FirstChild("webinterface"); - if (pNode) - { - sBoxInfo.webinterface = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Web Interface: %s", __FUNCTION__, pNode->FirstChild()->Value()); - } - pNode = pRootElement->FirstChild("model"); - if (pNode) - { - sBoxInfo.model = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Model: %s", __FUNCTION__, pNode->FirstChild()->Value()); - } - pNode = pRootElement->FirstChild("manufacturer"); - if (pNode) - { - sBoxInfo.manufacturer = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Manufacturer: %s", __FUNCTION__, pNode->FirstChild()->Value()); - } - pNode = pRootElement->FirstChild("processor"); - if (pNode) - { - sBoxInfo.processor = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Processor: %s", __FUNCTION__, pNode->FirstChild()->Value()); - } - pNode = pRootElement->FirstChild("usbstick"); - if (pNode) - { - sBoxInfo.usbstick = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - USB Stick: %s", __FUNCTION__, pNode->FirstChild()->Value()); - } - pNode = pRootElement->FirstChild("disk"); - if (pNode) - { - sBoxInfo.disk = pNode->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Disk: %s", __FUNCTION__, pNode->FirstChild()->Value()); - } - return true; - } - return false; -} -bool CTuxBoxUtil::ServiceEPG(TiXmlElement *pRootElement) -{ - TiXmlNode *pNode = NULL; - TiXmlNode *pIt = NULL; - - if(pRootElement) - { - CLog::Log(LOGDEBUG, "%s - Service EPG", __FUNCTION__); - pNode = pRootElement->FirstChild("service"); - if (pNode) - { - CLog::Log(LOGDEBUG, "%s - Service", __FUNCTION__); - pIt = pNode->FirstChild("reference"); - if (pIt) - { - sServiceEPG.service_reference = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Service Reference: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - pIt = pNode->FirstChild("name"); - if (pIt) - { - sServiceEPG.service_name = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Service Name: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - } - //Todo there is more then 1 event! Create a Event List! - pNode = pRootElement->FirstChild("event"); - if (pNode) - { - CLog::Log(LOGDEBUG, "%s - Event", __FUNCTION__); - pIt = pNode->FirstChild("date"); - if (pIt) - { - sServiceEPG.date = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Date: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - pIt = pNode->FirstChild("time"); - if (pIt) - { - sServiceEPG.time = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Time: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - pIt = pNode->FirstChild("duration"); - if (pIt) - { - sServiceEPG.duration = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Duration: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - pIt = pNode->FirstChild("descritption"); - if (pIt) - { - sServiceEPG.descritption = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Descritption: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - pIt = pNode->FirstChild("genre"); - if (pIt) - { - sServiceEPG.genre = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Genre: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - pIt = pNode->FirstChild("genrecategory"); - if (pIt) - { - sServiceEPG.genrecategory = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Genrecategory: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - pIt = pNode->FirstChild("start"); - if (pIt) - { - sServiceEPG.start = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Start: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - pIt = pNode->FirstChild("details"); - if (pIt) - { - sServiceEPG.details = pIt->FirstChild()->Value(); - CLog::Log(LOGDEBUG, "%s - Details: %s", __FUNCTION__, pIt->FirstChild()->Value()); - } - } - return true; - } - return false; -} -//PopUp and request the AudioChannel -//No PopUp: On 1x detected AudioChannel -bool CTuxBoxUtil::GetGUIRequestedAudioChannel(AUDIOCHANNEL& sRequestedAC) -{ - sRequestedAC = sCurSrvData.audio_channels[0]; - - // Audio Selection is Disabled! Return false to use default values! - if(!g_advancedSettings.m_bTuxBoxAudioChannelSelection) - { - CLog::Log(LOGDEBUG, "%s - Audio Channel Selection is Disabled! Returning False to use the default values!", __FUNCTION__); - return false; - } - - // We have only one Audio Channel return false to use default values! - if(sCurSrvData.audio_channels.size() == 1) - return false; - - // popup the context menu - CContextButtons buttons; - - // add the needed Audio buttons - for (unsigned int i = 0; i < sCurSrvData.audio_channels.size(); ++i) - buttons.Add(i, sCurSrvData.audio_channels[i].name); - - int channel = CGUIDialogContextMenu::ShowAndGetChoice(buttons); - if (channel >= 0) - { - sRequestedAC = sCurSrvData.audio_channels[channel]; - sCurSrvData.requested_audio_channel = channel; - CLog::Log(LOGDEBUG, "%s - Audio channel %s requested.", __FUNCTION__, sRequestedAC.name.c_str()); - return true; - } - return false; -} -bool CTuxBoxUtil::GetRequestedAudioChannel(AUDIOCHANNEL& sRequestedAC) const -{ - sRequestedAC = sCurSrvData.audio_channels[sCurSrvData.requested_audio_channel]; - - return true; -} -bool CTuxBoxUtil::GetVideoSubChannels(std::string& strVideoSubChannelName, std::string& strVideoSubChannelPid) -{ - // no video sub channel return false! - if(vVideoSubChannel.name.size() <= 0 || vVideoSubChannel.reference.size() <= 0) - return false; - - // IsPlaying, Stop it.. - if(g_application.m_pPlayer->IsPlaying()) - CApplicationMessenger::Get().MediaStop(); - - // popup the context menu - CContextButtons buttons; - - // add the needed Audio buttons - for (unsigned int i = 0; i < vVideoSubChannel.name.size(); ++i) - buttons.Add(i, vVideoSubChannel.name[i]); - - // get selected Video Sub Channel name and reference zap - int channel = CGUIDialogContextMenu::ShowAndGetChoice(buttons); - if (channel >= 0) - { - strVideoSubChannelName = vVideoSubChannel.name[channel]; - strVideoSubChannelPid = vVideoSubChannel.reference[channel]; - vVideoSubChannel.name.clear(); - vVideoSubChannel.reference.clear(); - vVideoSubChannel.selected.clear(); - return true; - } - return false; -} -//Input: Service Name (Channel Namne) -//Output: picon url (on ERROR the default icon path will be returned) -std::string CTuxBoxUtil::GetPicon(std::string strServiceName) -{ - if(!g_advancedSettings.m_bTuxBoxPictureIcon) - { - CLog::Log(LOGDEBUG, "%s PictureIcon Detection is Disabled! Using default icon", __FUNCTION__); - return ""; - } - if (strServiceName.empty()) - { - CLog::Log(LOGDEBUG, "%s Service Name is Empty! Can not detect a PictureIcon. Using default icon!", __FUNCTION__); - return ""; - } - else - { - std::string piconXML, piconPath, defaultPng; - piconPath = "special://xbmc/userdata/PictureIcon/Picon/"; - defaultPng = piconPath+"tuxbox.png"; - piconXML = "special://xbmc/userdata/PictureIcon/picon.xml"; - CXBMCTinyXML piconDoc; - - if (!CFile::Exists(piconXML)) - return defaultPng; - - if (!piconDoc.LoadFile(piconXML)) - { - CLog::Log(LOGERROR, "Error loading %s, Line %d\n%s", piconXML.c_str(), piconDoc.ErrorRow(), piconDoc.ErrorDesc()); - return defaultPng; - } - - TiXmlElement *pRootElement = piconDoc.RootElement(); - if (!pRootElement || strcmpi(pRootElement->Value(),"picon") != 0) - { - CLog::Log(LOGERROR, "Error loading %s, no <picon> node", piconXML.c_str()); - return defaultPng; - } - - TiXmlElement* pServices = pRootElement->FirstChildElement("services"); - TiXmlElement* pService; - pService = pServices->FirstChildElement("service"); - while(pService) - { - std::string strName = XMLUtils::GetAttribute(pService, "name"); - std::string strPng = XMLUtils::GetAttribute(pService, "png"); - - if(strName == strServiceName) - { - strPng = piconPath + strPng; - StringUtils::ToLower(strPng); - CLog::Log(LOGDEBUG, "%s %s: Path is: %s", __FUNCTION__,strServiceName.c_str(), strPng.c_str()); - return strPng; - } - pService = pService->NextSiblingElement("service"); - } - return defaultPng; - } -} - -// iMODE: 0 = TV, 1 = Radio, 2 = Data, 3 = Movies, 4 = Root -// SUBMODE: 0 = n/a, 1 = All, 2 = Satellites, 2 = Providers, 4 = Bouquets -std::string CTuxBoxUtil::GetSubMode(int iMode, std::string& strXMLRootString, std::string& strXMLChildString) -{ - //Todo: add a setting: "Don't Use Request mode" to advanced.xml - - // MODE: 0 = TV, 1 = Radio, 2 = Data, 3 = Movies, 4 = Root - // SUBMODE: 0 = n/a, 1 = All, 2 = Satellites, 2 = Providers, 4 = Bouquets - // Default Submode - std::string strSubMode; - - if(iMode <0 || iMode >4) - { - strSubMode = StringUtils::Format("xml/services?mode=0&submode=4"); - strXMLRootString = StringUtils::Format("bouquets"); - strXMLChildString = StringUtils::Format("bouquet"); - return strSubMode; - } - - // popup the context menu - - // FIXME: Localize these - CContextButtons choices; - choices.Add(1, "All"); - choices.Add(2, "Satellites"); - choices.Add(3, "Providers"); - choices.Add(4, "Bouquets"); - - int iSubMode = CGUIDialogContextMenu::ShowAndGetChoice(choices); - if (iSubMode == 1) - { - strXMLRootString = StringUtils::Format("services"); - strXMLChildString = StringUtils::Format("service"); - } - else if (iSubMode == 2) - { - strXMLRootString = StringUtils::Format("satellites"); - strXMLChildString = StringUtils::Format("satellite"); - } - else if (iSubMode == 3) - { - strXMLRootString = StringUtils::Format("providers"); - strXMLChildString = StringUtils::Format("provider"); - } - else // if (iSubMode == 4 || iSubMode < 0) - { - iSubMode = 4; - strXMLRootString = StringUtils::Format("bouquets"); - strXMLChildString = StringUtils::Format("bouquet"); - } - strSubMode = StringUtils::Format("xml/services?mode=%i&submode=%i",iMode,iSubMode); - return strSubMode; -} -//Input: url/path of share/item file/folder -//Output: the detected submode root and child string -std::string CTuxBoxUtil::DetectSubMode(std::string strSubMode, std::string& strXMLRootString, std::string& strXMLChildString) -{ - //strSubMode = "xml/services?mode=0&submode=1" - std::string strFilter; - size_t ipointMode = strSubMode.find("?mode="); - size_t ipointSubMode = strSubMode.find("&submode="); - if (ipointMode != std::string::npos) - strFilter.assign(1, strSubMode.at(ipointMode + 6)); - - if (ipointSubMode != std::string::npos) - { - char v = strSubMode.at(ipointSubMode + 9); - if(v == '1') - { - strXMLRootString = "unknowns"; - strXMLChildString = "unknown"; - } - else if(v == '2') - { - strXMLRootString = "satellites"; - strXMLChildString = "satellite"; - } - else if(v == '3') - { - strXMLRootString = "providers"; - strXMLChildString = "provider"; - } - else if(v == '4') - { - strXMLRootString = "bouquets"; - strXMLChildString = "bouquet"; - } - - } - return strFilter; -} diff --git a/xbmc/utils/TuxBoxUtil.h b/xbmc/utils/TuxBoxUtil.h deleted file mode 100644 index f6532dd8a0..0000000000 --- a/xbmc/utils/TuxBoxUtil.h +++ /dev/null @@ -1,191 +0,0 @@ -#pragma once - -/* - * Copyright (C) 2005-2013 Team XBMC - * http://xbmc.org - * - * 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, 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 XBMC; see the file COPYING. If not, see - * <http://www.gnu.org/licenses/>. - * - */ - -#include <string> -#include "threads/Thread.h" - -class CURL; -class TiXmlElement; -class CFileItem; -class CFileItemList; - -struct STREAMINFO -{ - std::string frontend; - std::string service_name; - std::string service_reference; - std::string provider; - std::string vpid; - std::string apid; - std::string pcrpid; - std::string tpid; - std::string tsid; - std::string onid; - std::string sid; - std::string pmt; - std::string video_format; - std::string supported_crypt_systems; - std::string used_crypt_systems; - std::string satellite; - std::string frequency; - std::string symbol_rate; - std::string polarisation; - std::string inversion; - std::string fec; - std::string snr; - std::string agc; - std::string ber; - std::string lock; - std::string sync; -}; -struct VIDEOSUBCHANNEL -{ - std::vector<std::string> reference; - std::vector<std::string> name; - std::vector<std::string> selected; - std::string current_name; - bool mode; -}; -typedef struct AUDIOCHANNEL -{ - std::string pid; - std::string selected; - std::string name; -} sAudioChannel; -struct CURRENTSERVICEDATA -{ - std::string service_name; - std::string service_reference; - std::vector<AUDIOCHANNEL> audio_channels; - int requested_audio_channel; - std::string audio_track; - std::string current_event_date; - std::string current_event_time; - std::string current_event_start; - std::string current_event_duration; - std::string current_event_description; - std::string current_event_details; - std::string next_event_date; - std::string next_event_time; - std::string next_event_start; - std::string next_event_duration; - std::string next_event_description; - std::string next_event_details; -}; -struct BOXSTATUS -{ - std::string current_time; - std::string standby; - std::string recording; - std::string mode; - std::string ip; -}; -struct BOXSINFO -{ - std::string image_version; - std::string image_url; - std::string image_comment; - std::string image_catalog; - std::string firmware; - std::string fpfirmware; - std::string webinterface; - std::string model; - std::string manufacturer; - std::string processor; - std::string usbstick; - std::string disk; -}; -struct SERVICE_EPG -{ - std::string service_reference; - std::string service_name; - std::string image_comment; - std::string event; - std::string date; - std::string time; - std::string duration; - std::string descritption; - std::string genre; - std::string genrecategory; - std::string start; - std::string details; -}; -struct ZAPSTREAM -{ - bool initialized; - bool available; -}; -class CTuxBoxUtil -{ - public: - STREAMINFO sStrmInfo; - CURRENTSERVICEDATA sCurSrvData; - BOXSTATUS sBoxStatus; - BOXSINFO sBoxInfo; - SERVICE_EPG sServiceEPG; - VIDEOSUBCHANNEL vVideoSubChannel; - ZAPSTREAM sZapstream; - - CTuxBoxUtil(void); - virtual ~CTuxBoxUtil(void); - - bool GetZapUrl(const std::string& strPath, CFileItem &items); - static bool ParseBouquets(TiXmlElement *root, CFileItemList &items, CURL &url, std::string strFilter, std::string strChild); - static bool ParseBouquetsEnigma2(TiXmlElement *root, CFileItemList &items, CURL &url, std::string& strFilter, std::string& strChild); - static bool ParseChannels(TiXmlElement *root, CFileItemList &items, CURL &url, std::string strFilter, std::string strChild); - static bool ParseChannelsEnigma2(TiXmlElement *root, CFileItemList &items, CURL &url, std::string& strFilter, std::string& strChild); - bool ZapToUrl(CURL url, const std::string &pathOption); - bool StreamInformations(TiXmlElement *pRootElement); - bool CurrentServiceData(TiXmlElement *pRootElement); - bool BoxStatus(TiXmlElement *pRootElement); - bool BoxInfo(TiXmlElement *pRootElement); - bool ServiceEPG(TiXmlElement *pRootElement); - bool GetHttpXML(CURL url,std::string strRequestType); - bool GetGUIRequestedAudioChannel(AUDIOCHANNEL& sRequestedAC); - bool GetRequestedAudioChannel(AUDIOCHANNEL& sRequestedAC) const; - bool GetVideoSubChannels(std::string& strVideoSubChannelName, std::string& strVideoSubChannelPid); - bool GetVideoChannels(TiXmlElement *pRootElement); - bool CreateNewItem(const CFileItem& item, CFileItem& item_new); - static bool InitZapstream(const std::string& strPath); - static bool SetAudioChannel(const std::string& strPath, const AUDIOCHANNEL& sAC); - - static std::string GetPicon(std::string strServiceName); - static std::string GetSubMode(int iMode, std::string& strXMLRootString, std::string& strXMLChildString); - static std::string DetectSubMode(std::string strSubMode, std::string& strXMLRootString, std::string& strXMLChildString); -}; -extern CTuxBoxUtil g_tuxbox; - -class CTuxBoxService : public CThread -{ -public: - CTuxBoxService(); - ~CTuxBoxService(); - - bool Start(); - void Stop(); - bool IsRunning(); - - virtual void OnExit(); - virtual void OnStartup(); - virtual void Process(); -}; -extern CTuxBoxService g_tuxboxService; diff --git a/xbmc/utils/URIUtils.cpp b/xbmc/utils/URIUtils.cpp index 31f6123407..e1132c791d 100644 --- a/xbmc/utils/URIUtils.cpp +++ b/xbmc/utils/URIUtils.cpp @@ -586,9 +586,6 @@ bool URIUtils::IsOnLAN(const std::string& strPath) if(IsPlugin(strPath)) return false; - if(IsTuxBox(strPath)) - return true; - if(IsUPnP(strPath)) return true; @@ -929,11 +926,6 @@ bool URIUtils::IsUPnP(const std::string& strFile) return IsProtocol(strFile, "upnp"); } -bool URIUtils::IsTuxBox(const std::string& strFile) -{ - return IsProtocol(strFile, "tuxbox"); -} - bool URIUtils::IsMythTV(const std::string& strFile) { return IsProtocol(strFile, "myth"); @@ -964,8 +956,7 @@ bool URIUtils::IsLiveTV(const std::string& strFile) std::string strFileWithoutSlash(strFile); RemoveSlashAtEnd(strFileWithoutSlash); - if(IsTuxBox(strFile) - || IsVTP(strFile) + if(IsVTP(strFile) || IsHDHomeRun(strFile) || IsSlingbox(strFile) || IsHTSP(strFile) diff --git a/xbmc/utils/URIUtils.h b/xbmc/utils/URIUtils.h index 8ddb2adf91..46fa5ad26c 100644 --- a/xbmc/utils/URIUtils.h +++ b/xbmc/utils/URIUtils.h @@ -151,7 +151,6 @@ public: static bool IsSmb(const std::string& strFile); static bool IsSpecial(const std::string& strFile); static bool IsStack(const std::string& strFile); - static bool IsTuxBox(const std::string& strFile); static bool IsUPnP(const std::string& strFile); static bool IsURL(const std::string& strFile); static bool IsVideoDb(const std::string& strFile); diff --git a/xbmc/utils/test/TestURIUtils.cpp b/xbmc/utils/test/TestURIUtils.cpp index 8c6b780fcb..42977f75b7 100644 --- a/xbmc/utils/test/TestURIUtils.cpp +++ b/xbmc/utils/test/TestURIUtils.cpp @@ -332,7 +332,6 @@ TEST_F(TestURIUtils, IsISO9660) TEST_F(TestURIUtils, IsLiveTV) { - EXPECT_TRUE(URIUtils::IsLiveTV("tuxbox://path/to/file")); EXPECT_TRUE(URIUtils::IsLiveTV("vtp://path/to/file")); EXPECT_TRUE(URIUtils::IsLiveTV("hdhomerun://path/to/file")); EXPECT_TRUE(URIUtils::IsLiveTV("sling://path/to/file")); @@ -384,7 +383,6 @@ TEST_F(TestURIUtils, IsOnLAN) EXPECT_TRUE(URIUtils::IsOnLAN("stack://daap://path/to/file")); EXPECT_TRUE(URIUtils::IsOnLAN("daap://path/to/file")); EXPECT_FALSE(URIUtils::IsOnLAN("plugin://path/to/file")); - EXPECT_TRUE(URIUtils::IsOnLAN("tuxbox://path/to/file")); EXPECT_TRUE(URIUtils::IsOnLAN("upnp://path/to/file")); } @@ -429,11 +427,6 @@ TEST_F(TestURIUtils, IsStack) EXPECT_TRUE(URIUtils::IsStack("stack://path/to/file")); } -TEST_F(TestURIUtils, IsTuxBox) -{ - EXPECT_TRUE(URIUtils::IsTuxBox("tuxbox://path/to/file")); -} - TEST_F(TestURIUtils, IsUPnP) { EXPECT_TRUE(URIUtils::IsUPnP("upnp://path/to/file")); @@ -530,7 +523,6 @@ TEST_F(TestURIUtils, HasEncodedFilename) EXPECT_TRUE(URIUtils::HasEncodedFilename(CURL("shout://"))); EXPECT_TRUE(URIUtils::HasEncodedFilename(CURL("daap://"))); EXPECT_TRUE(URIUtils::HasEncodedFilename(CURL("dav://"))); - EXPECT_TRUE(URIUtils::HasEncodedFilename(CURL("tuxbox://"))); EXPECT_TRUE(URIUtils::HasEncodedFilename(CURL("rss://"))); EXPECT_TRUE(URIUtils::HasEncodedFilename(CURL("davs://"))); } diff --git a/xbmc/video/windows/GUIWindowVideoBase.cpp b/xbmc/video/windows/GUIWindowVideoBase.cpp index 9bdd4ccd18..a8ccff2d12 100644 --- a/xbmc/video/windows/GUIWindowVideoBase.cpp +++ b/xbmc/video/windows/GUIWindowVideoBase.cpp @@ -1663,10 +1663,9 @@ bool CGUIWindowVideoBase::GetDirectory(const std::string &strDirectory, CFileIte bool CGUIWindowVideoBase::StackingAvailable(const CFileItemList &items) { CURL url(items.GetPath()); - return !(items.IsTuxBox() || items.IsPlugin() || - items.IsAddonsPath() || items.IsRSS() || - items.IsInternetStream() || items.IsVideoDb() || - url.IsProtocol("playlistvideo")); + return !(items.IsPlugin() || items.IsAddonsPath() || + items.IsRSS() || items.IsInternetStream() || + items.IsVideoDb() || url.IsProtocol("playlistvideo")); } void CGUIWindowVideoBase::GetGroupedItems(CFileItemList &items) |