diff --git a/Dockerfile b/Dockerfile index ef5bf38..1055eef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,22 @@ FROM microsoft/dotnet:sdk AS build-env WORKDIR /app -# Copy csproj and restore as distinct layers -COPY ./*/*.csproj ./ -RUN dotnet restore - # Copy everything else and build COPY . ./ -RUN dotnet publish -c Release -o out +RUN dotnet restore Tv7Playlist.sln +RUN dotnet publish -c Release -o out Tv7Playlist.sln # Build runtime image FROM microsoft/dotnet:aspnetcore-runtime WORKDIR /app +RUN mkdir /data COPY --from=build-env /app/Tv7Playlist/out . ENV ASPNETCORE_URLS=http://+:80 EXPOSE 80 +VOLUME [ "/data" ] + ENTRYPOINT ["dotnet", "Tv7Playlist.dll"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..f4a05e2 --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +# TV7-Playlist + +## Summary + +This little application is used to rewrite the TV7 multicast channel list by fiber7 m3u. +The updated list will proxy the multicast stream through udpxy and builds a stream that plex can handle. + +Others have changed the code in telly. As I did not want to change any external source, I just +wrote this little application. + +There are more features than just changing the URL: + +- Resorting of the channel list +- Enable or disable a channel +- Override the channel number -> better EPG Detection support in plex +- Override the channel name -> better EPG Detection support in plex + +This is licensed under GPLv2. See License file. + +## Docker + +### Run the application + +You may run this application using docker. If you want to persist the database when doing some updates, create a volume and use this as data storage. + +```shell +docker volume create tv7playlist_data +``` + +Next you have to create and run the docker container. + +```shell +docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer +docker run -t --name="tv7playlist" -p 8000:80 -e "UdpxyUrl=http://your.host.ip.of.udpxy:4022/udp" -v tv7playlist_data:/data --restart=unless-stopped phaefelfinger/tv7playlist:latest +``` + +### Environment variables + +- SourceType: "M3U" or "Xspf" +- SqLiteConnectionString: "Data Source=/data/playlist.db" +- TV7Url: "https://api.init7.net/tvchannels.m3u" or "https://api.init7.net/tvchannels.xspf" or any other provider +- UdpxyUrl: "http://your.host.ip.of.udpxy:4022/udp" or empty +- DownloadFileName: "PlaylistTV7udpxy.m3u" or any name that should be sent as filename while downloading the list diff --git a/Tv7Playlist/README.md b/Tv7Playlist/README.md deleted file mode 100644 index 2441cfc..0000000 --- a/Tv7Playlist/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# tv7playlist - -This little application is used to rewrite the TV7 multicast channel list by fiber7 m3u. -The updated list will proxy the multicast stream through udpxy and builds a stream that plex can handle. - -Others have changed the code in telly. As I did not want to change any external source, I just -wrote this little program. - -This is licenced under GPLv2. See License file. \ No newline at end of file diff --git a/Tv7Playlist/appsettings.json b/Tv7Playlist/appsettings.json index a97ce5a..655cfeb 100644 --- a/Tv7Playlist/appsettings.json +++ b/Tv7Playlist/appsettings.json @@ -7,9 +7,9 @@ } }, "AllowedHosts": "*", - "SourceType": "M3U", + "SourceType": "Xspf", "SqLiteConnectionString": "Data Source=/data/playlist.db", - "TV7Url": "https://api.init7.net/tvchannels.m3u", + "TV7Url": "https://api.init7.net/tvchannels.xspf", "UdpxyUrl": "http://192.168.15.2:4022/udp", "DownloadFileName": "PlaylistTV7udpxy.m3u" }