diff --git a/Dockerfile.sm.template b/Dockerfile.sm.template index 7764dd1ec..603af6369 100644 --- a/Dockerfile.sm.template +++ b/Dockerfile.sm.template @@ -7,39 +7,35 @@ WORKDIR /src # Copy all files into the image COPY . . -# Run dotnet restore and npm install in parallel -# RUN (dotnet restore "StreamMaster.API/StreamMaster.API.csproj" -a $TARGETARCH && \ -# dotnet build "StreamMaster.API.csproj" -c Debug -o /app/build -a $TARGETARCH) & \ -# (cd /src/streammasterwebui && npm install && npm run build && \ -# cp -r dist/* /src/StreamMaster.API/wwwroot/) && wait - -# Step 1: Restore and build the .NET project +# Step 1: Restore and build the .NET project with error-only output but keep echo messages RUN echo "Starting .NET restore..." && \ - dotnet restore "StreamMaster.API/StreamMaster.API.csproj" -a $TARGETARCH && \ + dotnet restore "StreamMaster.API/StreamMaster.API.csproj" -a $TARGETARCH --verbosity m && \ echo ".NET restore completed successfully." || echo "Error during .NET restore!" && \ \ echo "Starting .NET build..." && \ - dotnet build "StreamMaster.API.csproj" -c Debug -o /app/build -a $TARGETARCH && \ + dotnet build "StreamMaster.API/StreamMaster.API.csproj" -c Debug -o /app/build -a $TARGETARCH --verbosity m && \ echo ".NET build completed successfully." || echo "Error during .NET build!" -# Step 2: Install npm packages, build the frontend, and copy to wwwroot +# Step 2: Install npm packages, build the frontend, and copy to wwwroot with error-only output but keep echo messages RUN echo "Navigating to frontend directory: /src/streammasterwebui" && \ cd /src/streammasterwebui && \ echo "Installing npm dependencies..." && \ - npm install && \ + npm install --silent && \ echo "npm install completed successfully." || echo "Error during npm install!" && \ \ echo "Building frontend with npm run build..." && \ - npm run build && \ + npm run build --silent && \ echo "Frontend build completed successfully." || echo "Error during frontend build!" && \ \ echo "Copying frontend build files to /src/StreamMaster.API/wwwroot/..." && \ cp -r dist/* /src/StreamMaster.API/wwwroot/ && \ echo "Files copied to wwwroot successfully." || echo "Error copying files to wwwroot!" -# Publish the .NET application +# Publish the .NET application with error-only output but keep echo messages WORKDIR "/src/StreamMaster.API" -RUN dotnet publish --no-restore "StreamMaster.API.csproj" -c Debug -o /app/publish /p:UseAppHost=false -a $TARGETARCH +RUN echo "Publishing .NET application..." && \ + dotnet publish --no-restore "StreamMaster.API.csproj" -c Debug -o /app/publish /p:UseAppHost=false -a $TARGETARCH --verbosity m && \ + echo ".NET publish completed successfully." || echo "Error during .NET publish!" # Clean up source files -RUN rm -rf /src \ No newline at end of file +#RUN rm -rf /src diff --git a/StreamMaster.Application/StreamGroups/Queries/GetStreamGroupM3U.cs b/StreamMaster.Application/StreamGroups/Queries/GetStreamGroupM3U.cs index b38351803..4570d469e 100644 --- a/StreamMaster.Application/StreamGroups/Queries/GetStreamGroupM3U.cs +++ b/StreamMaster.Application/StreamGroups/Queries/GetStreamGroupM3U.cs @@ -255,41 +255,5 @@ private static void UpdateProperty(OutputProfile profile, SMChannel smChannel return (smChannel.ChannelNumber, lines); } - //private string GetIconUrl(string iconOriginalSource, Setting setting) - //{ - // string baseUrl = httpContextAccessor.GetUrl(); - - // if (string.IsNullOrEmpty(iconOriginalSource)) - // { - // return $"{baseUrl}{setting.DefaultLogo}"; - // } - - // string originalUrl = iconOriginalSource; - - // if (iconOriginalSource.StartsWith('/')) - // { - // iconOriginalSource = iconOriginalSource[1..]; - // } - - // if (iconOriginalSource.StartsWith("images/")) - // { - // return $"{baseUrl}/{iconOriginalSource}"; - // } - // else if (!iconOriginalSource.StartsWith("http")) - // { - // return GetApiUrl(SMFileTypes.TvLogo, originalUrl); - // } - // else if (string.Equals(setting.LogoCache, "cache", StringComparison.OrdinalIgnoreCase)) - // { - // return GetApiUrl(SMFileTypes.Logo, originalUrl); - // } - - // return iconOriginalSource; - //} - - //private string GetApiUrl(SMFileTypes path, string source) - //{ - // string baseUrl = httpContextAccessor.GetUrl(); - // return $"{baseUrl}/api/files/{(int)path}/{WebUtility.UrlEncode(source)}"; - //} + } \ No newline at end of file diff --git a/StreamMaster.Domain/Models/M3UFile.cs b/StreamMaster.Domain/Models/M3UFile.cs index 4ea92e187..14fbc82e3 100644 --- a/StreamMaster.Domain/Models/M3UFile.cs +++ b/StreamMaster.Domain/Models/M3UFile.cs @@ -28,8 +28,8 @@ public M3UFile() public int MaxStreamCount { get; set; } public int StreamCount { get; set; } public bool SyncChannels { get; set; } - public int StartingChannelNumber { get; set; } - public bool AutoSetChannelNumbers { get; set; } + public int StartingChannelNumber { get; set; } = 1; + public bool AutoSetChannelNumbers { get; set; } = true; //public string? DefaultGroup { get; set; } public string? DefaultStreamGroupName { get; set; } diff --git a/build_docker.ps1 b/build_docker.ps1 index 6288a91ac..45975c449 100644 --- a/build_docker.ps1 +++ b/build_docker.ps1 @@ -14,9 +14,9 @@ $global:tags function Main { Set-EnvironmentVariables - if ( $SkipMainBuild ) { - $Prod = $false - } + # if ( $SkipMainBuild ) { + # $Prod = $false + # } if (-not $SkipRelease -and -not $PrintCommands) { diff --git a/streammasterwebui/.eslintrc.json b/streammasterwebui/.eslintrc.json index b3fb491b4..2d353d605 100644 --- a/streammasterwebui/.eslintrc.json +++ b/streammasterwebui/.eslintrc.json @@ -13,9 +13,10 @@ "sourceType": "module", "project": "./tsconfig.json" }, - "plugins": ["unused-imports", "html","sort-keys-fix","typescript-sort-keys","react-hooks-addons"], + "plugins": ["import","unused-imports", "html","sort-keys-fix","typescript-sort-keys","react-hooks-addons"], "ignorePatterns": [ "*.css", "node_modules/", "dist/"], "rules": { + "import/no-unresolved": ["error", { "caseSensitive": true }], "react-hooks-addons/no-unused-deps": "warn", "typescript-sort-keys/interface": "off", "no-lone-blocks": "off",