StreamDetails overwritten on refresh. How to avoid it?
#1
Hello everybody.
I have a question for the experts Wink

I have set up my tvshows library by importing some episodes .disc and .nfo I created outside XBMC (they are offline media (DVD).
The nfo I created basically ONLY include all the streamdetails information (video, audio and subtitle).
Now I would like to complete the episode information by using the TheTVDB scraper.
To do it, I open the episode info and hit "refresh" (and I still wonder if it would be possible to trigger such refresh for the entire library with a single command....Huh).
The problem is that after I hit refresh, all the info are populated, but the streamdetails are deleted!!!
I should I do in order to refresh the episode infos WITHOUT touching the streamdetails info? I know the watched state remain untouched if I set <importwatchedstate>false</importwatchedstate> in the advancedsettings.
Is there any similar way to achieve the same result also on the streamdetails?

Thank you,
Dakkar
Reply
#2
Bump.
No one?

Dakkar
Reply
#3
Refreshing is a one-at-a-time process, unless you change the content on the source to "none", and then after the library is cleaned, set content back to "tvshows". You are prompted with a refresh all items dialog and can hit them all at once that way.

As far as preserving stream details...
You unfortunately did the process backwards. I'd have gotten the tvdb info first, exported the library as to generate .nfos based on the tvdb info, and then go into the .nfos and add the stream details.
Quick Links: debug log (wiki) | userdata (wiki) | advancedsettings (wiki) | adding videos to the library (wiki)
Reply
#4
Thank you very much for your reply.

Yes, I am in the middle of doing what you proposed... and it will probably work fine.
But: the problem is that whenever I will it "refresh" to update the info from the scraping source I will have my streamdetails being overwritten...
I think updating the streamdetails should be a separate process than the info scraping... Like the watched state is (if I refresh the info from TheTVDb the watched state is not overwritten...).
Don't you think it should work in this way?

Dakkar

Reply
#5
Well, when you refresh and choose to use the internet for details, that is an overwrite, and new info is added to the database. I don't think it's a bad idea to have the stream details occupy an untouched area of the db, same as watched statuses.
You're in for a bit of tedium while you get it worked out - but once you do, you'll have all the info set correctly. I'd move all the current .nfos (with the streamdetails) into another folder, so that they don't get overwritten, and then just copy/paste into the exported .nfos.
Quick Links: debug log (wiki) | userdata (wiki) | advancedsettings (wiki) | adding videos to the library (wiki)
Reply
#6
No matter what you put in the nfo files once you play it xbmc overwrites it
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#7
Hi, I know that this is an old thread but i've got the same issue.

When a video is played it overwrites all the data in streamdetails: the issue for me is the languages and subtitles being overwritten, as the majority of my media have undefined streams or embedded subtitles, which im sure is the same for a lot, if not most people.

Im new to xbmc so am still getting to grips with it so maybe it is a misunderstanding on my part, however I thought that the way it was supposed to work was:
on play look in the database, if no data write data, else do not write data.
However this is not how it appears to work, the data is overwritten regardless.

The solution that im looking into is being able set a flag that allows or disallows an overwrite of the data.

im not sure of the best way to go about it, a single global flag from an xml file or individual flags for each item as an extra parameter in the database, or some other method.

I've started to look into the xbmc code, and I believe that this is the section that overwrites streamdetails (Application.cpp)

Code:
CVideoInfoTag *details = m_itemCurrentFile->GetVideoInfoTag();
        // Save information about the stream if we currently have no data
        if (!details->HasStreamDetails() || details->m_streamDetails.GetVideoDuration() <= 0)
        {
          if (m_pPlayer->GetStreamDetails(details->m_streamDetails) && details->HasStreamDetails())
          {
            CVideoDatabase dbs;
            dbs.Open();
            dbs.SetStreamDetailsForFileId(details->m_streamDetails, details->m_iFileId);
            dbs.Close();
            CUtil::DeleteVideoDatabaseDirectoryCache();
          }
        }

What I would like to know is, firstly are my assumptions correct, and secondly is this the best way to do this, will it cause any issue that I might not be aware of?

Maybe one of the experts can give me some help here?
Reply

Logout Mark Read Team Forum Stats Members Help
StreamDetails overwritten on refresh. How to avoid it?0