Frodo w/Previously Scraped Local Artwork
#1
I recently upgraded to one of the nightly Frodo builds (removed existing profile and did a complete clean install). I re-added my sources, and after re-building my movie library, found that most of the posters and fanart were missing.

I use Media Companion to store all of the posters and fanart with the movies, and the format looks like this:

D:\Movies\<movie name>\VIDEO_TS\
D:\Movies\<movie name>\VIDEO_TS\VIDEO_TS-fanart.jpg
D:\Movies\<movie name>\VIDEO_TS\VIDEO_TS.tbn

OR (if the movie isn't in DVD video format)

D:\Movies\<movie name>\<movie title>.mkv
D:\Movies\<movie name>\<movie title>-fanart.jpg
D:\Movies\<movie name>\<movie title>.tbn

For the movies that are in VIDEO_TS folders, none of the artwork shows up. For the movies that are in .mkv format, the artwork shows up just fine.

After reading some of the Frodo posts on artwork, I renamed "VIDEO_TS-fanart.jpg" to just "fanart.jpg" and renamed "VIDEO_TS.tbn" to "poster.jpg" and moved them from inside the VIDEO_TS folder, up one level to the <movie name> folder. After re-building the shares again, the artwork seems to show up fine.

I would like to make sure that this is now the expected usage model going forward. I don't mind moving the images, as I never liked the files named "VIDEO_TS" anyway. Could someone please confirm my understanding?

Assuming that this is the correct usage model going forward, I need to modify both the location, and the name, of several thousand images in order to be compliant to the new model. Does anyone have any suggestions for a efficient way to do this? I assume at some point Media Companion, will be updated to scrape the images to the Frodo spec, but until then, some sort of advanced copy utility would be handy to "fix" the movies that are already scraped.

BTW. I am running on Win7, otherwise I would probably script something up in perl on the unix side.

Thanks
Reply
#2
Correct. Note that you can move your other ones to fanart.jpg and poster/folder.jpg if you want (just make sure you scan with "Movies in separate folders named after the movie" turned on).
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
jmarshall,

Thanks for the reply. When you say "other ones," do you mean the non-VIDEO_TS movies?

Thanks
Reply
#4
Correct.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
Anyone have a clever way to bulk rename/move several thousand files in windows 7?
Reply
#6
(2012-11-21, 05:46)Mycroft Wrote: Anyone have a clever way to bulk rename/move several thousand files in windows 7?

Here is a pretty powerful windows renaming program:

http://www.bulkrenameutility.co.uk/
Reply
#7
A follow-up question about Frodo with VIDEO_TS movies:

Where and how should a .nfo file be placed/named?

Like this?

D:\Movies\<movie name>\poster.jpg
D:\Movies\<movie name>\fanart.jpg
D:\Movies\<movie name>\movie.nfo
D:\Movies\<movie name>\VIDEO_TS\

/edit:
Just tried the above: works great! Wink
Reply
#8
@jmarshall

So, there is backwards compatibility with .tbn, but not VIDEO_TS.tbn & VIDEO_TS-fanart.jpg?? What about those of us with different versions of XBMC, ie Dharma and Frodo Beta3. We would need both files in the DVD folder
VIDEO_TS.tbn
VIDEO_TS-fanart.jpg
fanart.jpg
poster.jpg

Can we not have dual compatibility in Frodo? I mean, there's some backwards compatibility currently, but shouldn't it cover all previous format artwork?
Media Companion Dev.
Media Companion - Kodi / XBMC - Media Companion
Reply
#9
vbat3: Correct, it's not entirely backward compatible as there were insane structures used before that are now eliminated.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#10
OK, I know progress in this area is for the better.

Hopefully I can sweet-talk the dev's for MediaCompanion to create dual artwork to allow compatibility.
@OP. Keep checking MC site at codeplex for updates.
Media Companion Dev.
Media Companion - Kodi / XBMC - Media Companion
Reply
#11
@jmarshall

Can you advise if actor tbn is still backwards compatible?? is this also changed to jpg?
Media Companion Dev.
Media Companion - Kodi / XBMC - Media Companion
Reply
#12
jpg or png work as do tbn for actor art.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#13
Thanks. Just the answer I needed. Phew!
Media Companion Dev.
Media Companion - Kodi / XBMC - Media Companion
Reply
#14
When I updated to Frodo RC1 I ended up refreshing info on everything with a script. Once it was all back how I had it, I exported all the extras to files as I normally do and it added the jpgs along side the .tbn files. It looks like they're no longer exporting to tbn files for local exports. I just deleted all of my tbn files. Hopefully that won't bite me in the ass somehow. I dont see how it would, since I have the jpg files in their place. I just didn't want both cluttering up my already cluttered movie/tv folders.
Reply
#15
Here is a script in Python for automatically updating the directories according to the VIDEO_TS wishes of Frodo. The script should run under both Windows and Linux and probably OSX, but I have only tested on Windows.

Usage:
  1. Install Python (free, http://python.org). I've tested with version 2.7.2, don't know if it also works in version 3.x but I think it should - possibly with small tweaks.
  2. Start IDLE (editor, comes with Python so you should find it in your Start menu) and make a new file (File -> New)
  3. Copy the script contents from below and paste them in the new file. Then save the script to xbmc_video_ts_fixer.py
  4. Configure in the CONFIGURATION SECTION. Note that by default, the script will run in test-mode, so no changes will be performed. I'd strongly recommend starting with just a subset of your library, e.g. if you have movies in subdirectories by first letter, only play with letter "A" first. This because it takes a while to process a large library and that's a bit annoying if you're just tinkering with the configuration.
  5. Run it (Run -> Run module) in test mode and check that the results are what you'd expect them to be. If not, change the config some more.
  6. Switch in the config to:
    Code:
    test = False
  7. Run again so it performs the actions.

Obviously no warranty. If you want to be safe, make a backup of your library before running the script.

Code:
# xbmc_video_ts_fixer.py
# XBMC 12 (Frodo) has changed the way it handles posters for DVD rips:
# instead of picking them up from MovieName\VIDEO_TS\movie.jpg, it picks
# them from MovieName\poster.jpg. This script converts between the two.
# This script requires a recent version of Python to be installed, available
# from http://python.org.
#
# version 1.0
#
# Licence: public domain
# No warranty, run at your own risk.

###### CONFIGURATION SECTION #######
# location of all dvd rips, or of individual movie
srcdir = r'\\SERVER\movies\dvdrips' # if you get an error here, ensure you don't include a trailing backslash

# indicate whether to run in test-only mode (only report actions, but
# don't actually perform them)
test = True # can set to False after checking it will do the right thing

# indicate whether should display progress of lookups (may slow things down,
# but at least you'll know it's not hanging)
report_lookup_progress = True # set to False in order to not get progress info

#### Renaming
# What to replace by what. Only ONE replacement action will be performed
# for every to_pattern (the first one it finds). E.g. if both
# VIDEO_TS/fanart.jpg and VIDEO_TS/video_ts-fanart.jpg are present and
# mapped to rename to fanart.jpg, only VIDEO_TS/fanart.jpg will be used.
rename_patterns = [
    # ('from_pattern', 'to_pattern')
    ('VIDEO_TS/fanart.jpg', 'fanart.jpg'),
    ('VIDEO_TS/folder.jpg', 'poster.jpg'),
    ('VIDEO_TS/movie.jpg', 'poster.jpg'),
    ('VIDEO_TS/video_ts.jpg', 'poster.jpg'),
    ('VIDEO_TS/video_ts-fanart.jpg', 'fanart.jpg'),
    ]
# There will by default be no renaming action if the to_pattern file
# already exists. You can change this with the following variable:
overwrite_existing = False # set to True if you want to overwrite anyway

#### Removals
# What to remove (don't remove anything if you intend to use multiple
# versions of XBMC).
perform_remove = False # set to True if you want the removal actions to be performed
remove_patterns = [
    'VIDEO_TS/folder.jpg',
    'VIDEO_TS/movie.jpg',
    'VIDEO_TS/movie.tbn',
    'VIDEO_TS/video_ts.jpg',
    'VIDEO_TS/video_ts.nfo',
    'VIDEO_TS/video_ts.tbn',
    'VIDEO_TS/video_ts-fanart.tbn',
    ]


###### IMPLEMENTATION SECTION #######
import os, os.path
import shutil

files_to_rename = []
files_to_remove = []

def categorize(rootdir):
    """Categorizes recursively the contents of rootdir into
       files_to_rename and files_to_remove (as applicable)."""
    print('++++++ Categorizing....')
    global files_to_rename
    global files_to_remove
    already_renamed_targets = set() # so we don't rename the same thing twice
    for root, dirs, files in os.walk(rootdir):
        if report_lookup_progress:
            print('looking in %s' % root)
        for rnmpat in rename_patterns:
            sourcename = os.path.join(root, rnmpat[0])
            targetname = os.path.join(root, rnmpat[1])
            if not os.path.exists(sourcename): # nothing to do
                continue
            if targetname in already_renamed_targets: # only rename once for every target
                continue
            if os.path.exists(targetname) and not overwrite_existing: # don't overwrite existing targets unless explicitly configured to do so
                continue
            already_renamed_targets.add(targetname)
            files_to_rename.append((sourcename, targetname))
        for rmvpat in remove_patterns:
            removename = os.path.join(root, rmvpat)
            if not os.path.exists(removename): # nothing to do
                continue
            files_to_remove.append(removename)
        
def perform():
    """Performs the actions dictated by the contents of
       files_to_rename and files_to_remove."""
    print('++++++ Renaming...')
    for renameaction in files_to_rename:
        # determine common part of the paths for cleaner reporting
        common = 0
        for i in range(min(len(renameaction[0]), len(renameaction[1]))):
            if renameaction[0][i] == renameaction[1][i]:
                common += 1
        print('rename in %s: %s -> %s' % (renameaction[0][:common], renameaction[0][common:], renameaction[1][common:]))
        if not test:
            shutil.copy2(renameaction[0], renameaction[1]) # copy2 so dirs are also handled
    print('++++++ Removing...')
    perform_tags = {True: '', False: 'disabled '}
    for removeaction in files_to_remove:
        print('%sremove: %s' % (perform_tags[perform_remove], removeaction))
        if perform_remove and not test:
            if os.path.isdir(removeaction):
                os.rmdir(removeaction)
            else:
                os.remove(removeaction)

if __name__=='__main__':
    categorize(srcdir)
    perform()
Reply

Logout Mark Read Team Forum Stats Members Help
Frodo w/Previously Scraped Local Artwork0