Release Filename-only Scraper (python)
#1
As discussed here https://forum.kodi.tv/showthread.php?tid=336042 this is a very trivial scraper that simply takes the filename and inserts it as-is into the library, there is no metadata added (kodi automatically removes file extension and _/- from the filename it seems).
It is a python-based scraper so it does not query any website and it works offline.

Code is here: https://github.com/chaosgrid/kodi-filenameScraper
Download here: https://github.com/chaosgrid/kodi-filena...master.zip

If you want to customize meta-data based on the filename, you could implement some more logic here https://github.com/chaosgrid/kodi-filena...ame.py#L37 so that based on the filename you set more options for the movie metadata similar to how it is done in the example python scraper: https://github.com/xbmc/xbmc/blob/master...emo.py#L49
Reply
#2
Fix for broken link at editing metadata insert function: https://github.com/chaosgrid/kodi-filena...ame.py#L37
Reply
#3
@chaosgrid

Thank you for your contribution. It works as advertised Smile

I have pinned this to the top of the forum and unpinned the thread for the other broken filename scraper... https://forum.kodi.tv/showthread.php?tid=339693

Any interest in creating other scrapers?
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#4
(2019-10-24, 14:38)chaosgrid Wrote: As discussed here https://forum.kodi.tv/showthread.php?tid=336042 this is a very trivial scraper that simply takes the filename and inserts it as-is into the library, there is no metadata added (kodi automatically removes file extension and _/- from the filename it seems).
It is a python-based scraper so it does not query any website and it works offline.

Code is here: https://github.com/chaosgrid/kodi-filenameScraper
Download here: https://github.com/chaosgrid/kodi-filena...master.zip

If you want to customize meta-data based on the filename, you could implement some more logic here https://github.com/chaosgrid/kodi-filena...ame.py#L37 so that based on the filename you set more options for the movie metadata similar to how it is done in the example python scraper: https://github.com/xbmc/xbmc/blob/master...emo.py#L49

Thank you for sharing the scraper, it worked well.  What would need to change to use it for TV shows?
Reply
#5
(2019-11-07, 20:00)user3454 Wrote:
(2019-10-24, 14:38)chaosgrid Wrote: thank you for sharing the scraper, it worked well.  What would need to change to use it for TV shows?

Did you manage to use it for tv shows?
Reply
#6
managed to get it to show in tvshows but it s not scraping
Reply
#7
Looks like it is for Movies only. You must have made some edits to the addon to get it show in TV Shows section.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#8
I would also be really interested in knowing if it is possible to get this working with TV Shows.

I record lots of TV, via TVHeadend, but like to watch it all back via Kodi's library mode (as opposed to via the TVHeadend add-on).

The TVDB does a fairly good job of automatically scraping my recordings folder but there are always quite a few shows that never show up in my library (I do add missing shows to the TVDB but I don't have the time to do them all).

Using this, to force unscraped shows into my library, is exactly what I am after.
Reply
#9
(2020-08-18, 13:59)elsmandino Wrote: I would also be really interested in knowing if it is possible to get this working with TV Shows.

I record lots of TV, via TVHeadend, but like to watch it all back via Kodi's library mode (as opposed to via the TVHeadend add-on).

The TVDB does a fairly good job of automatically scraping my recordings folder but there are always quite a few shows that never show up in my library (I do add missing shows to the TVDB but I don't have the time to do them all).

Using this, to force unscraped shows into my library, is exactly what I am after.
That's exactly what I need it for..
Still managed to sort something out....fixed the real movie nodes to just show the real movies I have in library and created new nodes for recordings...
Reply
#10
(2020-08-17, 03:07)Karellen Wrote: Looks like it is for Movies only. You must have made some edits to the addon to get it show in TV Shows section.

I v just changed 
<extension point="xbmc.metadata.scraper.movies"
to
<extension point="xbmc.metadata.scraper.tvshows"

but that only showed the scraper in tvshows but is not scraping...


edit:
After posting this I just remembered that I can use the music videos section instead of clustering the Movie library with scraped recordings...

so if you rename

<extension point="xbmc.metadata.scraper.movies"
to
<extension point="xbmc.metadata.scraper.musicvideos"

the scraper will put all scraped recordings in the music videos section which I never use anyway..

then install node editor and rename and edit  the librarys for music videos...scraping fine here too just like in movies...it just don t mix the scraped recordings with your movies...

Only issue I have this way is there doesn t look like there is a way to setup a node or smart playlist for In Progress Music Videos....does in progress exist in kodi for music videos??  Huh
Reply
#11
This is really clever, thank you - shall try this out over the weekend.

I am not a coder but I am going to have a look at the possibility of combining the two scrapers, so that your scraper is used, only if the TVDB does not find anything.

That way, your files would always appear in the library, but with full details if available.

The only other issue would be finding a way to update files if subsequent shows were then added to the TVDB.

For the time-being, however, at least I now have full access to all my recorded shows in library mode.
Reply
#12
(2020-08-20, 12:14)elsmandino Wrote: This is really clever, thank you - shall try this out over the weekend.

I am not a coder but I am going to have a look at the possibility of combining the two scrapers, so that your scraper is used, only if the TVDB does not find anything.

That way, your files would always appear in the library, but with full details if available.

The only other issue would be finding a way to update files if subsequent shows were then added to the TVDB.

For the time-being, however, at least I now have full access to all my recorded shows in library mode.

You can try this one...just edited few bits so it scrapes to musicvideo library.. metadata.justthefilename.scraper
Reply
#13
Perfect - thank you.

May I just double check something, please?

At the moment, my "Recordings" folder is added to Kodi as a "TV Shows" source.

Do I change the source of the folder to "Music Video" and then use your add-on?
Reply
#14
(2020-08-20, 13:42)elsmandino Wrote: Perfect - thank you.

May I just double check something, please?

At the moment, my "Recordings" folder is added to Kodi as a "TV Shows" source.

Do I change the source of the folder to "Music Video" and then use your add-on?
That's by no means my addon..that is the same addon from @chaosgrid  just edited few bits..
 
All you have to do is go to the folders that are not scraping..rightclick--click change content--set to music videos--set scraper to Filename-only Scraper.

Best way is to use this for all recordings as the scraped recordings won't show as tv shows...

Then install Library node editor and edit the musicvideos nodes to your likings..
Reply
#15
Thanks (and also, thanks to chaosgrid, as you say).

A couple more observations - I tried the Musicvideo method but that ended up with all my recordings being viewed as individual files (i.e. there is no way to group them as folders).  

I then had a go with the TV Shows method that you originally tried and, as you say, it doesn't seem to add any of the videos - I am trying to work out why, from the code, but cannot work out what the difference is between using TV Shows and Music Videos.

I then noticed something odd, when I looked at the recordings folder via file mode - every folder had a tick next to it (even though most of the files, within the folders had not).  Furthermore, there is no option on any of the folders to change its watched status.
Reply

Logout Mark Read Team Forum Stats Members Help
Filename-only Scraper (python)0