Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Re-enable manually add to library #1021

Closed
wants to merge 1 commit into from

2 participants

@Voyager1
Collaborator

this functionality used to be available in earlier versions (Dharma?) of xbmc but was removed as part of the context menu clean up. Unfortunately no suitable replacement has come up (like a scraper addon that would allow manual addition to library).

How to use: navigate in file view to the item not in the library, select context menu "Manually Add to Library". Done.

@jmarshallnz
Owner

@topfs2 is working on scraping for GSoC, and part of that will likely be including items that don't normally scrape in the library by default anyway. Thus, this won't be needed at that point.

In the meantime, adding an .nfo file doesn't take that long for one-offs, and has the bonus of (potentially) adding a whole heap of information all at once.

@Voyager1
Collaborator

@jmarshallnz - @topfs2 - any update on the scrapers work? apologies in case I missed that.

I know it's not beautiful, but this PR offers a really simple way to manually add videos to the library (e.g. kids dvds, home videos, etc.). Not sure if the average user feels comfortable with nfo file tweaking.

@Voyager1 Voyager1 reopened this
@Voyager1
Collaborator

@cptspiff - @jmarshallnz suggested to run this by you.

@Voyager1
Collaborator

@cptspiff - sorry to bump and bother you. Any thoughts?

@ghost

imo nfo files suffices until such a time we have import for 'unknown' items going.

@Voyager1
Collaborator

fair enough. I'll close this then.

@Voyager1 Voyager1 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 28, 2012
  1. re-enable manually add to library

    Voyager-xbmc authored
This page is out of date. Refresh to see the latest.
View
7 xbmc/video/windows/GUIWindowVideoBase.cpp
@@ -1827,6 +1827,13 @@ void CGUIWindowVideoBase::AddToDatabase(int iItem)
m_database.Open();
int idMovie = m_database.AddMovie(pItem->GetPath());
movie.m_strIMDBNumber.Format("xx%08i", idMovie);
+
+ if (movie.m_basePath.IsEmpty())
+ movie.m_basePath = pItem->GetBaseMoviePath(false);
+ movie.m_parentPathID = m_database.AddPath(URIUtils::GetParentPath(movie.m_basePath));
+
+ movie.m_strFileNameAndPath = pItem->GetPath();
+
m_database.SetDetailsForMovie(pItem->GetPath(), movie, pItem->GetArt());
m_database.Close();
View
13 xbmc/video/windows/GUIWindowVideoNav.cpp
@@ -1030,6 +1030,13 @@ void CGUIWindowVideoNav::GetContextButtons(int itemNumber, CContextButtons &butt
buttons.Add(CONTEXT_BUTTON_DELETE, 117);
buttons.Add(CONTEXT_BUTTON_RENAME, 118);
}
+
+ if (!item->IsLiveTV())
+ {
+ if (!m_database.HasMovieInfo(item->GetPath()) && !m_database.HasEpisodeInfo(item->GetPath()))
+ buttons.Add(CONTEXT_BUTTON_ADD_TO_LIBRARY, 527); // Add to Database
+ }
+
// add "Set/Change content" to folders
if (item->m_bIsFolder && !item->IsPlayList() && !item->IsSmartPlayList() && !item->IsLiveTV() && !item->IsPlugin() && !item->IsAddonsPath())
{
@@ -1330,6 +1337,12 @@ bool CGUIWindowVideoNav::OnContextButton(int itemNumber, CONTEXT_BUTTON button)
return true;
}
+ case CONTEXT_BUTTON_ADD_TO_LIBRARY:
+ {
+ AddToDatabase(itemNumber);
+ return true;
+ }
+
default:
break;
Something went wrong with that request. Please try again.