diff --git a/TvEngine3/Mediaportal/TV/Server/TvLibrary.Services/TVController.cs b/TvEngine3/Mediaportal/TV/Server/TvLibrary.Services/TVController.cs index ff083287685..936d605926f 100644 --- a/TvEngine3/Mediaportal/TV/Server/TvLibrary.Services/TVController.cs +++ b/TvEngine3/Mediaportal/TV/Server/TvLibrary.Services/TVController.cs @@ -516,6 +516,8 @@ private void InitController() IList allCards = TVDatabase.TVBusinessLayer.CardManagement.ListAllCards(CardIncludeRelationEnum.None); + bool oneOrMoreCardsFound = false; + foreach (ITVCard itvCard in _localCardCollection.Cards) { //for each card, check if its already mentioned in the database @@ -541,10 +543,14 @@ private void InitController() PidFilterMode = (int)PidFilterMode.Auto, IdleMode = (int)DeviceIdleMode.Stop }; - + oneOrMoreCardsFound = true; TVDatabase.TVBusinessLayer.CardManagement.SaveCard(newCard); } } + if (oneOrMoreCardsFound) + { + allCards = TVDatabase.TVBusinessLayer.CardManagement.ListAllCards(CardIncludeRelationEnum.None); + } //notify log about cards from the database which are removed from the pc int cardsInstalled = _localCardCollection.Cards.Count; foreach (Card dbsCard in allCards)